From 1ad1e0ebf58da30ee7f65a3a1f2a8f62900c47d5 Mon Sep 17 00:00:00 2001 From: KunoiSayami Date: Wed, 17 May 2023 14:08:08 +0800 Subject: fix: Fix fast_log Signed-off-by: KunoiSayami --- expt_0516_2.cu | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'expt_0516_2.cu') 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 #include @@ -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(); + } } -- cgit v1.3.1