Skip to main content

class cgf_diagnostics

Declaration

class cgf_diagnostics { /* full declaration omitted */ };

Member Variables

bool m_is_checking = false
std::optional<target> m_expected_target = std::nullopt
const buffer_access_map* m_expected_buffer_accesses = nullptr
std::vector<bool> m_registered_buffer_accesses
size_t m_expected_side_effects_count = 0
size_t m_registered_side_effect_count = 0
static std::unique_ptr<cgf_diagnostics> m_instance

Member Function Overview

  • cgf_diagnostics(const cgf_diagnostics &)
  • cgf_diagnostics(cgf_diagnostics &&)
  • template <target Tgt, typename Closure, std::enable_if_t<Tgt == target::device, int> = 0>
    check(const Closure & kernel, const buffer_access_map & buffer_accesses) → void
  • template <target Tgt, typename Closure, std::enable_if_t<Tgt == target::host_task, int> = 0>
    check(const Closure & kernel, const buffer_access_map & buffer_accesses, size_t non_void_side_effects_count) → void
  • get_instance() → static cgf_diagnostics &
  • is_available() → static bool
  • is_checking() const → bool
  • make_available() → static void
  • operator=(const cgf_diagnostics &) → cgf_diagnostics
  • operator=(cgf_diagnostics &&) → cgf_diagnostics
  • register_accessor(hydration_id hid, target tgt) → void
  • register_side_effect() → void
  • teardown() → static void
  • ~cgf_diagnostics()
  • cgf_diagnostics()
  • template <typename Closure>
    check(target tgt, const Closure & kernel, const buffer_access_map * buffer_accesses, size_t expected_side_effects_count) → void

Member Functions

cgf_diagnostics(const cgf_diagnostics&)

Parameters

const cgf_diagnostics&

cgf_diagnostics(cgf_diagnostics&&)

Parameters

cgf_diagnostics&&

template <target Tgt,
          typename Closure,
          std::enable_if_t<Tgt == target::device,
                           int> = 0>
void check(
    const Closure& kernel,
    const buffer_access_map& buffer_accesses)

Template Parameters

target Tgt
Closure
std::enable_if_t<Tgt == target::device, int> = 0

Parameters

const Closure& kernel
const buffer_access_map& buffer_accesses

template <
    target Tgt,
    typename Closure,
    std::enable_if_t<Tgt == target::host_task,
                     int> = 0>
void check(
    const Closure& kernel,
    const buffer_access_map& buffer_accesses,
    size_t non_void_side_effects_count)

Template Parameters

target Tgt
Closure
std::enable_if_t<Tgt == target::host_task, int> = 0

Parameters

const Closure& kernel
const buffer_access_map& buffer_accesses
size_t non_void_side_effects_count

static cgf_diagnostics& get_instance()


static bool is_available()


bool is_checking() const


static void make_available()


cgf_diagnostics operator=(const cgf_diagnostics&)

Parameters

const cgf_diagnostics&

cgf_diagnostics operator=(cgf_diagnostics&&)

Parameters

cgf_diagnostics&&

void register_accessor(hydration_id hid,
                       target tgt)

Parameters

hydration_id hid
target tgt

void register_side_effect()


static void teardown()


~cgf_diagnostics()


cgf_diagnostics()


template <typename Closure>
void check(
    target tgt,
    const Closure& kernel,
    const buffer_access_map* buffer_accesses,
    size_t expected_side_effects_count)

Template Parameters

Closure

Parameters

target tgt
const Closure& kernel
const buffer_access_map* buffer_accesses
size_t expected_side_effects_count