use signed ints for HIP
This commit is contained in:
parent
9a69d3d5d9
commit
66aaec281f
@ -22,7 +22,7 @@ void check_error(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
HIPStream<T>::HIPStream(const unsigned int ARRAY_SIZE, const int device_index)
|
HIPStream<T>::HIPStream(const int ARRAY_SIZE, const int device_index)
|
||||||
{
|
{
|
||||||
|
|
||||||
// The array size must be divisible by TBSIZE for kernel launches
|
// The array size must be divisible by TBSIZE for kernel launches
|
||||||
@ -183,7 +183,7 @@ void HIPStream<T>::triad()
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
__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];
|
__shared__ T tb_sum[TBSIZE];
|
||||||
|
|
||||||
|
|||||||
@ -20,7 +20,7 @@ class HIPStream : public Stream<T>
|
|||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
// Size of arrays
|
// Size of arrays
|
||||||
unsigned int array_size;
|
int array_size;
|
||||||
|
|
||||||
// Host array for partial sums for dot kernel
|
// Host array for partial sums for dot kernel
|
||||||
T *sums;
|
T *sums;
|
||||||
@ -34,7 +34,7 @@ class HIPStream : public Stream<T>
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
HIPStream(const unsigned int, const int);
|
HIPStream(const int, const int);
|
||||||
~HIPStream();
|
~HIPStream();
|
||||||
|
|
||||||
virtual void copy() override;
|
virtual void copy() override;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user