Add direct test for hipMemsetD32 and hipMemsetD32Async

This commit is contained in:
Wen-Heng (Jack) Chung
2019-03-04 17:11:54 +00:00
parent 7ebbbd3525
commit bfde8a7fab
3 changed files with 66 additions and 3 deletions
+7
View File
@@ -24,6 +24,7 @@ THE SOFTWARE.
// standard global variables that can be set on command line
size_t N = 4 * 1024 * 1024;
char memsetval = 0x42;
int memsetD32val = 0xDEADBEEF;
int iterations = 1;
unsigned blocksPerCU = 6; // to hide latency
unsigned threadsPerBlock = 256;
@@ -99,6 +100,12 @@ int parseStandardArguments(int argc, char* argv[], bool failOnUndefinedArg) {
failed("Bad memsetval argument");
}
memsetval = ex;
} else if (!strcmp(arg, "--memsetD32val")) {
int ex;
if (++i >= argc || !HipTest::parseInt(argv[i], &ex)) {
failed("Bad memsetD32val argument");
}
memsetD32val = ex;
} else if (!strcmp(arg, "--iterations") || (!strcmp(arg, "-i"))) {
if (++i >= argc || !HipTest::parseInt(argv[i], &iterations)) {
failed("Bad iterations argument");