Intel(R) Threading Building Blocks Doxygen Documentation  version 4.2.3
tbb::flow::interface9::gfx_offload Namespace Reference

Typedefs

typedef GfxTaskId task_id_type
 

Functions

void throw_gfx_exception ()
 
void check_enqueue_retcode (task_id_type err)
 
void check_gfx_retcode (task_id_type err)
 
template<typename DataType , typename SizeType >
void share (DataType *p, SizeType n)
 
template<typename DataType >
void unshare (DataType *p)
 
template<typename T >
T * raw_data (gfx_buffer< T > &buffer)
 
template<typename T >
const T * raw_data (const gfx_buffer< T > &buffer)
 
template<typename T >
T & raw_data (T &data)
 
template<typename T >
const T & raw_data (const T &data)
 
template<typename F , typename ... ArgType>
task_id_type run_kernel (F ptr, ArgType &... args)
 
void wait_for_task (task_id_type id)
 

Typedef Documentation

◆ task_id_type

Definition at line 48 of file gfx_factory.h.

Function Documentation

◆ check_enqueue_retcode()

void tbb::flow::interface9::gfx_offload::check_enqueue_retcode ( task_id_type  err)
inline

Definition at line 63 of file gfx_factory.h.

63  {
64  if (err == 0) {
66  }
67  }

References throw_gfx_exception().

Referenced by run_kernel().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ check_gfx_retcode()

void tbb::flow::interface9::gfx_offload::check_gfx_retcode ( task_id_type  err)
inline

Definition at line 69 of file gfx_factory.h.

69  {
70  if (err != GFX_SUCCESS) {
72  }
73  }

References throw_gfx_exception().

Referenced by share(), unshare(), and wait_for_task().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ raw_data() [1/4]

template<typename T >
T* tbb::flow::interface9::gfx_offload::raw_data ( gfx_buffer< T > &  buffer)

Definition at line 88 of file gfx_factory.h.

88 { return buffer.data(); }

References tbb::flow::interface9::gfx_buffer< T >::data().

Referenced by run_kernel().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ raw_data() [2/4]

template<typename T >
const T* tbb::flow::interface9::gfx_offload::raw_data ( const gfx_buffer< T > &  buffer)

Definition at line 90 of file gfx_factory.h.

90 { return buffer.data(); }

References tbb::flow::interface9::gfx_buffer< T >::data().

Here is the call graph for this function:

◆ raw_data() [3/4]

template<typename T >
T& tbb::flow::interface9::gfx_offload::raw_data ( T &  data)

Definition at line 92 of file gfx_factory.h.

92 { return data; }
void const char const char int ITT_FORMAT __itt_group_sync x void const char ITT_FORMAT __itt_group_sync s void ITT_FORMAT __itt_group_sync p void ITT_FORMAT p void ITT_FORMAT p no args __itt_suppress_mode_t unsigned int void size_t ITT_FORMAT d void ITT_FORMAT p void ITT_FORMAT p __itt_model_site __itt_model_site_instance ITT_FORMAT p __itt_model_task __itt_model_task_instance ITT_FORMAT p void ITT_FORMAT p void ITT_FORMAT p void size_t ITT_FORMAT d void ITT_FORMAT p const wchar_t ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s no args void ITT_FORMAT p size_t ITT_FORMAT d no args const wchar_t const wchar_t ITT_FORMAT s __itt_heap_function void size_t int ITT_FORMAT d __itt_heap_function void ITT_FORMAT p __itt_heap_function void void size_t int ITT_FORMAT d no args no args unsigned int ITT_FORMAT u const __itt_domain __itt_id ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain __itt_id ITT_FORMAT p const __itt_domain __itt_id __itt_timestamp __itt_timestamp ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain ITT_FORMAT p const __itt_domain __itt_string_handle unsigned long long ITT_FORMAT lu const __itt_domain __itt_id __itt_string_handle __itt_metadata_type size_t void * data

References data.

◆ raw_data() [4/4]

template<typename T >
const T& tbb::flow::interface9::gfx_offload::raw_data ( const T &  data)

Definition at line 94 of file gfx_factory.h.

