Skip to main content

class side_effect

Declaration

template <typename T,
          side_effect_order Order = side_effect_order::sequential>
class side_effect { /* full declaration omitted */ };

Description

Provides access to a host_object through capture in a host_task. Inside the host task kernel, the internal state of the host object can be accessed through the * or -> operators. This behavior is similar to accessors on buffers.

Template Parameters

T
side_effect_order Order = side_effect_order::sequential

Member Variables

static const side_effect_order order = Order
instance_type* m_instance

Member Aliases

  • using instance_type = typename host_object<T>::instance_type;

Member Function Overview

  • template <typename U = T>
    operator*() const → std::enable_if_t<!std::is_void_v<U>, instance_type> &
  • template <typename U = T>
    operator->() const → std::enable_if_t<!std::is_void_v<U>, instance_type> *
  • side_effect(host_object<T> & object, handler & cgh) → explicit
  • side_effect(const host_object<T> & object, handler & cgh) → explicit
  • side_effect(const side_effect<T, Order> & other)
  • side_effect(ctor_internal_tag, const host_object<T> & object, handler & cgh)

Member Functions

template <typename U = T>
std::enable_if_t<!std::is_void_v<U>,
                 instance_type>&
operator*() const

Template Parameters

U = T

template <typename U = T>
std::enable_if_t<!std::is_void_v<U>,
                 instance_type>*
operator->() const

Template Parameters

U = T

explicit side_effect(host_object<T>& object,
                     handler& cgh)

Parameters

host_object<T>& object
handler& cgh

explicit side_effect(const host_object<T>& object,
                     handler& cgh)

Parameters

const host_object<T>& object
handler& cgh

side_effect(const side_effect<T, Order>& other)

Parameters

const side_effect<T, Order>& other

side_effect(ctor_internal_tag,
            const host_object<T>& object,
            handler& cgh)

Parameters

ctor_internal_tag
const host_object<T>& object
handler& cgh