summaryrefslogtreecommitdiff
path: root/expt_0516_2.cu
diff options
context:
space:
mode:
authorKunoiSayami <[email protected]>2023-05-17 14:08:08 +0800
committerKunoiSayami <[email protected]>2023-05-17 14:08:08 +0800
commit1ad1e0ebf58da30ee7f65a3a1f2a8f62900c47d5 (patch)
tree7d5dfa70354deee42d436328cfb6474a38dbb1ef /expt_0516_2.cu
parente503cc4de4f7f2e3387e55c77ab1690f709b7687 (diff)
fix: Fix fast_log
Signed-off-by: KunoiSayami <[email protected]>
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();
+ }
}