diff --git a/atax/.bench.sh b/atax/.bench.sh index 752c97c..2341c0b 100755 --- a/atax/.bench.sh +++ b/atax/.bench.sh @@ -18,29 +18,19 @@ run_benchmarks() { for dataset in MINI_DATASET SMALL_DATASET STANDARD_DATASET LARGE_DATASET EXTRALARGE_DATASET do - for c in $(seq 0 15) + for c in $(seq 0 3) do cxxflags="-D$dataset" if (( $c & 1 )) then - cxxflags="$cxxflags -DTOGGLE_INIT_ARRAY_1" + cxxflags="$cxxflags -DPOLYBENCH_INCLUDE_INIT" fi if (( $c & 2 )) then - cxxflags="$cxxflags -DTOGGLE_INIT_ARRAY_2" - fi - - if (( $c & 4 )) - then - cxxflags="$cxxflags -DTOGGLE_KERNEL_ATAX_1" - fi - - if (( $c & 8 )) - then - cxxflags="$cxxflags -DTOGGLE_KERNEL_ATAX_2" - fi + cxxflags="$cxxflags -DPOLYBENCH_USE_CUDA" + fi echo "Flags: $cxxflags" make --silent "EXTRA_CXXFLAGS=$cxxflags" "atax.elf" diff --git a/atax/atax.cu b/atax/atax.cu index 02c75b8..6d283d1 100644 --- a/atax/atax.cu +++ b/atax/atax.cu @@ -126,26 +126,30 @@ __host__ int main(int argc, char** argv) A[x] = new DATA_TYPE[NY] {}; } - DATA_TYPE* x = new DATA_TYPE[NY] {}; - DATA_TYPE* y = new DATA_TYPE[NX] {}; + // X[NY] + DATA_TYPE* X = new DATA_TYPE[NY] {}; + + // Y[NX] + DATA_TYPE* Y = new DATA_TYPE[NX] {}; #ifdef POLYBENCH_INCLUDE_INIT polybench_start_instruments; #endif - init_array(A, x, y); + init_array(A, X, Y); #ifndef POLYBENCH_INCLUDE_INIT polybench_start_instruments; #endif - kernel_atax(A, x, y); + kernel_atax(A, X, Y); polybench_stop_instruments; polybench_print_instruments; - /* Prevent dead-code elimination. All live-out data must be printed by the function call in argument. */ - polybench_prevent_dce(print_array(y)); + polybench_prevent_dce( + print_array(Y) + ); #else