├── .devcontainer ├── DockerfileUbuntu └── devcontainer.json ├── .gitignore ├── .vscode ├── c_cpp_properties.json ├── launch.json └── settings.json ├── LICENSE ├── README.md ├── ch1 └── readme.md ├── ch10 ├── 1_cuBLAS │ ├── CMakeLists.txt │ └── main.cpp ├── 2_thrust │ ├── CMakeLists.txt │ └── main.cu ├── 3_gtest │ ├── CMakeLists.txt │ ├── include │ │ └── vector_add.h │ ├── src │ │ └── main.cu │ └── test │ │ └── test_vector_add.cu ├── 4_pytest │ ├── test_vector_add.py │ └── vector_add.py └── readme.md ├── ch2 ├── Dockerfile └── readme.md ├── ch3 ├── device_query.cu ├── hello_world.cu └── readme.md ├── ch4 ├── 1_primes │ ├── CMakeLists.txt │ └── primes.cu ├── 2_vector_add │ ├── CMakeLists.txt │ └── vector_add.cu ├── 3_euclidean_distance │ ├── CMakeLists.txt │ └── euclidean_distance.cu └── readme.md ├── ch5 └── readme.md ├── ch6 ├── 1_matrix_add │ ├── CMakeLists.txt │ └── matrix_add.cu ├── 2_matrix_multiply │ ├── CMakeLists.txt │ └── matrix_multiply.cu ├── 3_trapezoidal_travel │ ├── CMakeLists.txt │ ├── trapezoidal_travel_basic.cu │ └── trapezoidal_travel_gpu_reduce.cu ├── 4_sort_array │ ├── CMakeLists.txt │ └── sort_array.cu ├── 5_weighted_moving_average │ ├── CMakeLists.txt │ └── weighted_moving_average.cu └── readme.md ├── ch7 ├── CMakeLists.txt ├── matrix_multiply_float.cu └── readme.md ├── ch8 ├── 1_vector_add │ ├── CMakeLists.txt │ └── vector_add.cu ├── 2_mem_bandwidth │ ├── CMakeLists.txt │ ├── mem_bandwidth.cu │ └── memcpy_benchmark.cu ├── 3_multiplying_with_streams │ ├── CMakeLists.txt │ ├── vec_mat_mul_nostreams.cu │ └── vec_mat_mul_streams.cu ├── 4_multigpu │ ├── CMakeLists.txt │ └── multigpu.cu └── readme.md └── ch9 ├── CMakeLists.txt ├── include └── vector_add.h ├── python ├── ctypes │ ├── test.py │ └── test_ctypes.py ├── run_tests.sh ├── wrapper │ ├── pyproject_toml.txt │ ├── setup.py │ ├── test.py │ ├── test_vector_add_wrapper.py │ └── vector_add_wrapper.c └── wrapper_np │ ├── setup.py │ ├── test.py │ ├── test_vector_add_np_wrapper.py │ └── vector_add_np_wrapper.c ├── readme.md └── src └── vector_add.cu /.devcontainer/DockerfileUbuntu: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/GPU-Programming-with-CPP-and-CUDA/HEAD/.devcontainer/DockerfileUbuntu -------------------------------------------------------------------------------- /.devcontainer/devcontainer.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/GPU-Programming-with-CPP-and-CUDA/HEAD/.devcontainer/devcontainer.json -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/GPU-Programming-with-CPP-and-CUDA/HEAD/.gitignore -------------------------------------------------------------------------------- /.vscode/c_cpp_properties.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/GPU-Programming-with-CPP-and-CUDA/HEAD/.vscode/c_cpp_properties.json -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/GPU-Programming-with-CPP-and-CUDA/HEAD/.vscode/launch.json -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/GPU-Programming-with-CPP-and-CUDA/HEAD/.vscode/settings.json -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/GPU-Programming-with-CPP-and-CUDA/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/GPU-Programming-with-CPP-and-CUDA/HEAD/README.md -------------------------------------------------------------------------------- /ch1/readme.md: -------------------------------------------------------------------------------- 1 | ## There are no code examples on Chapter 1 -------------------------------------------------------------------------------- /ch10/1_cuBLAS/CMakeLists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/GPU-Programming-with-CPP-and-CUDA/HEAD/ch10/1_cuBLAS/CMakeLists.txt -------------------------------------------------------------------------------- /ch10/1_cuBLAS/main.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/GPU-Programming-with-CPP-and-CUDA/HEAD/ch10/1_cuBLAS/main.cpp -------------------------------------------------------------------------------- /ch10/2_thrust/CMakeLists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/GPU-Programming-with-CPP-and-CUDA/HEAD/ch10/2_thrust/CMakeLists.txt -------------------------------------------------------------------------------- /ch10/2_thrust/main.cu: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/GPU-Programming-with-CPP-and-CUDA/HEAD/ch10/2_thrust/main.cu -------------------------------------------------------------------------------- /ch10/3_gtest/CMakeLists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/GPU-Programming-with-CPP-and-CUDA/HEAD/ch10/3_gtest/CMakeLists.txt -------------------------------------------------------------------------------- /ch10/3_gtest/include/vector_add.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/GPU-Programming-with-CPP-and-CUDA/HEAD/ch10/3_gtest/include/vector_add.h -------------------------------------------------------------------------------- /ch10/3_gtest/src/main.cu: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/GPU-Programming-with-CPP-and-CUDA/HEAD/ch10/3_gtest/src/main.cu -------------------------------------------------------------------------------- /ch10/3_gtest/test/test_vector_add.cu: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/GPU-Programming-with-CPP-and-CUDA/HEAD/ch10/3_gtest/test/test_vector_add.cu -------------------------------------------------------------------------------- /ch10/4_pytest/test_vector_add.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/GPU-Programming-with-CPP-and-CUDA/HEAD/ch10/4_pytest/test_vector_add.py -------------------------------------------------------------------------------- /ch10/4_pytest/vector_add.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/GPU-Programming-with-CPP-and-CUDA/HEAD/ch10/4_pytest/vector_add.py -------------------------------------------------------------------------------- /ch10/readme.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/GPU-Programming-with-CPP-and-CUDA/HEAD/ch10/readme.md -------------------------------------------------------------------------------- /ch2/Dockerfile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/GPU-Programming-with-CPP-and-CUDA/HEAD/ch2/Dockerfile -------------------------------------------------------------------------------- /ch2/readme.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/GPU-Programming-with-CPP-and-CUDA/HEAD/ch2/readme.md -------------------------------------------------------------------------------- /ch3/device_query.cu: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/GPU-Programming-with-CPP-and-CUDA/HEAD/ch3/device_query.cu -------------------------------------------------------------------------------- /ch3/hello_world.cu: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/GPU-Programming-with-CPP-and-CUDA/HEAD/ch3/hello_world.cu -------------------------------------------------------------------------------- /ch3/readme.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/GPU-Programming-with-CPP-and-CUDA/HEAD/ch3/readme.md -------------------------------------------------------------------------------- /ch4/1_primes/CMakeLists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/GPU-Programming-with-CPP-and-CUDA/HEAD/ch4/1_primes/CMakeLists.txt -------------------------------------------------------------------------------- /ch4/1_primes/primes.cu: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/GPU-Programming-with-CPP-and-CUDA/HEAD/ch4/1_primes/primes.cu -------------------------------------------------------------------------------- /ch4/2_vector_add/CMakeLists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/GPU-Programming-with-CPP-and-CUDA/HEAD/ch4/2_vector_add/CMakeLists.txt -------------------------------------------------------------------------------- /ch4/2_vector_add/vector_add.cu: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/GPU-Programming-with-CPP-and-CUDA/HEAD/ch4/2_vector_add/vector_add.cu -------------------------------------------------------------------------------- /ch4/3_euclidean_distance/CMakeLists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/GPU-Programming-with-CPP-and-CUDA/HEAD/ch4/3_euclidean_distance/CMakeLists.txt -------------------------------------------------------------------------------- /ch4/3_euclidean_distance/euclidean_distance.cu: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/GPU-Programming-with-CPP-and-CUDA/HEAD/ch4/3_euclidean_distance/euclidean_distance.cu -------------------------------------------------------------------------------- /ch4/readme.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/GPU-Programming-with-CPP-and-CUDA/HEAD/ch4/readme.md -------------------------------------------------------------------------------- /ch5/readme.md: -------------------------------------------------------------------------------- 1 | ## There is no code examples on Chapter 5 -------------------------------------------------------------------------------- /ch6/1_matrix_add/CMakeLists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/GPU-Programming-with-CPP-and-CUDA/HEAD/ch6/1_matrix_add/CMakeLists.txt -------------------------------------------------------------------------------- /ch6/1_matrix_add/matrix_add.cu: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/GPU-Programming-with-CPP-and-CUDA/HEAD/ch6/1_matrix_add/matrix_add.cu -------------------------------------------------------------------------------- /ch6/2_matrix_multiply/CMakeLists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/GPU-Programming-with-CPP-and-CUDA/HEAD/ch6/2_matrix_multiply/CMakeLists.txt -------------------------------------------------------------------------------- /ch6/2_matrix_multiply/matrix_multiply.cu: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/GPU-Programming-with-CPP-and-CUDA/HEAD/ch6/2_matrix_multiply/matrix_multiply.cu -------------------------------------------------------------------------------- /ch6/3_trapezoidal_travel/CMakeLists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/GPU-Programming-with-CPP-and-CUDA/HEAD/ch6/3_trapezoidal_travel/CMakeLists.txt -------------------------------------------------------------------------------- /ch6/3_trapezoidal_travel/trapezoidal_travel_basic.cu: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/GPU-Programming-with-CPP-and-CUDA/HEAD/ch6/3_trapezoidal_travel/trapezoidal_travel_basic.cu -------------------------------------------------------------------------------- /ch6/3_trapezoidal_travel/trapezoidal_travel_gpu_reduce.cu: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/GPU-Programming-with-CPP-and-CUDA/HEAD/ch6/3_trapezoidal_travel/trapezoidal_travel_gpu_reduce.cu -------------------------------------------------------------------------------- /ch6/4_sort_array/CMakeLists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/GPU-Programming-with-CPP-and-CUDA/HEAD/ch6/4_sort_array/CMakeLists.txt -------------------------------------------------------------------------------- /ch6/4_sort_array/sort_array.cu: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/GPU-Programming-with-CPP-and-CUDA/HEAD/ch6/4_sort_array/sort_array.cu -------------------------------------------------------------------------------- /ch6/5_weighted_moving_average/CMakeLists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/GPU-Programming-with-CPP-and-CUDA/HEAD/ch6/5_weighted_moving_average/CMakeLists.txt -------------------------------------------------------------------------------- /ch6/5_weighted_moving_average/weighted_moving_average.cu: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/GPU-Programming-with-CPP-and-CUDA/HEAD/ch6/5_weighted_moving_average/weighted_moving_average.cu -------------------------------------------------------------------------------- /ch6/readme.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/GPU-Programming-with-CPP-and-CUDA/HEAD/ch6/readme.md -------------------------------------------------------------------------------- /ch7/CMakeLists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/GPU-Programming-with-CPP-and-CUDA/HEAD/ch7/CMakeLists.txt -------------------------------------------------------------------------------- /ch7/matrix_multiply_float.cu: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/GPU-Programming-with-CPP-and-CUDA/HEAD/ch7/matrix_multiply_float.cu -------------------------------------------------------------------------------- /ch7/readme.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/GPU-Programming-with-CPP-and-CUDA/HEAD/ch7/readme.md -------------------------------------------------------------------------------- /ch8/1_vector_add/CMakeLists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/GPU-Programming-with-CPP-and-CUDA/HEAD/ch8/1_vector_add/CMakeLists.txt -------------------------------------------------------------------------------- /ch8/1_vector_add/vector_add.cu: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/GPU-Programming-with-CPP-and-CUDA/HEAD/ch8/1_vector_add/vector_add.cu -------------------------------------------------------------------------------- /ch8/2_mem_bandwidth/CMakeLists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/GPU-Programming-with-CPP-and-CUDA/HEAD/ch8/2_mem_bandwidth/CMakeLists.txt -------------------------------------------------------------------------------- /ch8/2_mem_bandwidth/mem_bandwidth.cu: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/GPU-Programming-with-CPP-and-CUDA/HEAD/ch8/2_mem_bandwidth/mem_bandwidth.cu -------------------------------------------------------------------------------- /ch8/2_mem_bandwidth/memcpy_benchmark.cu: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/GPU-Programming-with-CPP-and-CUDA/HEAD/ch8/2_mem_bandwidth/memcpy_benchmark.cu -------------------------------------------------------------------------------- /ch8/3_multiplying_with_streams/CMakeLists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/GPU-Programming-with-CPP-and-CUDA/HEAD/ch8/3_multiplying_with_streams/CMakeLists.txt -------------------------------------------------------------------------------- /ch8/3_multiplying_with_streams/vec_mat_mul_nostreams.cu: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/GPU-Programming-with-CPP-and-CUDA/HEAD/ch8/3_multiplying_with_streams/vec_mat_mul_nostreams.cu -------------------------------------------------------------------------------- /ch8/3_multiplying_with_streams/vec_mat_mul_streams.cu: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/GPU-Programming-with-CPP-and-CUDA/HEAD/ch8/3_multiplying_with_streams/vec_mat_mul_streams.cu -------------------------------------------------------------------------------- /ch8/4_multigpu/CMakeLists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/GPU-Programming-with-CPP-and-CUDA/HEAD/ch8/4_multigpu/CMakeLists.txt -------------------------------------------------------------------------------- /ch8/4_multigpu/multigpu.cu: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/GPU-Programming-with-CPP-and-CUDA/HEAD/ch8/4_multigpu/multigpu.cu -------------------------------------------------------------------------------- /ch8/readme.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/GPU-Programming-with-CPP-and-CUDA/HEAD/ch8/readme.md -------------------------------------------------------------------------------- /ch9/CMakeLists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/GPU-Programming-with-CPP-and-CUDA/HEAD/ch9/CMakeLists.txt -------------------------------------------------------------------------------- /ch9/include/vector_add.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/GPU-Programming-with-CPP-and-CUDA/HEAD/ch9/include/vector_add.h -------------------------------------------------------------------------------- /ch9/python/ctypes/test.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/GPU-Programming-with-CPP-and-CUDA/HEAD/ch9/python/ctypes/test.py -------------------------------------------------------------------------------- /ch9/python/ctypes/test_ctypes.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/GPU-Programming-with-CPP-and-CUDA/HEAD/ch9/python/ctypes/test_ctypes.py -------------------------------------------------------------------------------- /ch9/python/run_tests.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/GPU-Programming-with-CPP-and-CUDA/HEAD/ch9/python/run_tests.sh -------------------------------------------------------------------------------- /ch9/python/wrapper/pyproject_toml.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/GPU-Programming-with-CPP-and-CUDA/HEAD/ch9/python/wrapper/pyproject_toml.txt -------------------------------------------------------------------------------- /ch9/python/wrapper/setup.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/GPU-Programming-with-CPP-and-CUDA/HEAD/ch9/python/wrapper/setup.py -------------------------------------------------------------------------------- /ch9/python/wrapper/test.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/GPU-Programming-with-CPP-and-CUDA/HEAD/ch9/python/wrapper/test.py -------------------------------------------------------------------------------- /ch9/python/wrapper/test_vector_add_wrapper.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/GPU-Programming-with-CPP-and-CUDA/HEAD/ch9/python/wrapper/test_vector_add_wrapper.py -------------------------------------------------------------------------------- /ch9/python/wrapper/vector_add_wrapper.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/GPU-Programming-with-CPP-and-CUDA/HEAD/ch9/python/wrapper/vector_add_wrapper.c -------------------------------------------------------------------------------- /ch9/python/wrapper_np/setup.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/GPU-Programming-with-CPP-and-CUDA/HEAD/ch9/python/wrapper_np/setup.py -------------------------------------------------------------------------------- /ch9/python/wrapper_np/test.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/GPU-Programming-with-CPP-and-CUDA/HEAD/ch9/python/wrapper_np/test.py -------------------------------------------------------------------------------- /ch9/python/wrapper_np/test_vector_add_np_wrapper.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/GPU-Programming-with-CPP-and-CUDA/HEAD/ch9/python/wrapper_np/test_vector_add_np_wrapper.py -------------------------------------------------------------------------------- /ch9/python/wrapper_np/vector_add_np_wrapper.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/GPU-Programming-with-CPP-and-CUDA/HEAD/ch9/python/wrapper_np/vector_add_np_wrapper.c -------------------------------------------------------------------------------- /ch9/readme.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/GPU-Programming-with-CPP-and-CUDA/HEAD/ch9/readme.md -------------------------------------------------------------------------------- /ch9/src/vector_add.cu: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/GPU-Programming-with-CPP-and-CUDA/HEAD/ch9/src/vector_add.cu --------------------------------------------------------------------------------