94 { return data; }
void const char const char int ITT_FORMAT __itt_group_sync x void const char ITT_FORMAT __itt_group_sync s void ITT_FORMAT __itt_group_sync p void ITT_FORMAT p void ITT_FORMAT p no args __itt_suppress_mode_t unsigned int void size_t ITT_FORMAT d void ITT_FORMAT p void ITT_FORMAT p __itt_model_site __itt_model_site_instance ITT_FORMAT p __itt_model_task __itt_model_task_instance ITT_FORMAT p void ITT_FORMAT p void ITT_FORMAT p void size_t ITT_FORMAT d void ITT_FORMAT p const wchar_t ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s no args void ITT_FORMAT p size_t ITT_FORMAT d no args const wchar_t const wchar_t ITT_FORMAT s __itt_heap_function void size_t int ITT_FORMAT d __itt_heap_function void ITT_FORMAT p __itt_heap_function void void size_t int ITT_FORMAT d no args no args unsigned int ITT_FORMAT u const __itt_domain __itt_id ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain __itt_id ITT_FORMAT p const __itt_domain __itt_id __itt_timestamp __itt_timestamp ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain ITT_FORMAT p const __itt_domain __itt_string_handle unsigned long long ITT_FORMAT lu const __itt_domain __itt_id __itt_string_handle __itt_metadata_type size_t void * data

References data.

◆ run_kernel()

template<typename F , typename ... ArgType>
task_id_type tbb::flow::interface9::gfx_offload::run_kernel ( ptr,
ArgType &...  args 
)

Definition at line 98 of file gfx_factory.h.

98  {
99  task_id_type id = _GFX_offload(ptr, raw_data(args)...);
100 
101  // Check if something during offload went wrong (ex: driver initialization failure)
103 
104  return id;
105  }
void const char const char int ITT_FORMAT __itt_group_sync x void const char ITT_FORMAT __itt_group_sync s void ITT_FORMAT __itt_group_sync p void ITT_FORMAT p void ITT_FORMAT p no args __itt_suppress_mode_t unsigned int void size_t ITT_FORMAT d void ITT_FORMAT p void ITT_FORMAT p __itt_model_site __itt_model_site_instance ITT_FORMAT p __itt_model_task __itt_model_task_instance ITT_FORMAT p void ITT_FORMAT p void ITT_FORMAT p void size_t ITT_FORMAT d void ITT_FORMAT p const wchar_t ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s no args void ITT_FORMAT p size_t ITT_FORMAT d no args const wchar_t const wchar_t ITT_FORMAT s __itt_heap_function void size_t int ITT_FORMAT d __itt_heap_function void ITT_FORMAT p __itt_heap_function void void size_t int ITT_FORMAT d no args no args unsigned int ITT_FORMAT u const __itt_domain __itt_id id
void check_enqueue_retcode(task_id_type err)
Definition: gfx_factory.h:63
const T & raw_data(const T &data)
Definition: gfx_factory.h:94

References check_enqueue_retcode(), id, and raw_data().

Referenced by tbb::flow::interface9::gfx_factory::send_kernel().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ share()

template<typename DataType , typename SizeType >
void tbb::flow::interface9::gfx_offload::share ( DataType *  p,
SizeType  n 
)

Definition at line 81 of file gfx_factory.h.

81 { check_gfx_retcode(_GFX_share(p, sizeof(*p)*n)); }
void const char const char int ITT_FORMAT __itt_group_sync p
void check_gfx_retcode(task_id_type err)
Definition: gfx_factory.h:69

References check_gfx_retcode(), and p.

Referenced by tbb::flow::interface9::gfx_factory::share_data().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ throw_gfx_exception()

void tbb::flow::interface9::gfx_offload::throw_gfx_exception ( )
inline

Definition at line 57 of file gfx_factory.h.

57  {
58  std::string msg = "GFX error occurred: " + std::to_string(_GFX_get_last_error());
59  std::cerr << msg << std::endl;
60  throw msg;
61  }

Referenced by check_enqueue_retcode(), and check_gfx_retcode().

Here is the caller graph for this function:

◆ unshare()

template<typename DataType >
void tbb::flow::interface9::gfx_offload::unshare ( DataType *  p)

Definition at line 83 of file gfx_factory.h.

83 { check_gfx_retcode(_GFX_unshare(p)); }
void const char const char int ITT_FORMAT __itt_group_sync p
void check_gfx_retcode(task_id_type err)
Definition: gfx_factory.h:69

References check_gfx_retcode(), and p.

Referenced by tbb::flow::interface9::gfx_factory::unshare_data().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ wait_for_task()

void tbb::flow::interface9::gfx_offload::wait_for_task ( task_id_type  id)

Definition at line 108 of file gfx_factory.h.

108 { check_gfx_retcode(_GFX_wait(id)); }
void check_gfx_retcode(task_id_type err)
Definition: gfx_factory.h:69

References check_gfx_retcode().

Referenced by tbb::flow::interface9::gfx_factory::callback().

Here is the call graph for this function:
Here is the caller graph for this function:

Copyright © 2005-2019 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its subsidiaries in the United States and other countries.

* Other names and brands may be claimed as the property of others.