├── .gitignore ├── 000_work_distribution ├── 0_even_job_length │ ├── 0_static.cpp │ └── 1_dynamic.cpp └── 1_uneven_job_length │ ├── 0_static.cpp │ └── 1_dynamic.cpp ├── 001_static_partitioning ├── 0_coarse_grained.cpp └── 1_fine_grained.cpp ├── 002_dynamic_partitioning ├── 0_static.cpp ├── 1_dynamic.cpp └── 2_dynamic.cpp ├── 003_false_sharing ├── 0_serial.cpp ├── 1_direct_sharing.cpp ├── 2_false_sharing.cpp └── 3_no_sharing.cpp ├── 004_double_buffering ├── 0_baseline.cpp └── 1_double_buffer.cpp ├── 005_spinlocks ├── 0_mutex.cpp └── 1_spinlock.cpp ├── 006_fairness ├── 0_baseline.cpp └── 1_ticket.cpp ├── 007_concurrent_queue ├── 0_baseline.cpp └── 1_tbb.cpp ├── 008_blocking_vs_nonblocking ├── 0_blocking.cpp └── 1_non_blocking.cpp ├── 009_lock_free_vs_wait_free ├── 0_lock_free.cpp └── 1_wait_free.cpp ├── 010_simd └── 0_dot_product.cpp ├── 011_intrinsics ├── 0_baseline.cpp └── 1_intrinsics.cpp ├── 012_unsafe_math ├── 0_perf │ ├── 0_baseline.cpp │ ├── 1_unsafe.cpp │ └── 2_tuned.cpp └── 1_numerics │ ├── 0_baseline.cpp │ ├── 1_unsafe.cpp │ └── 2_tuned.cpp ├── 013_thread_affinity ├── 0_os_scheduling.cpp └── 1_thread_affinity.cpp ├── 014_memory_reordering ├── 0_reorder.cpp └── 1_barrier.cpp ├── 015_thread_sanitizer └── 0_data_race.cpp ├── 016_openmp ├── 0_baseline.cpp ├── 1_openmp.cpp ├── 2_openmp_cpp11.cpp └── 3_tbb.cpp ├── 017_openmp_sync ├── 0_critical.cpp └── 1_atomic.cpp ├── 018_openmp_reduction ├── 0_baseline.cpp └── 1_reduction.cpp ├── 019_openmp_barrier ├── 0_baseline.cpp ├── 1_parallel_for.cpp └── 2_single.cpp ├── 020_openmp_nowait ├── 0_baseline.cpp └── 1_nowait.cpp ├── 021_mpi ├── 0_mpi.cpp └── 1_mpi_send_recv.cpp ├── 022_mpi_sum_reduction └── 0_sum_reduction.cpp ├── 023_mpi_gaussian_elimination ├── 0_baseline.cpp └── 1_mpi.cpp ├── 024_mpi_gauss_cyclic_mapping ├── 0_baseline.cpp └── 1_cyclic_striped.cpp ├── 025_openmp_target ├── 0_baseline.cpp └── 1_target.cpp ├── LICENSE └── README.md /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoffeeBeforeArch/parallel_cpp/HEAD/.gitignore -------------------------------------------------------------------------------- /000_work_distribution/0_even_job_length/0_static.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoffeeBeforeArch/parallel_cpp/HEAD/000_work_distribution/0_even_job_length/0_static.cpp -------------------------------------------------------------------------------- /000_work_distribution/0_even_job_length/1_dynamic.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoffeeBeforeArch/parallel_cpp/HEAD/000_work_distribution/0_even_job_length/1_dynamic.cpp -------------------------------------------------------------------------------- /000_work_distribution/1_uneven_job_length/0_static.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoffeeBeforeArch/parallel_cpp/HEAD/000_work_distribution/1_uneven_job_length/0_static.cpp -------------------------------------------------------------------------------- /000_work_distribution/1_uneven_job_length/1_dynamic.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoffeeBeforeArch/parallel_cpp/HEAD/000_work_distribution/1_uneven_job_length/1_dynamic.cpp -------------------------------------------------------------------------------- /001_static_partitioning/0_coarse_grained.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoffeeBeforeArch/parallel_cpp/HEAD/001_static_partitioning/0_coarse_grained.cpp -------------------------------------------------------------------------------- /001_static_partitioning/1_fine_grained.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoffeeBeforeArch/parallel_cpp/HEAD/001_static_partitioning/1_fine_grained.cpp -------------------------------------------------------------------------------- /002_dynamic_partitioning/0_static.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoffeeBeforeArch/parallel_cpp/HEAD/002_dynamic_partitioning/0_static.cpp -------------------------------------------------------------------------------- /002_dynamic_partitioning/1_dynamic.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoffeeBeforeArch/parallel_cpp/HEAD/002_dynamic_partitioning/1_dynamic.cpp -------------------------------------------------------------------------------- /002_dynamic_partitioning/2_dynamic.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoffeeBeforeArch/parallel_cpp/HEAD/002_dynamic_partitioning/2_dynamic.cpp -------------------------------------------------------------------------------- /003_false_sharing/0_serial.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoffeeBeforeArch/parallel_cpp/HEAD/003_false_sharing/0_serial.cpp -------------------------------------------------------------------------------- /003_false_sharing/1_direct_sharing.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoffeeBeforeArch/parallel_cpp/HEAD/003_false_sharing/1_direct_sharing.cpp -------------------------------------------------------------------------------- /003_false_sharing/2_false_sharing.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoffeeBeforeArch/parallel_cpp/HEAD/003_false_sharing/2_false_sharing.cpp -------------------------------------------------------------------------------- /003_false_sharing/3_no_sharing.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoffeeBeforeArch/parallel_cpp/HEAD/003_false_sharing/3_no_sharing.cpp -------------------------------------------------------------------------------- /004_double_buffering/0_baseline.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoffeeBeforeArch/parallel_cpp/HEAD/004_double_buffering/0_baseline.cpp -------------------------------------------------------------------------------- /004_double_buffering/1_double_buffer.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoffeeBeforeArch/parallel_cpp/HEAD/004_double_buffering/1_double_buffer.cpp -------------------------------------------------------------------------------- /005_spinlocks/0_mutex.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoffeeBeforeArch/parallel_cpp/HEAD/005_spinlocks/0_mutex.cpp -------------------------------------------------------------------------------- /005_spinlocks/1_spinlock.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoffeeBeforeArch/parallel_cpp/HEAD/005_spinlocks/1_spinlock.cpp -------------------------------------------------------------------------------- /006_fairness/0_baseline.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoffeeBeforeArch/parallel_cpp/HEAD/006_fairness/0_baseline.cpp -------------------------------------------------------------------------------- /006_fairness/1_ticket.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoffeeBeforeArch/parallel_cpp/HEAD/006_fairness/1_ticket.cpp -------------------------------------------------------------------------------- /007_concurrent_queue/0_baseline.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoffeeBeforeArch/parallel_cpp/HEAD/007_concurrent_queue/0_baseline.cpp -------------------------------------------------------------------------------- /007_concurrent_queue/1_tbb.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoffeeBeforeArch/parallel_cpp/HEAD/007_concurrent_queue/1_tbb.cpp -------------------------------------------------------------------------------- /008_blocking_vs_nonblocking/0_blocking.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoffeeBeforeArch/parallel_cpp/HEAD/008_blocking_vs_nonblocking/0_blocking.cpp -------------------------------------------------------------------------------- /008_blocking_vs_nonblocking/1_non_blocking.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoffeeBeforeArch/parallel_cpp/HEAD/008_blocking_vs_nonblocking/1_non_blocking.cpp -------------------------------------------------------------------------------- /009_lock_free_vs_wait_free/0_lock_free.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoffeeBeforeArch/parallel_cpp/HEAD/009_lock_free_vs_wait_free/0_lock_free.cpp -------------------------------------------------------------------------------- /009_lock_free_vs_wait_free/1_wait_free.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoffeeBeforeArch/parallel_cpp/HEAD/009_lock_free_vs_wait_free/1_wait_free.cpp -------------------------------------------------------------------------------- /010_simd/0_dot_product.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoffeeBeforeArch/parallel_cpp/HEAD/010_simd/0_dot_product.cpp -------------------------------------------------------------------------------- /011_intrinsics/0_baseline.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoffeeBeforeArch/parallel_cpp/HEAD/011_intrinsics/0_baseline.cpp -------------------------------------------------------------------------------- /011_intrinsics/1_intrinsics.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoffeeBeforeArch/parallel_cpp/HEAD/011_intrinsics/1_intrinsics.cpp -------------------------------------------------------------------------------- /012_unsafe_math/0_perf/0_baseline.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoffeeBeforeArch/parallel_cpp/HEAD/012_unsafe_math/0_perf/0_baseline.cpp -------------------------------------------------------------------------------- /012_unsafe_math/0_perf/1_unsafe.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoffeeBeforeArch/parallel_cpp/HEAD/012_unsafe_math/0_perf/1_unsafe.cpp -------------------------------------------------------------------------------- /012_unsafe_math/0_perf/2_tuned.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoffeeBeforeArch/parallel_cpp/HEAD/012_unsafe_math/0_perf/2_tuned.cpp -------------------------------------------------------------------------------- /012_unsafe_math/1_numerics/0_baseline.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoffeeBeforeArch/parallel_cpp/HEAD/012_unsafe_math/1_numerics/0_baseline.cpp -------------------------------------------------------------------------------- /012_unsafe_math/1_numerics/1_unsafe.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoffeeBeforeArch/parallel_cpp/HEAD/012_unsafe_math/1_numerics/1_unsafe.cpp -------------------------------------------------------------------------------- /012_unsafe_math/1_numerics/2_tuned.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoffeeBeforeArch/parallel_cpp/HEAD/012_unsafe_math/1_numerics/2_tuned.cpp -------------------------------------------------------------------------------- /013_thread_affinity/0_os_scheduling.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoffeeBeforeArch/parallel_cpp/HEAD/013_thread_affinity/0_os_scheduling.cpp -------------------------------------------------------------------------------- /013_thread_affinity/1_thread_affinity.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoffeeBeforeArch/parallel_cpp/HEAD/013_thread_affinity/1_thread_affinity.cpp -------------------------------------------------------------------------------- /014_memory_reordering/0_reorder.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoffeeBeforeArch/parallel_cpp/HEAD/014_memory_reordering/0_reorder.cpp -------------------------------------------------------------------------------- /014_memory_reordering/1_barrier.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoffeeBeforeArch/parallel_cpp/HEAD/014_memory_reordering/1_barrier.cpp -------------------------------------------------------------------------------- /015_thread_sanitizer/0_data_race.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoffeeBeforeArch/parallel_cpp/HEAD/015_thread_sanitizer/0_data_race.cpp -------------------------------------------------------------------------------- /016_openmp/0_baseline.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoffeeBeforeArch/parallel_cpp/HEAD/016_openmp/0_baseline.cpp -------------------------------------------------------------------------------- /016_openmp/1_openmp.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoffeeBeforeArch/parallel_cpp/HEAD/016_openmp/1_openmp.cpp -------------------------------------------------------------------------------- /016_openmp/2_openmp_cpp11.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoffeeBeforeArch/parallel_cpp/HEAD/016_openmp/2_openmp_cpp11.cpp -------------------------------------------------------------------------------- /016_openmp/3_tbb.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoffeeBeforeArch/parallel_cpp/HEAD/016_openmp/3_tbb.cpp -------------------------------------------------------------------------------- /017_openmp_sync/0_critical.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoffeeBeforeArch/parallel_cpp/HEAD/017_openmp_sync/0_critical.cpp -------------------------------------------------------------------------------- /017_openmp_sync/1_atomic.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoffeeBeforeArch/parallel_cpp/HEAD/017_openmp_sync/1_atomic.cpp -------------------------------------------------------------------------------- /018_openmp_reduction/0_baseline.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoffeeBeforeArch/parallel_cpp/HEAD/018_openmp_reduction/0_baseline.cpp -------------------------------------------------------------------------------- /018_openmp_reduction/1_reduction.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoffeeBeforeArch/parallel_cpp/HEAD/018_openmp_reduction/1_reduction.cpp -------------------------------------------------------------------------------- /019_openmp_barrier/0_baseline.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoffeeBeforeArch/parallel_cpp/HEAD/019_openmp_barrier/0_baseline.cpp -------------------------------------------------------------------------------- /019_openmp_barrier/1_parallel_for.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoffeeBeforeArch/parallel_cpp/HEAD/019_openmp_barrier/1_parallel_for.cpp -------------------------------------------------------------------------------- /019_openmp_barrier/2_single.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoffeeBeforeArch/parallel_cpp/HEAD/019_openmp_barrier/2_single.cpp -------------------------------------------------------------------------------- /020_openmp_nowait/0_baseline.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoffeeBeforeArch/parallel_cpp/HEAD/020_openmp_nowait/0_baseline.cpp -------------------------------------------------------------------------------- /020_openmp_nowait/1_nowait.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoffeeBeforeArch/parallel_cpp/HEAD/020_openmp_nowait/1_nowait.cpp -------------------------------------------------------------------------------- /021_mpi/0_mpi.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoffeeBeforeArch/parallel_cpp/HEAD/021_mpi/0_mpi.cpp -------------------------------------------------------------------------------- /021_mpi/1_mpi_send_recv.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoffeeBeforeArch/parallel_cpp/HEAD/021_mpi/1_mpi_send_recv.cpp -------------------------------------------------------------------------------- /022_mpi_sum_reduction/0_sum_reduction.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoffeeBeforeArch/parallel_cpp/HEAD/022_mpi_sum_reduction/0_sum_reduction.cpp -------------------------------------------------------------------------------- /023_mpi_gaussian_elimination/0_baseline.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoffeeBeforeArch/parallel_cpp/HEAD/023_mpi_gaussian_elimination/0_baseline.cpp -------------------------------------------------------------------------------- /023_mpi_gaussian_elimination/1_mpi.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoffeeBeforeArch/parallel_cpp/HEAD/023_mpi_gaussian_elimination/1_mpi.cpp -------------------------------------------------------------------------------- /024_mpi_gauss_cyclic_mapping/0_baseline.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoffeeBeforeArch/parallel_cpp/HEAD/024_mpi_gauss_cyclic_mapping/0_baseline.cpp -------------------------------------------------------------------------------- /024_mpi_gauss_cyclic_mapping/1_cyclic_striped.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoffeeBeforeArch/parallel_cpp/HEAD/024_mpi_gauss_cyclic_mapping/1_cyclic_striped.cpp -------------------------------------------------------------------------------- /025_openmp_target/0_baseline.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoffeeBeforeArch/parallel_cpp/HEAD/025_openmp_target/0_baseline.cpp -------------------------------------------------------------------------------- /025_openmp_target/1_target.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoffeeBeforeArch/parallel_cpp/HEAD/025_openmp_target/1_target.cpp -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoffeeBeforeArch/parallel_cpp/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # parallel_cpp --------------------------------------------------------------------------------