QMCPACK
Queue< PlatformKind::OMPTARGET > Class Template Reference
+ Collaboration diagram for Queue< PlatformKind::OMPTARGET >:

Public Member Functions

template<class DSC >
void enqueueH2D (DSC &dataset, typename DSC::size_type size=0, typename DSC::size_type offset=0)
 
template<class DSC >
void enqueueD2H (DSC &dataset, typename DSC::size_type size=0, typename DSC::size_type offset=0)
 
void sync ()
 

Detailed Description

template<>
class qmcplusplus::compute::Queue< PlatformKind::OMPTARGET >

Definition at line 24 of file QueueOMPTarget.hpp.

Member Function Documentation

◆ enqueueD2H()

void enqueueD2H ( DSC &  dataset,
typename DSC::size_type  size = 0,
typename DSC::size_type  offset = 0 
)
inline

Definition at line 46 of file QueueOMPTarget.hpp.

47  {
48  if (dataset.data() == dataset.device_data())
49  return;
50 
51  auto host_ptr = dataset.data();
52  if (size == 0)
53  {
54  PRAGMA_OFFLOAD("omp target update from(host_ptr[offset:dataset.size()])")
55  }
56  else
57  {
58  PRAGMA_OFFLOAD("omp target update from(host_ptr[offset:size])")
59  }
60  }

◆ enqueueH2D()

void enqueueH2D ( DSC &  dataset,
typename DSC::size_type  size = 0,
typename DSC::size_type  offset = 0 
)
inline

Definition at line 29 of file QueueOMPTarget.hpp.

30  {
31  if (dataset.data() == dataset.device_data())
32  return;
33 
34  auto host_ptr = dataset.data();
35  if (size == 0)
36  {
37  PRAGMA_OFFLOAD("omp target update to(host_ptr[offset:dataset.size()])")
38  }
39  else
40  {
41  PRAGMA_OFFLOAD("omp target update to(host_ptr[offset:size])")
42  }
43  }

◆ sync()

void sync ( )
inline

Definition at line 62 of file QueueOMPTarget.hpp.

62 {}

The documentation for this class was generated from the following file: