parent
d12af1075c
commit
6d11c72382
@ -4,6 +4,7 @@ All notable changes to this project will be documented in this file.
|
||||
## Unreleased
|
||||
### Added
|
||||
- Ability to build Kokkos and RAJA versions against existing packages.
|
||||
- Thrust managed memory.
|
||||
|
||||
### Changed
|
||||
- RAJA CUDA CMake build issues resolved.
|
||||
|
||||
@ -8,7 +8,11 @@
|
||||
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
#if defined(MANAGED)
|
||||
#include <thrust/universal_vector.h>
|
||||
#else
|
||||
#include <thrust/device_vector.h>
|
||||
#endif
|
||||
|
||||
#include "Stream.h"
|
||||
|
||||
@ -21,9 +25,15 @@ class ThrustStream : public Stream<T>
|
||||
// Size of arrays
|
||||
int array_size;
|
||||
|
||||
#if defined(MANAGED)
|
||||
thrust::universtal_vector<T> a;
|
||||
thrust::universtal_vector<T> b;
|
||||
thrust::universtal_vector<T> c;
|
||||
#else
|
||||
thrust::device_vector<T> a;
|
||||
thrust::device_vector<T> b;
|
||||
thrust::device_vector<T> c;
|
||||
#endif
|
||||
|
||||
public:
|
||||
ThrustStream(const int, int);
|
||||
|
||||
@ -18,6 +18,9 @@ register_flag_optional(BACKEND
|
||||
"
|
||||
"CUDA")
|
||||
|
||||
register_flag_optional(MANAGED "Enabled managed memory mode."
|
||||
"OFF")
|
||||
|
||||
register_flag_optional(CMAKE_CUDA_COMPILER
|
||||
"[THRUST_IMPL==CUDA] Path to the CUDA nvcc compiler"
|
||||
"")
|
||||
@ -34,6 +37,9 @@ register_flag_optional(CUDA_EXTRA_FLAGS
|
||||
|
||||
macro(setup)
|
||||
set(CMAKE_CXX_STANDARD 14)
|
||||
if (MANAGED)
|
||||
register_definitions(MANAGED)
|
||||
endif ()
|
||||
|
||||
if (${THRUST_IMPL} STREQUAL "CUDA")
|
||||
|
||||
@ -91,4 +97,4 @@ macro(setup)
|
||||
endmacro()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user