diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 20e1034..33f6573 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -13,86 +13,86 @@ jobs: uses: actions/cache@v2 with: path: compilers - key: ${{ runner.os }}-${{ hashFiles('ci-prepare-bionic.sh') }} + key: ${{ runner.os }}-${{ hashFiles('./cpp/ci-prepare-bionic.sh') }} - name: Prepare compilers if: steps.prepare-compilers.outputs.cache-hit != 'true' - run: source ./ci-prepare-bionic.sh ./compilers SETUP true || true + run: source ./cpp/ci-prepare-bionic.sh ./compilers SETUP true || true - name: Setup test environment - run: source ./ci-prepare-bionic.sh ./compilers VARS false || true + run: source ./cpp/ci-prepare-bionic.sh ./compilers VARS false || true - name: Test compile gcc @ CMake 3.13 if: ${{ ! cancelled() }} - run: ./ci-test-compile.sh ./build gcc all ${{ env.CMAKE_3_13_BIN }} + run: ./cpp/ci-test-compile.sh ./build gcc all ${{ env.CMAKE_3_13_BIN }} - name: Test compile clang @ CMake 3.13 if: ${{ ! cancelled() }} - run: ./ci-test-compile.sh ./build clang all ${{ env.CMAKE_3_13_BIN }} + run: ./cpp/ci-test-compile.sh ./build clang all ${{ env.CMAKE_3_13_BIN }} - name: Test compile nvhpc @ CMake 3.13 if: ${{ ! cancelled() }} - run: ./ci-test-compile.sh ./build nvhpc all ${{ env.CMAKE_3_13_BIN }} + run: ./cpp/ci-test-compile.sh ./build nvhpc all ${{ env.CMAKE_3_13_BIN }} - name: Test compile aocc @ CMake 3.13 if: ${{ ! cancelled() }} - run: ./ci-test-compile.sh ./build aocc all ${{ env.CMAKE_3_13_BIN }} + run: ./cpp/ci-test-compile.sh ./build aocc all ${{ env.CMAKE_3_13_BIN }} - name: Test compile aomp @ CMake 3.13 if: ${{ ! cancelled() }} - run: ./ci-test-compile.sh ./build aomp all ${{ env.CMAKE_3_13_BIN }} + run: ./cpp/ci-test-compile.sh ./build aomp all ${{ env.CMAKE_3_13_BIN }} - name: Test compile hip @ CMake 3.13 if: ${{ ! cancelled() }} - run: ./ci-test-compile.sh ./build hip all ${{ env.CMAKE_3_13_BIN }} + run: ./cpp/ci-test-compile.sh ./build hip all ${{ env.CMAKE_3_13_BIN }} - name: Test compile dpcpp @ CMake 3.13 if: ${{ ! cancelled() }} - run: ./ci-test-compile.sh ./build dpcpp all ${{ env.CMAKE_3_13_BIN }} + run: ./cpp/ci-test-compile.sh ./build dpcpp all ${{ env.CMAKE_3_13_BIN }} - name: Test compile hipsycl @ CMake 3.13 if: ${{ ! cancelled() }} - run: ./ci-test-compile.sh ./build hipsycl all ${{ env.CMAKE_3_13_BIN }} + run: ./cpp/ci-test-compile.sh ./build hipsycl all ${{ env.CMAKE_3_13_BIN }} - name: Test compile gcc @ CMake 3.15 if: ${{ ! cancelled() }} - run: ./ci-test-compile.sh ./build gcc all ${{ env.CMAKE_3_15_BIN }} + run: ./cpp/ci-test-compile.sh ./build gcc all ${{ env.CMAKE_3_15_BIN }} - name: Test compile clang @ CMake 3.15 if: ${{ ! cancelled() }} - run: ./ci-test-compile.sh ./build clang all ${{ env.CMAKE_3_15_BIN }} + run: ./cpp/ci-test-compile.sh ./build clang all ${{ env.CMAKE_3_15_BIN }} - name: Test compile nvhpc @ CMake 3.15 if: ${{ ! cancelled() }} - run: ./ci-test-compile.sh ./build nvhpc all ${{ env.CMAKE_3_15_BIN }} + run: ./cpp/ci-test-compile.sh ./build nvhpc all ${{ env.CMAKE_3_15_BIN }} - name: Test compile aocc @ CMake 3.15 if: ${{ ! cancelled() }} - run: ./ci-test-compile.sh ./build aocc all ${{ env.CMAKE_3_15_BIN }} + run: ./cpp/ci-test-compile.sh ./build aocc all ${{ env.CMAKE_3_15_BIN }} - name: Test compile aomp @ CMake 3.15 if: ${{ ! cancelled() }} - run: ./ci-test-compile.sh ./build aomp all ${{ env.CMAKE_3_15_BIN }} + run: ./cpp/ci-test-compile.sh ./build aomp all ${{ env.CMAKE_3_15_BIN }} - name: Test compile hip @ CMake 3.15 if: ${{ ! cancelled() }} - run: ./ci-test-compile.sh ./build hip all ${{ env.CMAKE_3_15_BIN }} + run: ./cpp/ci-test-compile.sh ./build hip all ${{ env.CMAKE_3_15_BIN }} - name: Test compile dpcpp @ CMake 3.15 if: ${{ ! cancelled() }} - run: ./ci-test-compile.sh ./build dpcpp all ${{ env.CMAKE_3_15_BIN }} + run: ./cpp/ci-test-compile.sh ./build dpcpp all ${{ env.CMAKE_3_15_BIN }} - name: Test compile hipsycl @ CMake 3.15 if: ${{ ! cancelled() }} - run: ./ci-test-compile.sh ./build hipsycl all ${{ env.CMAKE_3_15_BIN }} + run: ./cpp/ci-test-compile.sh ./build hipsycl all ${{ env.CMAKE_3_15_BIN }} - name: Test compile gcc @ CMake 3.18 if: ${{ ! cancelled() }} - run: ./ci-test-compile.sh ./build gcc all ${{ env.CMAKE_3_18_BIN }} + run: ./cpp/ci-test-compile.sh ./build gcc all ${{ env.CMAKE_3_18_BIN }} - name: Test compile clang @ CMake 3.18 if: ${{ ! cancelled() }} - run: ./ci-test-compile.sh ./build clang all ${{ env.CMAKE_3_18_BIN }} + run: ./cpp/ci-test-compile.sh ./build clang all ${{ env.CMAKE_3_18_BIN }} - name: Test compile nvhpc @ CMake 3.18 if: ${{ ! cancelled() }} - run: ./ci-test-compile.sh ./build nvhpc all ${{ env.CMAKE_3_18_BIN }} + run: ./cpp/ci-test-compile.sh ./build nvhpc all ${{ env.CMAKE_3_18_BIN }} - name: Test compile aocc @ CMake 3.18 if: ${{ ! cancelled() }} - run: ./ci-test-compile.sh ./build aocc all ${{ env.CMAKE_3_18_BIN }} + run: ./cpp/ci-test-compile.sh ./build aocc all ${{ env.CMAKE_3_18_BIN }} - name: Test compile aomp @ CMake 3.18 if: ${{ ! cancelled() }} - run: ./ci-test-compile.sh ./build aomp all ${{ env.CMAKE_3_18_BIN }} + run: ./cpp/ci-test-compile.sh ./build aomp all ${{ env.CMAKE_3_18_BIN }} - name: Test compile hip @ CMake 3.18 if: ${{ ! cancelled() }} - run: ./ci-test-compile.sh ./build hip all ${{ env.CMAKE_3_18_BIN }} + run: ./cpp/ci-test-compile.sh ./build hip all ${{ env.CMAKE_3_18_BIN }} - name: Test compile dpcpp @ CMake 3.18 if: ${{ ! cancelled() }} - run: ./ci-test-compile.sh ./build dpcpp all ${{ env.CMAKE_3_18_BIN }} + run: ./cpp/ci-test-compile.sh ./build dpcpp all ${{ env.CMAKE_3_18_BIN }} - name: Test compile hipsycl @ CMake 3.18 if: ${{ ! cancelled() }} - run: ./ci-test-compile.sh ./build hipsycl all ${{ env.CMAKE_3_18_BIN }} \ No newline at end of file + run: ./cpp/ci-test-compile.sh ./build hipsycl all ${{ env.CMAKE_3_18_BIN }} \ No newline at end of file diff --git a/.gitignore b/.gitignore index c3ea1da..614eb0f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,30 +1,8 @@ -cuda-stream -ocl-stream -omp-stream -acc-stream -raja-stream -kokkos-stream -std-stream -sycl-stream -hip-stream - -*.o -*.bc -*.sycl -*.tar -*.gz -*.a - -KokkosCore_config.* - -.DS_Store - -Makefile build/ cmake-build-*/ CMakeFiles/ .idea/ .vscode/ -.directory \ No newline at end of file +.directory diff --git a/README.md b/README.md index 8ca7398..66ea661 100644 --- a/README.md +++ b/README.md @@ -63,7 +63,7 @@ The project supports building with CMake >= 3.13.0, it can be installed without As with any CMake project, first configure the project: ```shell -> cd babelstream +> cd babelstream/cpp > cmake -Bbuild -H. -DMODEL= # configure the build, build type defaults to Release > cmake --build build # compile it > ./build/babelstream # executable available at ./build/ @@ -75,7 +75,7 @@ There are assigned those to `RELEASE_FLAGS`, and you can override them if requir To find out what flag each model supports or requires, simply configure while only specifying the model. For example: ```shell -> cd babelstream +> cd babelstream/cpp > cmake -Bbuild -H. -DMODEL=OCL ... - Common Release flags are `-O3`, set RELEASE_FLAGS to override diff --git a/cpp/.gitignore b/cpp/.gitignore new file mode 100644 index 0000000..c3ea1da --- /dev/null +++ b/cpp/.gitignore @@ -0,0 +1,30 @@ + +cuda-stream +ocl-stream +omp-stream +acc-stream +raja-stream +kokkos-stream +std-stream +sycl-stream +hip-stream + +*.o +*.bc +*.sycl +*.tar +*.gz +*.a + +KokkosCore_config.* + +.DS_Store + +Makefile + +build/ +cmake-build-*/ +CMakeFiles/ +.idea/ +.vscode/ +.directory \ No newline at end of file diff --git a/ACC.cmake b/cpp/ACC.cmake similarity index 100% rename from ACC.cmake rename to cpp/ACC.cmake diff --git a/ACCStream.cpp b/cpp/ACCStream.cpp similarity index 100% rename from ACCStream.cpp rename to cpp/ACCStream.cpp diff --git a/ACCStream.h b/cpp/ACCStream.h similarity index 100% rename from ACCStream.h rename to cpp/ACCStream.h diff --git a/CL/cl.h b/cpp/CL/cl.h similarity index 100% rename from CL/cl.h rename to cpp/CL/cl.h diff --git a/CL/cl2.hpp b/cpp/CL/cl2.hpp similarity index 100% rename from CL/cl2.hpp rename to cpp/CL/cl2.hpp diff --git a/CL/cl_d3d10.h b/cpp/CL/cl_d3d10.h similarity index 100% rename from CL/cl_d3d10.h rename to cpp/CL/cl_d3d10.h diff --git a/CL/cl_d3d11.h b/cpp/CL/cl_d3d11.h similarity index 100% rename from CL/cl_d3d11.h rename to cpp/CL/cl_d3d11.h diff --git a/CL/cl_dx9_media_sharing.h b/cpp/CL/cl_dx9_media_sharing.h similarity index 100% rename from CL/cl_dx9_media_sharing.h rename to cpp/CL/cl_dx9_media_sharing.h diff --git a/CL/cl_dx9_media_sharing_intel.h b/cpp/CL/cl_dx9_media_sharing_intel.h similarity index 100% rename from CL/cl_dx9_media_sharing_intel.h rename to cpp/CL/cl_dx9_media_sharing_intel.h diff --git a/CL/cl_egl.h b/cpp/CL/cl_egl.h similarity index 100% rename from CL/cl_egl.h rename to cpp/CL/cl_egl.h diff --git a/CL/cl_ext.h b/cpp/CL/cl_ext.h similarity index 100% rename from CL/cl_ext.h rename to cpp/CL/cl_ext.h diff --git a/CL/cl_ext_intel.h b/cpp/CL/cl_ext_intel.h similarity index 100% rename from CL/cl_ext_intel.h rename to cpp/CL/cl_ext_intel.h diff --git a/CL/cl_gl.h b/cpp/CL/cl_gl.h similarity index 100% rename from CL/cl_gl.h rename to cpp/CL/cl_gl.h diff --git a/CL/cl_gl_ext.h b/cpp/CL/cl_gl_ext.h similarity index 100% rename from CL/cl_gl_ext.h rename to cpp/CL/cl_gl_ext.h diff --git a/CL/cl_half.h b/cpp/CL/cl_half.h similarity index 100% rename from CL/cl_half.h rename to cpp/CL/cl_half.h diff --git a/CL/cl_icd.h b/cpp/CL/cl_icd.h similarity index 100% rename from CL/cl_icd.h rename to cpp/CL/cl_icd.h diff --git a/CL/cl_platform.h b/cpp/CL/cl_platform.h similarity index 100% rename from CL/cl_platform.h rename to cpp/CL/cl_platform.h diff --git a/CL/cl_va_api_media_sharing_intel.h b/cpp/CL/cl_va_api_media_sharing_intel.h similarity index 100% rename from CL/cl_va_api_media_sharing_intel.h rename to cpp/CL/cl_va_api_media_sharing_intel.h diff --git a/CL/cl_version.h b/cpp/CL/cl_version.h similarity index 100% rename from CL/cl_version.h rename to cpp/CL/cl_version.h diff --git a/CL/opencl.h b/cpp/CL/opencl.h similarity index 100% rename from CL/opencl.h rename to cpp/CL/opencl.h diff --git a/CMakeLists.txt b/cpp/CMakeLists.txt similarity index 100% rename from CMakeLists.txt rename to cpp/CMakeLists.txt diff --git a/CUDA.cmake b/cpp/CUDA.cmake similarity index 100% rename from CUDA.cmake rename to cpp/CUDA.cmake diff --git a/CUDA.make b/cpp/CUDA.make similarity index 100% rename from CUDA.make rename to cpp/CUDA.make diff --git a/CUDAStream.cu b/cpp/CUDAStream.cu similarity index 100% rename from CUDAStream.cu rename to cpp/CUDAStream.cu diff --git a/CUDAStream.h b/cpp/CUDAStream.h similarity index 100% rename from CUDAStream.h rename to cpp/CUDAStream.h diff --git a/HIP.cmake b/cpp/HIP.cmake similarity index 100% rename from HIP.cmake rename to cpp/HIP.cmake diff --git a/HIP.make b/cpp/HIP.make similarity index 100% rename from HIP.make rename to cpp/HIP.make diff --git a/HIPStream.cpp b/cpp/HIPStream.cpp similarity index 100% rename from HIPStream.cpp rename to cpp/HIPStream.cpp diff --git a/HIPStream.h b/cpp/HIPStream.h similarity index 100% rename from HIPStream.h rename to cpp/HIPStream.h diff --git a/KOKKOS.cmake b/cpp/KOKKOS.cmake similarity index 100% rename from KOKKOS.cmake rename to cpp/KOKKOS.cmake diff --git a/Kokkos.make b/cpp/Kokkos.make similarity index 100% rename from Kokkos.make rename to cpp/Kokkos.make diff --git a/KokkosStream.cpp b/cpp/KokkosStream.cpp similarity index 100% rename from KokkosStream.cpp rename to cpp/KokkosStream.cpp diff --git a/KokkosStream.hpp b/cpp/KokkosStream.hpp similarity index 100% rename from KokkosStream.hpp rename to cpp/KokkosStream.hpp diff --git a/LICENSE b/cpp/LICENSE similarity index 100% rename from LICENSE rename to cpp/LICENSE diff --git a/OCL.cmake b/cpp/OCL.cmake similarity index 100% rename from OCL.cmake rename to cpp/OCL.cmake diff --git a/OCLStream.cpp b/cpp/OCLStream.cpp similarity index 100% rename from OCLStream.cpp rename to cpp/OCLStream.cpp diff --git a/OCLStream.h b/cpp/OCLStream.h similarity index 100% rename from OCLStream.h rename to cpp/OCLStream.h diff --git a/OMP.cmake b/cpp/OMP.cmake similarity index 100% rename from OMP.cmake rename to cpp/OMP.cmake diff --git a/OMPStream.cpp b/cpp/OMPStream.cpp similarity index 100% rename from OMPStream.cpp rename to cpp/OMPStream.cpp diff --git a/OMPStream.h b/cpp/OMPStream.h similarity index 100% rename from OMPStream.h rename to cpp/OMPStream.h diff --git a/OpenACC.make b/cpp/OpenACC.make similarity index 100% rename from OpenACC.make rename to cpp/OpenACC.make diff --git a/OpenCL.make b/cpp/OpenCL.make similarity index 100% rename from OpenCL.make rename to cpp/OpenCL.make diff --git a/OpenMP.make b/cpp/OpenMP.make similarity index 100% rename from OpenMP.make rename to cpp/OpenMP.make diff --git a/RAJA.cmake b/cpp/RAJA.cmake similarity index 100% rename from RAJA.cmake rename to cpp/RAJA.cmake diff --git a/RAJA.make b/cpp/RAJA.make similarity index 100% rename from RAJA.make rename to cpp/RAJA.make diff --git a/RAJAStream.cpp b/cpp/RAJAStream.cpp similarity index 100% rename from RAJAStream.cpp rename to cpp/RAJAStream.cpp diff --git a/RAJAStream.hpp b/cpp/RAJAStream.hpp similarity index 100% rename from RAJAStream.hpp rename to cpp/RAJAStream.hpp diff --git a/STD.cmake b/cpp/STD.cmake similarity index 100% rename from STD.cmake rename to cpp/STD.cmake diff --git a/STD.make b/cpp/STD.make similarity index 100% rename from STD.make rename to cpp/STD.make diff --git a/STD20.cmake b/cpp/STD20.cmake similarity index 100% rename from STD20.cmake rename to cpp/STD20.cmake diff --git a/STD20.make b/cpp/STD20.make similarity index 100% rename from STD20.make rename to cpp/STD20.make diff --git a/STD20Stream.cpp b/cpp/STD20Stream.cpp similarity index 100% rename from STD20Stream.cpp rename to cpp/STD20Stream.cpp diff --git a/STD20Stream.hpp b/cpp/STD20Stream.hpp similarity index 100% rename from STD20Stream.hpp rename to cpp/STD20Stream.hpp diff --git a/STDStream.cpp b/cpp/STDStream.cpp similarity index 100% rename from STDStream.cpp rename to cpp/STDStream.cpp diff --git a/STDStream.h b/cpp/STDStream.h similarity index 100% rename from STDStream.h rename to cpp/STDStream.h diff --git a/SYCL.cmake b/cpp/SYCL.cmake similarity index 100% rename from SYCL.cmake rename to cpp/SYCL.cmake diff --git a/SYCL.make b/cpp/SYCL.make similarity index 100% rename from SYCL.make rename to cpp/SYCL.make diff --git a/SYCLStream.cpp b/cpp/SYCLStream.cpp similarity index 100% rename from SYCLStream.cpp rename to cpp/SYCLStream.cpp diff --git a/SYCLStream.h b/cpp/SYCLStream.h similarity index 100% rename from SYCLStream.h rename to cpp/SYCLStream.h diff --git a/Stream.h b/cpp/Stream.h similarity index 100% rename from Stream.h rename to cpp/Stream.h diff --git a/ci-prepare-bionic.sh b/cpp/ci-prepare-bionic.sh similarity index 100% rename from ci-prepare-bionic.sh rename to cpp/ci-prepare-bionic.sh diff --git a/ci-test-compile.sh b/cpp/ci-test-compile.sh similarity index 100% rename from ci-test-compile.sh rename to cpp/ci-test-compile.sh diff --git a/cmake/Modules/ComputeCppCompilerChecks.cmake b/cpp/cmake/Modules/ComputeCppCompilerChecks.cmake similarity index 100% rename from cmake/Modules/ComputeCppCompilerChecks.cmake rename to cpp/cmake/Modules/ComputeCppCompilerChecks.cmake diff --git a/cmake/Modules/ComputeCppIRMap.cmake b/cpp/cmake/Modules/ComputeCppIRMap.cmake similarity index 100% rename from cmake/Modules/ComputeCppIRMap.cmake rename to cpp/cmake/Modules/ComputeCppIRMap.cmake diff --git a/cmake/Modules/FindComputeCpp.cmake b/cpp/cmake/Modules/FindComputeCpp.cmake similarity index 100% rename from cmake/Modules/FindComputeCpp.cmake rename to cpp/cmake/Modules/FindComputeCpp.cmake diff --git a/cmake/toolchains/arm-gcc-poky.cmake b/cpp/cmake/toolchains/arm-gcc-poky.cmake similarity index 100% rename from cmake/toolchains/arm-gcc-poky.cmake rename to cpp/cmake/toolchains/arm-gcc-poky.cmake diff --git a/cmake/toolchains/gcc-generic.cmake b/cpp/cmake/toolchains/gcc-generic.cmake similarity index 100% rename from cmake/toolchains/gcc-generic.cmake rename to cpp/cmake/toolchains/gcc-generic.cmake diff --git a/legacy/HC.make b/cpp/legacy/HC.make similarity index 100% rename from legacy/HC.make rename to cpp/legacy/HC.make diff --git a/legacy/HCStream.cpp b/cpp/legacy/HCStream.cpp similarity index 100% rename from legacy/HCStream.cpp rename to cpp/legacy/HCStream.cpp diff --git a/legacy/HCStream.h b/cpp/legacy/HCStream.h similarity index 100% rename from legacy/HCStream.h rename to cpp/legacy/HCStream.h diff --git a/main.cpp b/cpp/main.cpp similarity index 100% rename from main.cpp rename to cpp/main.cpp diff --git a/register_models.cmake b/cpp/register_models.cmake similarity index 100% rename from register_models.cmake rename to cpp/register_models.cmake