SWDEV-253247: add ulong and ulonglong version of__shfl*
Change-Id: I40ab6cfa12175f334e8392b71f567054d8256e2a
This commit is contained in:
committato da
Sarbojit Sarkar
parent
4b6d92798f
commit
bf20337fc1
@@ -57,6 +57,15 @@ void matrixTransposeCPUReference(T* output, T* input, const unsigned int width)
|
||||
}
|
||||
}
|
||||
|
||||
void getFactor(int& fact) { fact = 101; }
|
||||
void getFactor(unsigned int& fact) { fact = static_cast<unsigned int>(INT32_MAX)+1; }
|
||||
void getFactor(float& fact) { fact = 2.5; }
|
||||
void getFactor(double& fact) { fact = 2.5; }
|
||||
void getFactor(long& fact) { fact = 202; }
|
||||
void getFactor(unsigned long& fact) { fact = static_cast<unsigned long>(__LONG_MAX__)+1; }
|
||||
void getFactor(long long& fact) { fact = 303; }
|
||||
void getFactor(unsigned long long& fact) { fact = static_cast<unsigned long long>(__LONG_LONG_MAX__)+1; }
|
||||
|
||||
template<typename T>
|
||||
void runTest() {
|
||||
T* Matrix;
|
||||
@@ -77,8 +86,10 @@ void runTest() {
|
||||
cpuTransposeMatrix = (T*)malloc(NUM * sizeof(T));
|
||||
|
||||
// initialize the input data
|
||||
T factor;
|
||||
getFactor(factor);
|
||||
for (i = 0; i < NUM; i++) {
|
||||
Matrix[i] = (T)i * 10l;
|
||||
Matrix[i] = (T)i + factor;
|
||||
}
|
||||
|
||||
// allocate the memory on the device side
|
||||
@@ -124,7 +135,11 @@ void runTest() {
|
||||
int main() {
|
||||
runTest<int>();
|
||||
runTest<float>();
|
||||
runTest<double>();
|
||||
runTest<long>();
|
||||
runTest<long long>();
|
||||
runTest<unsigned int>();
|
||||
runTest<unsigned long>();
|
||||
runTest<unsigned long long>();
|
||||
passed();
|
||||
}
|
||||
|
||||
Fai riferimento in un nuovo problema
Block a user