summaryrefslogtreecommitdiff
path: root/expt_0516_2.cu
diff options
context:
space:
mode:
Diffstat (limited to 'expt_0516_2.cu')
-rw-r--r--expt_0516_2.cu19
1 files changed, 17 insertions, 2 deletions
diff --git a/expt_0516_2.cu b/expt_0516_2.cu
index f0eb69a..0661e47 100644
--- a/expt_0516_2.cu
+++ b/expt_0516_2.cu
@@ -1,4 +1,7 @@
// Experimental content: Test CustomSort Calculation
+#define DISABLE_TEST_WARNING
+#include "sortlib.cuh"
+
#include <algorithm>
#include <cstdio>
@@ -50,12 +53,24 @@ long pow_for_sample(long n) {
}
int main(int argc, char const *argv[]) {
- auto max = 30L;
+ auto max = 32L;
+ auto cuda_only = false;
+
if (argc > 1) {
max = strtol(argv[1], nullptr, 10);
}
- for (int i = 4; i < max; i++) {
+
+ if (argc > 2) {
+ cuda_only = strtol(argv[2], nullptr, 10);
+ }
+
+ for (int i = 4; i <= max && !cuda_only; i++) {
CustomSort::testSelf(pow_for_sample(i));
printf("%d pass\n", i);
}
+
+ for (int i = 4; i <= max; i++) {
+ testCustomCalculationWithPrint<<<1, 1>>>(pow_for_sample(i));
+ cudaDeviceSynchronize();
+ }
}