diff --git a/OMPStream.cpp b/OMPStream.cpp index ee971b2..6b2800d 100644 --- a/OMPStream.cpp +++ b/OMPStream.cpp @@ -12,7 +12,7 @@ #endif template -OMPStream::OMPStream(const unsigned int ARRAY_SIZE, int device) +OMPStream::OMPStream(const int ARRAY_SIZE, int device) { array_size = ARRAY_SIZE; @@ -38,7 +38,7 @@ OMPStream::~OMPStream() { #ifdef OMP_TARGET_GPU // End data region on device - unsigned int array_size = this->array_size; + int array_size = this->array_size; T *a = this->a; T *b = this->b; T *c = this->c; @@ -53,7 +53,7 @@ OMPStream::~OMPStream() template void OMPStream::init_arrays(T initA, T initB, T initC) { - unsigned int array_size = this->array_size; + int array_size = this->array_size; #ifdef OMP_TARGET_GPU T *a = this->a; T *b = this->b; @@ -101,7 +101,7 @@ template void OMPStream::copy() { #ifdef OMP_TARGET_GPU - unsigned int array_size = this->array_size; + int array_size = this->array_size; T *a = this->a; T *c = this->c; #pragma omp target teams distribute parallel for simd @@ -125,7 +125,7 @@ void OMPStream::mul() const T scalar = startScalar; #ifdef OMP_TARGET_GPU - unsigned int array_size = this->array_size; + int array_size = this->array_size; T *b = this->b; T *c = this->c; #pragma omp target teams distribute parallel for simd @@ -147,7 +147,7 @@ template void OMPStream::add() { #ifdef OMP_TARGET_GPU - unsigned int array_size = this->array_size; + int array_size = this->array_size; T *a = this->a; T *b = this->b; T *c = this->c; @@ -172,7 +172,7 @@ void OMPStream::triad() const T scalar = startScalar; #ifdef OMP_TARGET_GPU - unsigned int array_size = this->array_size; + int array_size = this->array_size; T *a = this->a; T *b = this->b; T *c = this->c; @@ -197,7 +197,7 @@ T OMPStream::dot() T sum = 0.0; #ifdef OMP_TARGET_GPU - unsigned int array_size = this->array_size; + int array_size = this->array_size; T *a = this->a; T *b = this->b; #pragma omp target teams distribute parallel for simd map(tofrom: sum) reduction(+:sum) diff --git a/OMPStream.h b/OMPStream.h index d8e9dc4..8c93986 100644 --- a/OMPStream.h +++ b/OMPStream.h @@ -21,7 +21,7 @@ class OMPStream : public Stream { protected: // Size of arrays - unsigned int array_size; + int array_size; // Device side pointers T *a; @@ -29,7 +29,7 @@ class OMPStream : public Stream T *c; public: - OMPStream(const unsigned int, int); + OMPStream(const int, int); ~OMPStream(); virtual void copy() override;