From 7b0bc2df3695380dfa5a519592a928021b693d7f Mon Sep 17 00:00:00 2001 From: Mehmet Yusufoglu Date: Wed, 24 Jan 2024 13:11:22 +0100 Subject: [PATCH] Remove obsolete ifdefs from examples --- example/bufferCopy/src/bufferCopy.cpp | 5 ----- example/complex/src/complex.cpp | 5 ----- example/counterBasedRng/src/counterBasedRng.cpp | 6 ------ example/heatEquation/src/heatEquation.cpp | 4 ---- example/helloWorld/src/helloWorld.cpp | 5 ----- example/kernelSpecialization/src/kernelSpecialization.cpp | 6 ------ example/parallelLoopPatterns/src/parallelLoopPatterns.cpp | 7 ------- example/tagSpecialization/src/tagSpecialization.cpp | 6 ------ example/vectorAdd/src/vectorAdd.cpp | 6 ------ 9 files changed, 50 deletions(-) diff --git a/example/bufferCopy/src/bufferCopy.cpp b/example/bufferCopy/src/bufferCopy.cpp index 998df9539175..12bd4a1a2acb 100644 --- a/example/bufferCopy/src/bufferCopy.cpp +++ b/example/bufferCopy/src/bufferCopy.cpp @@ -66,10 +66,6 @@ struct FillBufferKernel auto main() -> int { -// Fallback for the CI with disabled sequential backend -#if defined(ALPAKA_CI) && !defined(ALPAKA_ACC_CPU_B_SEQ_T_SEQ_ENABLED) - return EXIT_SUCCESS; -#else // Define the index domain using Dim = alpaka::DimInt<3u>; using Idx = std::size_t; @@ -260,5 +256,4 @@ auto main() -> int std::cout << std::endl; return EXIT_SUCCESS; -#endif } diff --git a/example/complex/src/complex.cpp b/example/complex/src/complex.cpp index beadbc7795f0..2e8d62ecdf61 100644 --- a/example/complex/src/complex.cpp +++ b/example/complex/src/complex.cpp @@ -30,10 +30,6 @@ struct ComplexKernel auto main() -> int { -// Fallback for the CI with disabled sequential backend -#if defined(ALPAKA_CI) && !defined(ALPAKA_ACC_CPU_B_SEQ_T_SEQ_ENABLED) - return EXIT_SUCCESS; -#else using Idx = std::size_t; // Define the accelerator @@ -91,5 +87,4 @@ auto main() -> int alpaka::Complex z = x + y; return EXIT_SUCCESS; -#endif } diff --git a/example/counterBasedRng/src/counterBasedRng.cpp b/example/counterBasedRng/src/counterBasedRng.cpp index ad86b144d409..ec92f885d783 100644 --- a/example/counterBasedRng/src/counterBasedRng.cpp +++ b/example/counterBasedRng/src/counterBasedRng.cpp @@ -97,11 +97,6 @@ class CounterBasedRngKernel auto main() -> int { -// Fallback for the CI with disabled sequential backend -#if defined(ALPAKA_CI) && !defined(ALPAKA_ACC_CPU_B_SEQ_T_SEQ_ENABLED) - return EXIT_SUCCESS; -#else - // Define the index domain using Dim = alpaka::DimInt<3u>; using Idx = std::size_t; @@ -233,5 +228,4 @@ auto main() -> int << "Execution results incorrect!" << std::endl; return EXIT_FAILURE; } -#endif } diff --git a/example/heatEquation/src/heatEquation.cpp b/example/heatEquation/src/heatEquation.cpp index 82cd5a8608a9..b580fe387208 100644 --- a/example/heatEquation/src/heatEquation.cpp +++ b/example/heatEquation/src/heatEquation.cpp @@ -64,9 +64,6 @@ auto exactSolution(double const x, double const t) -> double //! from the next-buffer. auto main() -> int { -#if defined(ALPAKA_CI) && !defined(ALPAKA_ACC_CPU_B_SEQ_T_SEQ_ENABLED) - return EXIT_SUCCESS; -#else // Parameters (a user is supposed to change numNodesX, numTimeSteps) uint32_t const numNodesX = 1000; uint32_t const numTimeSteps = 10000; @@ -181,5 +178,4 @@ auto main() -> int << std::endl; return EXIT_FAILURE; } -#endif } diff --git a/example/helloWorld/src/helloWorld.cpp b/example/helloWorld/src/helloWorld.cpp index ee7dac46eef7..20a28d5be5ba 100644 --- a/example/helloWorld/src/helloWorld.cpp +++ b/example/helloWorld/src/helloWorld.cpp @@ -49,10 +49,6 @@ struct HelloWorldKernel auto main() -> int { -// Fallback for the CI with disabled sequential backend -#if defined(ALPAKA_CI) && !defined(ALPAKA_ACC_CPU_B_SEQ_T_SEQ_ENABLED) - return EXIT_SUCCESS; -#else // Define the index domain // // Depending on your type of problem, you have to define @@ -176,5 +172,4 @@ auto main() -> int alpaka::wait(queue); return EXIT_SUCCESS; -#endif } diff --git a/example/kernelSpecialization/src/kernelSpecialization.cpp b/example/kernelSpecialization/src/kernelSpecialization.cpp index 753f56e8d7f1..57e2ee1e64d7 100644 --- a/example/kernelSpecialization/src/kernelSpecialization.cpp +++ b/example/kernelSpecialization/src/kernelSpecialization.cpp @@ -55,11 +55,6 @@ struct Kernel auto main() -> int { -// Fallback for the CI with disabled sequential backend -#if defined(ALPAKA_CI) && !defined(ALPAKA_ACC_CPU_B_SEQ_T_SEQ_ENABLED) - return EXIT_SUCCESS; -#else - // Define the accelerator // // It is possible to choose from a set of accelerators: @@ -101,5 +96,4 @@ auto main() -> int alpaka::wait(queue); return EXIT_SUCCESS; -#endif } diff --git a/example/parallelLoopPatterns/src/parallelLoopPatterns.cpp b/example/parallelLoopPatterns/src/parallelLoopPatterns.cpp index 6b9736ec7d0c..b3336e3b8d86 100644 --- a/example/parallelLoopPatterns/src/parallelLoopPatterns.cpp +++ b/example/parallelLoopPatterns/src/parallelLoopPatterns.cpp @@ -403,11 +403,6 @@ void openMPSimdStyle(TDev& dev, TQueue& queue, TBufAcc& bufAcc) auto main() -> int { -// Fallback for the CI with disabled sequential backend -#if defined(ALPAKA_CI) && !defined(ALPAKA_ACC_CPU_B_SEQ_T_SEQ_ENABLED) - return EXIT_SUCCESS; -#else - // Define the index domain, this example is only for 1d using Dim = alpaka::DimInt<1u>; @@ -441,6 +436,4 @@ auto main() -> int chunkedGridStridedLoop(devAcc, queue, bufAcc); naiveOpenMPStyle(devAcc, queue, bufAcc); openMPSimdStyle(devAcc, queue, bufAcc); - -#endif } diff --git a/example/tagSpecialization/src/tagSpecialization.cpp b/example/tagSpecialization/src/tagSpecialization.cpp index 8fb0c180c5f1..534aa29aeda8 100644 --- a/example/tagSpecialization/src/tagSpecialization.cpp +++ b/example/tagSpecialization/src/tagSpecialization.cpp @@ -78,11 +78,6 @@ struct WrapperKernel auto main() -> int { -// Fallback for the CI with disabled sequential backend -#if defined(ALPAKA_CI) && !defined(ALPAKA_ACC_CPU_B_SEQ_T_SEQ_ENABLED) - return EXIT_SUCCESS; -#else - // Define the accelerator // // It is possible to choose from a set of accelerators: @@ -126,5 +121,4 @@ auto main() -> int alpaka::exec(queue, workDiv, WrapperKernel{}); alpaka::wait(queue); return EXIT_SUCCESS; -#endif } diff --git a/example/vectorAdd/src/vectorAdd.cpp b/example/vectorAdd/src/vectorAdd.cpp index 60e136af4406..2bdefff63abc 100644 --- a/example/vectorAdd/src/vectorAdd.cpp +++ b/example/vectorAdd/src/vectorAdd.cpp @@ -56,11 +56,6 @@ class VectorAddKernel auto main() -> int { -// Fallback for the CI with disabled sequential backend -#if defined(ALPAKA_CI) && !defined(ALPAKA_ACC_CPU_B_SEQ_T_SEQ_ENABLED) - return EXIT_SUCCESS; -#else - // Define the index domain using Dim = alpaka::DimInt<1u>; using Idx = std::size_t; @@ -206,5 +201,4 @@ auto main() -> int << "Execution results incorrect!" << std::endl; return EXIT_FAILURE; } -#endif }