Update with original
Этот коммит содержится в:
@@ -102,3 +102,4 @@ __device__ double4 __ldg(const double4* );
|
||||
#endif // __HCC__
|
||||
|
||||
#endif // HIP_LDG_H
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ THE SOFTWARE.
|
||||
#include<iostream>
|
||||
#include "hip_runtime.h"
|
||||
#include "test_common.h"
|
||||
|
||||
#if __hcc_workweek__ >= 16164
|
||||
#define HIP_ASSERT(x) (assert((x)==hipSuccess))
|
||||
|
||||
|
||||
@@ -149,14 +149,156 @@ int main() {
|
||||
cout << " System major " << devProp.major << endl;
|
||||
cout << " agent prop name " << devProp.name << endl;
|
||||
|
||||
int errors = dataTypesRun<char>() &
|
||||
dataTypesRun<signed char>() &
|
||||
dataTypesRun<short>() &
|
||||
dataTypesRun<int>();
|
||||
//hipResetDefaultAccelerator();
|
||||
int errors;
|
||||
|
||||
errors = dataTypesRun<char>() &
|
||||
dataTypesRun<char1>() &
|
||||
dataTypesRun<char2>() &
|
||||
dataTypesRun<char3>() &
|
||||
dataTypesRun<char4>() &
|
||||
dataTypesRun<signed char>() &
|
||||
dataTypesRun<unsigned char>();
|
||||
|
||||
if(errors == 1){
|
||||
errors = 0;
|
||||
}else{
|
||||
std::cout<<"Failed Char"<<std::endl;
|
||||
return -1;
|
||||
}
|
||||
|
||||
errors = dataTypesRun<short>() &
|
||||
dataTypesRun<short1>() &
|
||||
dataTypesRun<short2>() &
|
||||
dataTypesRun<short3>() &
|
||||
dataTypesRun<short4>() &
|
||||
dataTypesRun<unsigned short>();
|
||||
|
||||
if(errors == 1){
|
||||
errors = 0;
|
||||
}else{
|
||||
std::cout<<"Failed Short"<<std::endl;
|
||||
return -1;
|
||||
}
|
||||
|
||||
errors = dataTypesRun<int>() &
|
||||
dataTypesRun<int1>() &
|
||||
dataTypesRun<int2>() &
|
||||
dataTypesRun<int3>() &
|
||||
dataTypesRun<int4>() &
|
||||
dataTypesRun<unsigned int>();
|
||||
|
||||
if(errors == 1){
|
||||
errors = 0;
|
||||
}else{
|
||||
std::cout<<"Failed Int"<<std::endl;
|
||||
return -1;
|
||||
}
|
||||
|
||||
errors = dataTypesRun<long>() &
|
||||
dataTypesRun<long1>() &
|
||||
dataTypesRun<long2>() &
|
||||
dataTypesRun<long3>() &
|
||||
dataTypesRun<long4>() &
|
||||
dataTypesRun<unsigned long>();
|
||||
|
||||
if(errors == 1){
|
||||
errors = 0;
|
||||
}else{
|
||||
std::cout<<"Failed Long"<<std::endl;
|
||||
return -1;
|
||||
}
|
||||
|
||||
errors = dataTypesRun<long long>() &
|
||||
dataTypesRun<longlong1>() &
|
||||
dataTypesRun<longlong2>() &
|
||||
dataTypesRun<longlong3>() &
|
||||
dataTypesRun<longlong4>() &
|
||||
dataTypesRun<unsigned long long>();
|
||||
|
||||
if(errors == 1){
|
||||
errors = 0;
|
||||
}else{
|
||||
std::cout<<"Failed Long Long"<<std::endl;
|
||||
return -1;
|
||||
}
|
||||
|
||||
errors = dataTypesRun<uchar1>() &
|
||||
dataTypesRun<uchar2>() &
|
||||
dataTypesRun<uchar3>() &
|
||||
dataTypesRun<uchar4>();
|
||||
|
||||
if(errors == 1){
|
||||
errors = 0;
|
||||
}else{
|
||||
std::cout<<"Failed Unsigned Char"<<std::endl;
|
||||
return -1;
|
||||
}
|
||||
|
||||
errors = dataTypesRun<ushort1>() &
|
||||
dataTypesRun<ushort2>() &
|
||||
dataTypesRun<ushort3>() &
|
||||
dataTypesRun<ushort4>();
|
||||
|
||||
if(errors == 1){
|
||||
errors = 0;
|
||||
}else{
|
||||
std::cout<<"Failed Unsigned Short"<<std::endl;
|
||||
return -1;
|
||||
}
|
||||
|
||||
errors = dataTypesRun<uint1>() &
|
||||
dataTypesRun<uint2>() &
|
||||
dataTypesRun<uint3>() &
|
||||
dataTypesRun<uint4>();
|
||||
|
||||
if(errors == 1){
|
||||
errors = 0;
|
||||
}else{
|
||||
std::cout<<"Failed Unsigned Int"<<std::endl;
|
||||
return -1;
|
||||
}
|
||||
|
||||
errors = dataTypesRun<ulonglong1>() &
|
||||
dataTypesRun<ulonglong2>() &
|
||||
dataTypesRun<ulonglong3>() &
|
||||
dataTypesRun<ulonglong4>();
|
||||
|
||||
if(errors == 1){
|
||||
errors = 0;
|
||||
}else{
|
||||
std::cout<<"Failed Unsigned Long Long"<<std::endl;
|
||||
return -1;
|
||||
}
|
||||
|
||||
errors = dataTypesRun<float>() &
|
||||
dataTypesRun<float1>() &
|
||||
dataTypesRun<float2>() &
|
||||
dataTypesRun<float3>() &
|
||||
dataTypesRun<float4>();
|
||||
|
||||
if(errors == 1){
|
||||
errors = 0;
|
||||
}else{
|
||||
std::cout<<"Failed Float"<<std::endl;
|
||||
return -1;
|
||||
}
|
||||
|
||||
errors = dataTypesRun<double>() &
|
||||
dataTypesRun<double1>() &
|
||||
dataTypesRun<double2>() &
|
||||
dataTypesRun<double3>() &
|
||||
dataTypesRun<double4>();
|
||||
|
||||
|
||||
//hipResetDefaultAccelerator();
|
||||
if(errors == 1){
|
||||
passed();
|
||||
return 0;
|
||||
}else{
|
||||
std::cout<<"Failed Float"<<std::endl;
|
||||
return -1;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Ссылка в новой задаче
Block a user