OpenFPM_pdata  4.1.0
Project that contain the implementation of distributed structures
 
Loading...
Searching...
No Matches
cudify_hardware_alpaka.hpp
1#ifndef CUDIFY_ALPAKA_HARDWARE_HPP_
2#define CUDIFY_ALPAKA_HARDWARE_HPP_
3
4//#define ALPAKA_ACC_CPU_B_SEQ_T_SEQ_ENABLED
5//#define ALPAKA_ACC_CPU_B_SEQ_T_FIBERS_ENABLED
6#define ALPAKA_ACC_CPU_B_SEQ_T_FIBERS_ENABLED
7//#define ALPAKA_ACC_CPU_B_OMP2_T_SEQ_ENABLED
8//#define ALPAKA_ACC_CPU_B_SEQ_T_OMP2_ENABLED
9//#define ALPAKA_ACC_CPU_B_TBB_T_SEQ_ENABLED
10//#define ALPAKA_ACC_CPU_B_SEQ_T_THREADS_ENABLED
11//#define ALPAKA_ACC_ANY_BT_OACC_ENABLED
12//#define ALPAKA_ACC_ANY_BT_OMP5_ENABLED
13
14#include "util/cudify/cudify_hardware_cpu.hpp"
15#include <alpaka/alpaka.hpp>
16
17
18using Dim_alpa = alpaka::DimInt<3>;
19using Idx_alpa = std::size_t;
20
21#ifdef ALPAKA_ACC_CPU_B_SEQ_T_FIBERS_ENABLED
22using Acc_alpa = alpaka::AccCpuFibers<Dim_alpa, Idx_alpa>;
23#elif defined(ALPAKA_ACC_ANY_BT_OMP5_ENABLED)
24using Acc_alpa = alpaka::AccOmp5<Dim_alpa, Idx_alpa>;
25#endif
26
27using QueueProperty_alpa = alpaka::Blocking;
28using Queue_alpa = alpaka::Queue<Acc_alpa, QueueProperty_alpa>;
29
30using Vec_alpa = alpaka::Vec<Dim_alpa, Idx_alpa>;
31
32using WorkDiv_alpa = alpaka::WorkDivMembers<Dim_alpa, Idx_alpa>;
33
34typedef decltype(alpaka::getDevByIdx<Acc_alpa>(0u)) AccType_alpa;
35
37{
38 AccType_alpa * devAcc;
39 Queue_alpa * queue;
40
41 const Acc_alpa * accKer;
42 bool initialized = false;
43
44};
45
46
47#endif