Added the Kokkos and RAJA implementations
This commit is contained in:
parent
530b2adda2
commit
7c28a6386b
13
main.cpp
13
main.cpp
@ -22,9 +22,12 @@
|
|||||||
#include "CUDAStream.h"
|
#include "CUDAStream.h"
|
||||||
#elif defined(OCL)
|
#elif defined(OCL)
|
||||||
#include "OCLStream.h"
|
#include "OCLStream.h"
|
||||||
|
#elif defined(RAJA)
|
||||||
|
#include "RAJAStream.hpp"
|
||||||
|
#elif defined(KOKKOS)
|
||||||
|
#include "KOKKOSStream.hpp"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
unsigned int ARRAY_SIZE = 52428800;
|
unsigned int ARRAY_SIZE = 52428800;
|
||||||
unsigned int num_times = 10;
|
unsigned int num_times = 10;
|
||||||
unsigned int deviceIndex = 0;
|
unsigned int deviceIndex = 0;
|
||||||
@ -80,6 +83,14 @@ void run()
|
|||||||
// Use the OpenCL implementation
|
// Use the OpenCL implementation
|
||||||
stream = new OCLStream<T>(ARRAY_SIZE, deviceIndex);
|
stream = new OCLStream<T>(ARRAY_SIZE, deviceIndex);
|
||||||
|
|
||||||
|
#elif defined(RAJA)
|
||||||
|
// Use the RAJA implementation
|
||||||
|
stream = new RAJAStream<T>(ARRAY_SIZE, deviceIndex);
|
||||||
|
|
||||||
|
#elif defined(KOKKOS)
|
||||||
|
// Use the Kokkos implementation
|
||||||
|
stream = new KOKKOSStream<T>(ARRAY_SIZE, deviceIndex);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
stream->write_arrays(a, b, c);
|
stream->write_arrays(a, b, c);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user