| 497 | } |
| 498 | |
| 499 | int main(int argc, char **argv) |
| 500 | { |
| 501 | printf("[%s] - Starting...\n", argv[0]); |
| 502 | |
| 503 | // Use command-line specified CUDA device, otherwise use device with highest |
| 504 | // Gflops/s |
| 505 | findCudaDevice(argc, (const char **)argv); |
| 506 | |
| 507 | int nFailures = 0; |
| 508 | |
| 509 | if (!test0()) { |
| 510 | nFailures++; |
| 511 | } |
| 512 | |
| 513 | if (!test1()) { |
| 514 | nFailures++; |
| 515 | } |
| 516 | |
| 517 | if (!test2()) { |
| 518 | nFailures++; |
| 519 | } |
| 520 | |
| 521 | printf("Test Summary: %d errors\n", nFailures); |
| 522 | |
| 523 | if (nFailures > 0) { |
| 524 | printf("Test failed!\n"); |
| 525 | exit(EXIT_FAILURE); |
| 526 | } |
| 527 | |
| 528 | printf("Test passed\n"); |
| 529 | exit(EXIT_SUCCESS); |
| 530 | } |
nothing calls this directly
no test coverage detected