44 #ifndef KOKKOS_ROCM_HPP 
   45 #define KOKKOS_ROCM_HPP 
   47 #include <Kokkos_Core_fwd.hpp> 
   49 #if defined( KOKKOS_ENABLE_ROCM ) 
   54 dim3(
int _x, 
int _y, 
int _z):x(_x),y(_y),z(_z) {};
 
   57 #include <ROCm/hc_math_std.hpp> 
   63 #include <Kokkos_HostSpace.hpp> 
   64 #include <Kokkos_ROCmSpace.hpp> 
   65 #include <ROCm/Kokkos_ROCm_Exec.hpp> 
   66 #include <Kokkos_ScratchSpace.hpp> 
   69 #include <impl/Kokkos_Tags.hpp> 
   77 #if defined( __HCC_ACCELERATOR__ ) 
   79 using namespace ::Concurrency::precise_math ;
 
   94 namespace Experimental {
 
  104   typedef ROCm                  execution_space ;
 
  105   typedef ROCmSpace             memory_space ;
 
  106   typedef Kokkos::Device<execution_space,memory_space> device_type;
 
  108   typedef LayoutLeft            array_layout ;
 
  109   typedef HostSpace::size_type  size_type ;
 
  111   typedef ScratchMemorySpace< ROCm > scratch_memory_space ;
 
  117   ROCm( ROCm && ) = default ;
 
  118   ROCm( 
const ROCm & ) = default ;
 
  119   ROCm & operator = ( ROCm && ) = default ;
 
  120   ROCm & operator = ( 
const ROCm & ) = default ;
 
  128   KOKKOS_INLINE_FUNCTION 
static int in_parallel() {
 
  129 #if defined( __HCC_ACCELERATOR__ ) 
  137   static bool sleep() ;
 
  143   static void impl_static_fence();
 
  145   #ifdef KOKKOS_ENABLE_DEPRECATED_CODE 
  161   struct SelectDevice {
 
  163     SelectDevice() : rocm_device_id(1) {}
 
  164     explicit SelectDevice( 
int id ) : rocm_device_id( id+1 ) {}
 
  167   int          rocm_device()
 const { 
return m_device ; }
 
  169   bool         isAPU(
int device);
 
  171   static void initialize( 
const SelectDevice = SelectDevice());
 
  173   static int is_initialized();
 
  180   static int concurrency() ;
 
  181   static const char* name();
 
  193 struct MemorySpaceAccess
 
  194   < Kokkos::Experimental::ROCmSpace
 
  195   , Kokkos::Experimental::ROCm::scratch_memory_space
 
  198   enum { assignable = 
false };
 
  199   enum { accessible = 
true };
 
  200   enum { deepcopy   = 
false };
 
  204 struct VerifyExecutionCanAccessMemorySpace
 
  205   < Kokkos::Experimental::ROCm::memory_space
 
  206   , Kokkos::Experimental::ROCm::scratch_memory_space
 
  209   enum { value = 
true };
 
  210   KOKKOS_INLINE_FUNCTION 
static void verify( 
void ) { }
 
  211   KOKKOS_INLINE_FUNCTION 
static void verify( 
const void * ) { }
 
  215 struct VerifyExecutionCanAccessMemorySpace
 
  217   , Kokkos::Experimental::ROCm::scratch_memory_space
 
  220   enum { value = 
false };
 
  221   inline static void verify( 
void ) { Kokkos::Experimental::ROCmSpace::access_error(); }
 
  222   inline static void verify( 
const void * p ) { Kokkos::Experimental::ROCmSpace::access_error(p); }
 
  232 #define threadIdx_x (hc_get_workitem_id(0)) 
  233 #define threadIdx_y (hc_get_workitem_id(1)) 
  234 #define threadIdx_z (hc_get_workitem_id(2)) 
  236 #define blockIdx_x  (hc_get_group_id(0)) 
  237 #define blockIdx_y  (hc_get_group_id(1)) 
  238 #define blockIdx_z  (hc_get_group_id(2)) 
  240 #define blockDim_x  (hc_get_group_size(0)) 
  241 #define blockDim_y  (hc_get_group_size(1)) 
  242 #define blockDim_z  (hc_get_group_size(2)) 
  244 #define gridDim_x   (hc_get_num_groups(0)) 
  245 #define gridDim_y   (hc_get_num_groups(1)) 
  246 #define gridDim_z   (hc_get_num_groups(2)) 
  249 #include <ROCm/Kokkos_ROCm_Parallel.hpp> 
  250 #include <ROCm/Kokkos_ROCm_Task.hpp> 
void print_configuration(std::ostream &, const bool detail=false)
Print "Bill of Materials". 
 
Declaration of various MemoryLayout options. 
 
Declaration of parallel operators. 
 
void finalize()
Finalize the spaces that were initialized via Kokkos::initialize.