cs205-lecture-examples

Example codes used during Harvard CS205 lectures
git clone https://git.0xfab.ch/cs205-lecture-examples.git
Log | Files | Refs | README | LICENSE

ModeNameSize
-rw-r--r--LICENSE21L
-rw-r--r--README5L
-rw-r--r--lecture02/compilation_phases/.gitignore4L
-rw-r--r--lecture02/compilation_phases/Makefile22L
-rw-r--r--lecture02/compilation_phases/hello.c8L
-rw-r--r--lecture02/heap_and_stack/.gitignore2L
-rw-r--r--lecture02/heap_and_stack/Makefile13L
-rw-r--r--lecture02/heap_and_stack/heap_stack.c23L
-rw-r--r--lecture02/heap_and_stack/stackoverflow.c22L
-rw-r--r--lecture03/multi_index_and_flat_index/.gitignore1L
-rw-r--r--lecture03/multi_index_and_flat_index/Makefile8L
-rw-r--r--lecture03/multi_index_and_flat_index/multi_and_flat.cpp45L
-rw-r--r--lecture04/counter/.gitignore1L
-rw-r--r--lecture04/counter/Makefile8L
-rw-r--r--lecture04/counter/counter.cpp25L
-rw-r--r--lecture05/address_sanitizer/openmp/.gitignore3L
-rw-r--r--lecture05/address_sanitizer/openmp/Makefile23L
-rw-r--r--lecture05/address_sanitizer/openmp/two_ompthreads.cpp28L
-rw-r--r--lecture05/address_sanitizer/pthreads/.gitignore3L
-rw-r--r--lecture05/address_sanitizer/pthreads/Makefile23L
-rw-r--r--lecture05/address_sanitizer/pthreads/two_pthreads.cpp63L
-rw-r--r--lecture05/sequential_consistency/.gitignore2L
-rw-r--r--lecture05/sequential_consistency/Makefile14L
-rw-r--r--lecture05/sequential_consistency/README.md5L
-rw-r--r--lecture05/sequential_consistency/scenario_1_3.cpp51L
-rw-r--r--lecture05/sequential_consistency/scenario_2.cpp34L
-rw-r--r--lecture06/omp_conditional/.gitignore2L
-rw-r--r--lecture06/omp_conditional/Makefile14L
-rw-r--r--lecture06/omp_conditional/omp_conditional.cpp12L
-rw-r--r--lecture06/omp_demo/.gitignore1L
-rw-r--r--lecture06/omp_demo/Makefile9L
-rw-r--r--lecture06/omp_demo/omp_demo.cpp19L
-rw-r--r--lecture07_08/omp_critical/.gitignore2L
-rw-r--r--lecture07_08/omp_critical/Makefile14L
-rw-r--r--lecture07_08/omp_critical/omp_critical.cpp38L
-rw-r--r--lecture07_08/omp_data_attributes/.gitignore5L
-rw-r--r--lecture07_08/omp_data_attributes/Makefile29L
-rw-r--r--lecture07_08/omp_data_attributes/omp_firstprivate.cpp24L
-rw-r--r--lecture07_08/omp_data_attributes/omp_lastprivate.cpp41L
-rw-r--r--lecture07_08/omp_data_attributes/omp_private.cpp24L
-rw-r--r--lecture07_08/omp_data_attributes/omp_region.cpp54L
-rw-r--r--lecture07_08/omp_data_attributes/omp_static.cpp23L
-rw-r--r--lecture07_08/omp_data_attributes/omp_threadprivate.cpp33L
-rw-r--r--lecture07_08/omp_default/.gitignore1L
-rw-r--r--lecture07_08/omp_default/Makefile9L
-rw-r--r--lecture07_08/omp_default/omp_default.cpp15L
-rw-r--r--lecture07_08/omp_device/.gitignore1L
-rw-r--r--lecture07_08/omp_device/Makefile15L
-rw-r--r--lecture07_08/omp_device/omp_device.cpp19L
-rw-r--r--lecture07_08/omp_schedule/.gitignore1L
-rw-r--r--lecture07_08/omp_schedule/Makefile9L
-rw-r--r--lecture07_08/omp_schedule/omp_schedule.cpp38L
-rw-r--r--lecture07_08/omp_scoping/Makefile12L
-rw-r--r--lecture07_08/omp_scoping/main.c18L
-rw-r--r--lecture07_08/omp_scoping/myfunc.c6L
-rw-r--r--lecture07_08/omp_wtime/.gitignore1L
-rw-r--r--lecture07_08/omp_wtime/Makefile9L
-rw-r--r--lecture07_08/omp_wtime/omp_wtime.cpp35L
-rw-r--r--lecture09/thread_affinity/.gitignore4L
-rw-r--r--lecture09/thread_affinity/Makefile20L
-rw-r--r--lecture09/thread_affinity/affinity.cpp35L
-rw-r--r--lecture09/thread_affinity/affinity_close.cpp35L
-rw-r--r--lecture09/thread_affinity/affinity_master.cpp35L
-rw-r--r--lecture09/thread_affinity/affinity_spread.cpp35L
-rw-r--r--lecture09/thread_affinity/helper.h26L
-rwxr-xr-xlecture09/thread_affinity/omp_places_cores.sh2L
-rwxr-xr-xlecture09/thread_affinity/omp_places_sockets.sh2L
-rwxr-xr-xlecture09/thread_affinity/omp_places_threads.sh2L
-rwxr-xr-xlecture09/thread_affinity/omp_proc_bind_close.sh2L
-rwxr-xr-xlecture09/thread_affinity/omp_proc_bind_false.sh2L
-rwxr-xr-xlecture09/thread_affinity/omp_proc_bind_master.sh2L
-rwxr-xr-xlecture09/thread_affinity/omp_proc_bind_spread.sh2L
-rwxr-xr-xlecture09/thread_affinity/omp_proc_bind_true.sh2L
-rw-r--r--lecture10/openmp_overhead/AMD_Opteron/openmp_overhead.pdf190704B
-rw-r--r--lecture10/openmp_overhead/AMD_Opteron/proc_bind_false.dat8L
-rw-r--r--lecture10/openmp_overhead/AMD_Opteron/proc_bind_true.dat8L
-rw-r--r--lecture10/openmp_overhead/Intel_Xeon2683v4/openmp_overhead.pdf186498B
-rw-r--r--lecture10/openmp_overhead/Intel_Xeon2683v4/proc_bind_false.dat7L
-rw-r--r--lecture10/openmp_overhead/Intel_Xeon2683v4/proc_bind_true.dat7L
-rw-r--r--lecture10/openmp_overhead/openmpbench_C_v31/Licence.txt202L
-rw-r--r--lecture10/openmp_overhead/openmpbench_C_v31/Makefile69L
-rw-r--r--lecture10/openmp_overhead/openmpbench_C_v31/Makefile.defs10L
-rw-r--r--lecture10/openmp_overhead/openmpbench_C_v31/Makefile.defs.hector.cray10L
-rw-r--r--lecture10/openmp_overhead/openmpbench_C_v31/Makefile.defs.hector.pgi12L
-rw-r--r--lecture10/openmp_overhead/openmpbench_C_v31/Makefile.defs.magny0.gnu10L
-rw-r--r--lecture10/openmp_overhead/openmpbench_C_v31/Makefile.defs.magny0.sun10L
-rw-r--r--lecture10/openmp_overhead/openmpbench_C_v31/Makefile.defs.stokes.gnu10L
-rw-r--r--lecture10/openmp_overhead/openmpbench_C_v31/Makefile.defs.stokes.intel10L
-rw-r--r--lecture10/openmp_overhead/openmpbench_C_v31/README.txt113L
-rw-r--r--lecture10/openmp_overhead/openmpbench_C_v31/arraybench.c133L
-rw-r--r--lecture10/openmp_overhead/openmpbench_C_v31/arraybench.h52L
-rw-r--r--lecture10/openmp_overhead/openmpbench_C_v31/common.c374L
-rw-r--r--lecture10/openmp_overhead/openmpbench_C_v31/common.h80L
-rw-r--r--lecture10/openmp_overhead/openmpbench_C_v31/schedbench.c145L
-rw-r--r--lecture10/openmp_overhead/openmpbench_C_v31/schedbench.h46L
-rw-r--r--lecture10/openmp_overhead/openmpbench_C_v31/syncbench.c253L
-rw-r--r--lecture10/openmp_overhead/openmpbench_C_v31/syncbench.h63L
-rw-r--r--lecture10/openmp_overhead/openmpbench_C_v31/taskbench.c331L
-rw-r--r--lecture10/openmp_overhead/openmpbench_C_v31/taskbench.h66L
-rw-r--r--lecture10/openmp_overhead/plot_overhead.py35L
-rw-r--r--lecture10/openmp_overhead/run_benchmark.sh21L
-rw-r--r--lecture10/prefetch/Makefile13L
-rw-r--r--lecture10/prefetch/loop_unroll_prefetch.cpp44L
-rw-r--r--lecture11/hello_mpi/.gitignore1L
-rw-r--r--lecture11/hello_mpi/Makefile9L
-rw-r--r--lecture11/hello_mpi/hello_mpi.cpp17L
-rw-r--r--lecture11/rank_size_proc/.gitignore1L
-rw-r--r--lecture11/rank_size_proc/Makefile9L
-rw-r--r--lecture11/rank_size_proc/rank_size_proc.cpp35L
-rw-r--r--lecture11/thread_support/.gitignore1L
-rw-r--r--lecture11/thread_support/Makefile9L
-rw-r--r--lecture11/thread_support/thread_support.cpp27L
-rw-r--r--lecture12/endianness/.gitignore1L
-rw-r--r--lecture12/endianness/Makefile9L
-rw-r--r--lecture12/endianness/endianness.cpp44L
-rw-r--r--lecture12/mpi_bsend/.gitignore1L
-rw-r--r--lecture12/mpi_bsend/Makefile9L
-rw-r--r--lecture12/mpi_bsend/mpi_bsend.cpp37L
-rw-r--r--lecture12/mpi_gatherv_scatterv/.gitignore1L
-rw-r--r--lecture12/mpi_gatherv_scatterv/Makefile9L
-rw-r--r--lecture12/mpi_gatherv_scatterv/mpi_gatherv_scatterv.cpp78L
-rw-r--r--lecture12/mpi_get_count/.gitignore1L
-rw-r--r--lecture12/mpi_get_count/Makefile9L
-rw-r--r--lecture12/mpi_get_count/mpi_get_count.cpp33L
-rw-r--r--lecture12/mpi_minloc/.gitignore1L
-rw-r--r--lecture12/mpi_minloc/Makefile9L
-rw-r--r--lecture12/mpi_minloc/mpi_minloc.cpp31L
-rw-r--r--lecture12/mpi_p2p/.gitignore1L
-rw-r--r--lecture12/mpi_p2p/Makefile9L
-rw-r--r--lecture12/mpi_p2p/mpi_p2p.cpp22L
-rw-r--r--lecture12/mpi_pi/.gitignore3L
-rw-r--r--lecture12/mpi_pi/Makefile17L
-rw-r--r--lecture12/mpi_pi/mpi_pi.cpp45L
-rw-r--r--lecture12/mpi_pi/mpi_pi_reduction.cpp33L
-rw-r--r--lecture12/mpi_pi/mpi_pi_reduction_inplace.cpp38L
-rw-r--r--lecture12/mpi_rsend/.gitignore2L
-rw-r--r--lecture12/mpi_rsend/Makefile20L
-rw-r--r--lecture12/mpi_rsend/mpi_irsend.cpp46L
-rw-r--r--lecture12/mpi_rsend/mpi_rsend.cpp41L
-rw-r--r--lecture13/mpi_1D_diffusion/.gitignore4L
-rw-r--r--lecture13/mpi_1D_diffusion/IO.h45L
-rw-r--r--lecture13/mpi_1D_diffusion/Makefile22L
-rw-r--r--lecture13/mpi_1D_diffusion/blocking.cpp45L
-rw-r--r--lecture13/mpi_1D_diffusion/nonblocking.cpp54L
-rw-r--r--lecture13/mpi_1D_diffusion/plot.py19L
-rw-r--r--lecture13/mpi_cyclic_shift/.gitignore1L
-rw-r--r--lecture13/mpi_cyclic_shift/Makefile14L
-rw-r--r--lecture13/mpi_cyclic_shift/mpi_cyclic_shift.cpp59L
-rw-r--r--lecture13/mpi_cyclic_shift/mpi_sendrecv.cpp42L
-rw-r--r--lecture13/mpi_p2p_nonblocking/.gitignore1L
-rw-r--r--lecture13/mpi_p2p_nonblocking/Makefile9L
-rw-r--r--lecture13/mpi_p2p_nonblocking/mpi_p2p_nonblocking.cpp25L
-rw-r--r--lecture14/mpi_1D_diffusion_IO/.gitignore4L
-rw-r--r--lecture14/mpi_1D_diffusion_IO/IO.h144L
-rw-r--r--lecture14/mpi_1D_diffusion_IO/Makefile13L
-rw-r--r--lecture14/mpi_1D_diffusion_IO/nonblocking.cpp58L
-rw-r--r--lecture14/mpi_1D_diffusion_IO/plot.py52L
-rw-r--r--lecture14/parallel_hdf5/.gitignore1L
-rw-r--r--lecture14/parallel_hdf5/Makefile12L
-rw-r--r--lecture14/parallel_hdf5/data.h520920B
-rw-r--r--lecture14/parallel_hdf5/data.xmf23L
-rw-r--r--lecture14/parallel_hdf5/hdf5IO.h98L
-rw-r--r--lecture14/parallel_hdf5/hdf5_in_python.py18L
-rw-r--r--lecture14/parallel_hdf5/parallel_hdf5.cpp44L
-rw-r--r--lecture14/parallel_hdf5/submit.sh23L
-rw-r--r--lecture14/parallel_hdf5/xdmf_wrapper.h46L
-rw-r--r--lecture15/papi_examples_HW2/asm/.gitignore1L
-rw-r--r--lecture15/papi_examples_HW2/asm/Makefile12L
-rw-r--r--lecture15/papi_examples_HW2/asm/kernel.s19L
-rw-r--r--lecture15/papi_examples_HW2/asm/test.cpp61L
-rw-r--r--lecture15/papi_examples_HW2/daxpy/.gitignore2L
-rw-r--r--lecture15/papi_examples_HW2/daxpy/Makefile25L
-rw-r--r--lecture15/papi_examples_HW2/daxpy/daxpy.cpp106L
-rwxr-xr-xlecture15/papi_examples_HW2/daxpy/disassemble.sh9L
-rw-r--r--lecture15/papi_examples_HW2/dgemm/.gitignore2L
-rw-r--r--lecture15/papi_examples_HW2/dgemm/Makefile29L
-rw-r--r--lecture15/papi_examples_HW2/dgemm/dgemm.cpp139L
-rwxr-xr-xlecture15/papi_examples_HW2/dgemm/disassemble.sh9L
-rw-r--r--lecture15/papi_examples_HW2/sgemv/.gitignore2L
-rw-r--r--lecture15/papi_examples_HW2/sgemv/Makefile25L
-rwxr-xr-xlecture15/papi_examples_HW2/sgemv/disassemble.sh9L
-rw-r--r--lecture15/papi_examples_HW2/sgemv/sgemv.cpp104L
-rw-r--r--lecture16/allocator_test/.gitignore1L
-rw-r--r--lecture16/allocator_test/Makefile9L
-rw-r--r--lecture16/allocator_test/allocator_test.cpp55L
-rw-r--r--lecture16/pointer_dereference/.gitignore1L
-rw-r--r--lecture16/pointer_dereference/Makefile9L
-rw-r--r--lecture16/pointer_dereference/pointer_dereference.cpp15L
-rw-r--r--lecture17/registers/.gitignore2L
-rw-r--r--lecture17/registers/Makefile12L
-rw-r--r--lecture17/registers/registers.s11L
-rw-r--r--lecture18_19/aliasing/.gitignore1L
-rw-r--r--lecture18_19/aliasing/Makefile12L
-rw-r--r--lecture18_19/aliasing/aliasing.c13L
-rw-r--r--lecture18_19/aliasing/main.c15L
-rw-r--r--lecture18_19/align/.gitignore1L
-rw-r--r--lecture18_19/align/Makefile7L
-rw-r--r--lecture18_19/align/align.c30L
-rw-r--r--lecture18_19/autovec/Makefile24L
-rw-r--r--lecture18_19/autovec/f.c20L
-rw-r--r--lecture18_19/intrinsics/_mm_set_ps1/.gitignore3L
-rw-r--r--lecture18_19/intrinsics/_mm_set_ps1/Makefile15L
-rw-r--r--lecture18_19/intrinsics/_mm_set_ps1/main.c9L
-rw-r--r--lecture18_19/intrinsics/_mm_set_ps1/ones.c6L
-rw-r--r--lecture18_19/intrinsics/constants/set1_ps.c3L
-rw-r--r--lecture18_19/intrinsics/constants/set_ps.c5L
-rw-r--r--lecture18_19/intrinsics/constants/set_ss.c3L
-rw-r--r--lecture18_19/intrinsics/constants/setr_ps.c5L
-rw-r--r--lecture18_19/intrinsics/constants/setzero.c2L
-rw-r--r--lecture18_19/intrinsics/load_store/aligned_load_store.c7L
-rw-r--r--lecture18_19/intrinsics/load_store/reverse_load_store.c2L
-rw-r--r--lecture18_19/intrinsics/load_store/unaligned_load_store.c7L
-rw-r--r--lecture18_19/intrinsics/transpose/transpose.c15L
-rw-r--r--lecture18_19/saxpy/.gitignore2L
-rw-r--r--lecture18_19/saxpy/Makefile17L
-rw-r--r--lecture18_19/saxpy/main.c66L
-rw-r--r--lecture18_19/saxpy/saxpy.c7L
-rw-r--r--lecture18_19/saxpy/saxpy.s26L
-rw-r--r--lecture18_19/saxpy/saxpy_SSE.c12L
-rw-r--r--lecture18_19/saxpy/saxpy_SSE.s30L
-rw-r--r--lecture18_19/saxpy/saxpy_SSE_FMA.c11L
-rw-r--r--lecture18_19/sgemv/.gitignore1L
-rw-r--r--lecture18_19/sgemv/Makefile9L
-rw-r--r--lecture18_19/sgemv/sgemv.cpp22L
-rw-r--r--lecture18_19/sgemv/sgemv.s73L
-rw-r--r--lecture20/ispc_data_layout/.gitignore2L
-rw-r--r--lecture20/ispc_data_layout/Makefile17L
-rw-r--r--lecture20/ispc_data_layout/kernels.ispc40L
-rw-r--r--lecture20/ispc_data_layout/main.c11L
-rw-r--r--lecture20/ispc_foreach/.gitignore2L
-rw-r--r--lecture20/ispc_foreach/Makefile17L
-rw-r--r--lecture20/ispc_foreach/kernels.ispc17L
-rw-r--r--lecture20/ispc_foreach/main.c10L
-rw-r--r--lecture20/ispc_pointers_arrays/.gitignore2L
-rw-r--r--lecture20/ispc_pointers_arrays/Makefile17L
-rw-r--r--lecture20/ispc_pointers_arrays/f.ispc35L
-rw-r--r--lecture20/ispc_pointers_arrays/main.c8L
-rw-r--r--lecture20/maximal_convergence/.gitignore2L
-rw-r--r--lecture20/maximal_convergence/Makefile17L
-rw-r--r--lecture20/maximal_convergence/f.ispc14L
-rw-r--r--lecture20/maximal_convergence/main.cpp8L
-rw-r--r--lecture20/sse_vector/.gitignore1L
-rw-r--r--lecture20/sse_vector/Makefile7L
-rw-r--r--lecture20/sse_vector/sse_vector.c8L
-rw-r--r--lecture21/cuda_vec_add/.gitignore2L
-rw-r--r--lecture21/cuda_vec_add/Makefile7L
-rw-r--r--lecture21/cuda_vec_add/add_kernel_grid.cu51L