From 66aaec281fa1842cd3c5cc7754a59a847c76f9e0 Mon Sep 17 00:00:00 2001 From: Tom Deakin Date: Tue, 12 Jan 2021 10:24:27 +0000 Subject: [PATCH] use signed ints for HIP --- HIPStream.cpp | 4 ++-- HIPStream.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/HIPStream.cpp b/HIPStream.cpp index ede0256..d790ee5 100644 --- a/HIPStream.cpp +++ b/HIPStream.cpp @@ -22,7 +22,7 @@ void check_error(void) } template -HIPStream::HIPStream(const unsigned int ARRAY_SIZE, const int device_index) +HIPStream::HIPStream(const int ARRAY_SIZE, const int device_index) { // The array size must be divisible by TBSIZE for kernel launches @@ -183,7 +183,7 @@ void HIPStream::triad() } template -__global__ void dot_kernel(const T * a, const T * b, T * sum, unsigned int array_size) +__global__ void dot_kernel(const T * a, const T * b, T * sum, int array_size) { __shared__ T tb_sum[TBSIZE]; diff --git a/HIPStream.h b/HIPStream.h index 9209388..fdab392 100644 --- a/HIPStream.h +++ b/HIPStream.h @@ -20,7 +20,7 @@ class HIPStream : public Stream { protected: // Size of arrays - unsigned int array_size; + int array_size; // Host array for partial sums for dot kernel T *sums; @@ -34,7 +34,7 @@ class HIPStream : public Stream public: - HIPStream(const unsigned int, const int); + HIPStream(const int, const int); ~HIPStream(); virtual void copy() override;