From c534600d04a78a3ec77e1818a291d6cae728b7c3 Mon Sep 17 00:00:00 2001 From: Tom Deakin Date: Thu, 6 Apr 2017 10:36:01 +0100 Subject: [PATCH] [RAJA] Use Index_type for iterator index type instead of hardcoding int --- RAJAStream.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/RAJAStream.cpp b/RAJAStream.cpp index 6c6098e..395a6ee 100644 --- a/RAJAStream.cpp +++ b/RAJAStream.cpp @@ -53,7 +53,7 @@ void RAJAStream::init_arrays(T initA, T initB, T initC) T* RAJA_RESTRICT a = d_a; T* RAJA_RESTRICT b = d_b; T* RAJA_RESTRICT c = d_c; - forall(index_set, [=] RAJA_DEVICE (int index) + forall(index_set, [=] RAJA_DEVICE (RAJA::Index_type index) { a[index] = initA; b[index] = initB; @@ -75,7 +75,7 @@ void RAJAStream::copy() { T* RAJA_RESTRICT a = d_a; T* RAJA_RESTRICT c = d_c; - forall(index_set, [=] RAJA_DEVICE (int index) + forall(index_set, [=] RAJA_DEVICE (RAJA::Index_type index) { c[index] = a[index]; }); @@ -87,7 +87,7 @@ void RAJAStream::mul() T* RAJA_RESTRICT b = d_b; T* RAJA_RESTRICT c = d_c; const T scalar = startScalar; - forall(index_set, [=] RAJA_DEVICE (int index) + forall(index_set, [=] RAJA_DEVICE (RAJA::Index_type index) { b[index] = scalar*c[index]; }); @@ -99,7 +99,7 @@ void RAJAStream::add() T* RAJA_RESTRICT a = d_a; T* RAJA_RESTRICT b = d_b; T* RAJA_RESTRICT c = d_c; - forall(index_set, [=] RAJA_DEVICE (int index) + forall(index_set, [=] RAJA_DEVICE (RAJA::Index_type index) { c[index] = a[index] + b[index]; }); @@ -112,7 +112,7 @@ void RAJAStream::triad() T* RAJA_RESTRICT b = d_b; T* RAJA_RESTRICT c = d_c; const T scalar = startScalar; - forall(index_set, [=] RAJA_DEVICE (int index) + forall(index_set, [=] RAJA_DEVICE (RAJA::Index_type index) { a[index] = b[index] + scalar*c[index]; }); @@ -126,7 +126,7 @@ T RAJAStream::dot() RAJA::ReduceSum sum(0.0); - forall(index_set, [=] RAJA_DEVICE (int index) + forall(index_set, [=] RAJA_DEVICE (RAJA::Index_type index) { sum += a[index] * b[index]; });