[dtests] Fix deviceLib/hipSimpleAtomicsTest for nvcc

Change-Id: I23cbea2820d41da6f6a1bcab4bc3b59ac21799dd
此提交包含在:
Maneesh Gupta
2018-09-17 15:26:45 +05:30
父節點 cef5261fa9
當前提交 94a0589eb5
+3 -2
查看文件
@@ -18,7 +18,7 @@ THE SOFTWARE.
*/
/* HIT_START
* BUILD: %t %s ../test_common.cpp
* BUILD: %t %s ../test_common.cpp NVCC_OPTIONS -std=c++11 --gpu-architecture=sm_60
* RUN: %t
* HIT_END
*/
@@ -215,6 +215,7 @@ template<
typename T,
typename enable_if<
is_same<T, int>{} || is_same<T, unsigned int>{}>::type* = nullptr>
__device__
void testKernelSub(T* g_odata) {
// Atomic subtraction (final should be 0)
atomicSub(&g_odata[1], 10);
@@ -333,4 +334,4 @@ int main(int argc, char** argv) {
hipDeviceReset();
printf("%s completed, returned %s\n", sampleName, testResult ? "OK" : "ERROR!");
exit(testResult ? EXIT_SUCCESS : EXIT_FAILURE);
}
}