From ceada6922f19449af7b64d3d0ded84dd4188afa2 Mon Sep 17 00:00:00 2001 From: Peter Steinbach Date: Tue, 28 Feb 2017 10:07:48 +0100 Subject: [PATCH] proper declaration of tb_sum with HIP_DYNAMIC_SHARED macro --- HIPStream.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/HIPStream.cpp b/HIPStream.cpp index edbcac1..648b62a 100644 --- a/HIPStream.cpp +++ b/HIPStream.cpp @@ -188,9 +188,9 @@ template __global__ void dot_kernel(hipLaunchParm lp, const T * a, const T * b, T * sum, unsigned int array_size) { - //extern __shared__ __align__(sizeof(T)) unsigned char smem[]; - HIP_DYNAMIC_SHARED(unsigned char,smem); - T *tb_sum = reinterpret_cast(smem); + HIP_DYNAMIC_SHARED(T,tb_sum); + // HIP_DYNAMIC_SHARED(unsigned char,smem); + // T *tb_sum = reinterpret_cast(smem); int i = hipBlockDim_x * hipBlockIdx_x + hipThreadIdx_x; const size_t local_i = hipThreadIdx_x;