Merge branch 'master' into kernel-dot
This commit is contained in:
commit
829d21c1d6
@ -21,6 +21,12 @@ RAJAStream<T>::RAJAStream(const unsigned int ARRAY_SIZE, const int device_index)
|
|||||||
d_a = new T[ARRAY_SIZE];
|
d_a = new T[ARRAY_SIZE];
|
||||||
d_b = new T[ARRAY_SIZE];
|
d_b = new T[ARRAY_SIZE];
|
||||||
d_c = new T[ARRAY_SIZE];
|
d_c = new T[ARRAY_SIZE];
|
||||||
|
forall<policy>(index_set, [=] RAJA_DEVICE (int index)
|
||||||
|
{
|
||||||
|
d_a[index] = 0.0;
|
||||||
|
d_b[index] = 0.0;
|
||||||
|
d_c[index] = 0.0;
|
||||||
|
});
|
||||||
#else
|
#else
|
||||||
cudaMallocManaged((void**)&d_a, sizeof(T)*ARRAY_SIZE, cudaMemAttachGlobal);
|
cudaMallocManaged((void**)&d_a, sizeof(T)*ARRAY_SIZE, cudaMemAttachGlobal);
|
||||||
cudaMallocManaged((void**)&d_b, sizeof(T)*ARRAY_SIZE, cudaMemAttachGlobal);
|
cudaMallocManaged((void**)&d_b, sizeof(T)*ARRAY_SIZE, cudaMemAttachGlobal);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user