├── .gitignore ├── 01_memcpy ├── Makefile ├── README.md ├── doc │ ├── INT_VECTOR_Comparison_Among_Metal_Implementations_relative.png │ ├── INT_VECTOR_Effect_of_Loop_Unrolling_in_C++_relative.png │ ├── INT_VECTOR_Effect_of_Multithreading_in_C++_relative.png │ ├── INT_VECTOR_Effect_of_Multithreading_with_memcpy()_relative.png │ ├── INT_VECTOR_Overview.png │ ├── INT_VECTOR_Performance_Relative_to_Baseline_relative.png │ ├── make_log.txt │ └── plot_spec.json ├── doc_ios │ ├── INSTRUCTION.txt │ ├── INT_VECTOR_Comparison_Among_Metal_Implementations_relative.png │ ├── INT_VECTOR_Effect_of_Loop_Unrolling_in_C++_relative.png │ ├── INT_VECTOR_Effect_of_Multithreading_in_C++_relative.png │ ├── INT_VECTOR_Effect_of_Multithreading_with_memcpy()_relative.png │ ├── INT_VECTOR_Overview.png │ ├── INT_VECTOR_Performance_Relative_to_Baseline_relative.png │ ├── make_log.txt │ ├── make_log_cleaned.txt │ └── plot_spec.json ├── metal │ ├── memcpy.metal │ ├── memcpy_metal_cpp.cpp │ ├── memcpy_metal_cpp.h │ ├── memcpy_metal_cpp_impl.h │ ├── memcpy_metal_cpp_impl.mm │ ├── memcpy_metal_objc.h │ └── memcpy_metal_objc.mm ├── side_experiments │ ├── test_copy.S │ ├── test_copy.cpp │ └── test_optimmization.cpp └── test_memcpy.cpp ├── 02_saxpy ├── Makefile ├── README.md ├── doc │ ├── DOUBLE_VECTOR_Comparison_Among_C++_Multithreaded_Implementations_relative.png │ ├── DOUBLE_VECTOR_Comparison_Among_CPU_Implementations.png │ ├── DOUBLE_VECTOR_Comparison_Among_NEON_Implementations_relative.png │ ├── DOUBLE_VECTOR_Overview.png │ ├── FLOAT_VECTOR_Comparison_Among_C++_Multithreaded_Implementations_relative.png │ ├── FLOAT_VECTOR_Comparison_Among_CPU_Implementations.png │ ├── FLOAT_VECTOR_Comparison_Among_NEON_Implementations_relative.png │ ├── FLOAT_VECTOR_Overview.png │ ├── make_log.txt │ └── plot_spec.json ├── doc_ios │ ├── DOUBLE_VECTOR_Comparison_Among_C++_Multithreaded_Implementations_relative.png │ ├── DOUBLE_VECTOR_Comparison_Among_CPU_Implementations.png │ ├── DOUBLE_VECTOR_Comparison_Among_NEON_Implementations_relative.png │ ├── DOUBLE_VECTOR_Overview.png │ ├── FLOAT_VECTOR_Comparison_Among_C++_Multithreaded_Implementations_relative.png │ ├── FLOAT_VECTOR_Comparison_Among_CPU_Implementations.png │ ├── FLOAT_VECTOR_Comparison_Among_NEON_Implementations_relative.png │ ├── FLOAT_VECTOR_Overview.png │ ├── make_log.txt │ ├── make_log_cleaned.txt │ └── plot_spec.json ├── metal │ ├── saxpy.metal │ ├── saxpy_metal_cpp.cpp │ ├── saxpy_metal_cpp.h │ ├── saxpy_metal_cpp_impl.h │ ├── saxpy_metal_cpp_impl.mm │ ├── saxpy_metal_objc.h │ └── saxpy_metal_objc.mm ├── side_experiments │ └── neon_vs_clang_optimizer.cpp └── test_saxpy.cpp ├── 03_dot ├── Makefile ├── README.md ├── doc │ ├── DOUBLE_VECTOR_Effect_of_NEON_Loop_Unrolling_relative.png │ ├── DOUBLE_VECTOR_Effect_of_NEON_Multithreading_relative.png │ ├── DOUBLE_VECTOR_Overview.png │ ├── FLOAT_VECTOR_Comparison_Among_Metal_Implementations_relative.png │ ├── FLOAT_VECTOR_Effect_of_NEON_Loop_Unrolling_relative.png │ ├── FLOAT_VECTOR_Effect_of_NEON_Multithreading_relative.png │ ├── FLOAT_VECTOR_Overview.png │ ├── make_log.txt │ └── plot_spec.json ├── doc_ios │ ├── DOUBLE_VECTOR_Effect_of_NEON_Loop_Unrolling_relative.png │ ├── DOUBLE_VECTOR_Effect_of_NEON_Multithreading_relative.png │ ├── DOUBLE_VECTOR_Overview.png │ ├── FLOAT_VECTOR_Comparison_Among_Metal_Implementations_relative.png │ ├── FLOAT_VECTOR_Effect_of_NEON_Loop_Unrolling_relative.png │ ├── FLOAT_VECTOR_Effect_of_NEON_Multithreading_relative.png │ ├── FLOAT_VECTOR_Overview.png │ ├── make_log.txt │ ├── make_log_cleaned.txt │ └── plot_spec.json ├── metal │ ├── dot.metal │ ├── dot_metal_cpp.cpp │ ├── dot_metal_cpp.h │ ├── dot_metal_cpp_impl.h │ ├── dot_metal_cpp_impl.mm │ ├── dot_metal_objc.h │ └── dot_metal_objc.mm └── test_dot.cpp ├── 04_prefix_sum ├── Makefile ├── README.md ├── doc │ ├── INT_VECTOR_Comparison_Among_CPU_Implementations_relative.png │ ├── INT_VECTOR_Comparison_Among_GPU_Implementations_relative.png │ ├── INT_VECTOR_Overview.png │ ├── make_log.txt │ └── plot_spec.json ├── doc_ios │ ├── INT_VECTOR_Comparison_Among_CPU_Implementations_relative.png │ ├── INT_VECTOR_Comparison_Among_GPU_Implementations_relative.png │ ├── INT_VECTOR_Overview.png │ ├── make_log.txt │ ├── make_log_cleaned.txt │ └── plot_spec.json ├── metal │ ├── prefix_sum_merrill_grimshaw.metal │ ├── prefix_sum_metal_cpp.cpp │ ├── prefix_sum_metal_cpp.h │ ├── prefix_sum_metal_cpp_impl.h │ ├── prefix_sum_metal_cpp_impl.mm │ ├── prefix_sum_metal_objc_merrill_grimshaw.h │ ├── prefix_sum_metal_objc_merrill_grimshaw.mm │ ├── prefix_sum_metal_objc_recursive.h │ ├── prefix_sum_metal_objc_recursive.mm │ └── prefix_sum_recursive.metal └── test_prefix_sum.cpp ├── 05_radix_sort ├── Makefile ├── README.md ├── doc │ ├── FLOAT_VECTOR_Comparison_Among_Metal_Implementations_relative.png │ ├── FLOAT_VECTOR_Comparison_among_CPU_Sort_relative.png │ ├── FLOAT_VECTOR_Overview.png │ ├── INT_VECTOR_Comparison_Among_Metal_Implementations_relative.png │ ├── INT_VECTOR_Comparison_among_CPU_Sort_relative.png │ ├── INT_VECTOR_Overview.png │ ├── make_log.txt │ └── plot_spec.json ├── doc_ios │ ├── FLOAT_VECTOR_Comparison_Among_Metal_Implementations_relative.png │ ├── FLOAT_VECTOR_Comparison_among_CPU_Sort_relative.png │ ├── FLOAT_VECTOR_Overview.png │ ├── INT_VECTOR_Comparison_Among_Metal_Implementations_relative.png │ ├── INT_VECTOR_Comparison_among_CPU_Sort_relative.png │ ├── INT_VECTOR_Overview.png │ ├── make_log.txt │ ├── make_log_cleaned.txt │ └── plot_spec.json ├── metal │ ├── bitonic_sort.metal │ ├── bitonic_sort_metal_cpp.cpp │ ├── bitonic_sort_metal_cpp.h │ ├── bitonic_sort_metal_cpp_impl.h │ ├── bitonic_sort_metal_cpp_impl.mm │ ├── bitonic_sort_metal_objc.h │ ├── bitonic_sort_metal_objc.mm │ ├── parallel_order_checking.metal │ ├── prefix_sum.metal │ ├── radix_sort.metal │ ├── radix_sort_metal_cpp.cpp │ ├── radix_sort_metal_cpp.h │ ├── radix_sort_metal_cpp_impl.h │ ├── radix_sort_metal_cpp_impl.mm │ ├── radix_sort_metal_objc.h │ └── radix_sort_metal_objc.mm └── test_radix_sort.cpp ├── 06_nbody ├── Makefile ├── README.md ├── doc │ ├── FLOAT_ANY_Overview.png │ ├── FLOAT_STRUCTURE_OF_ARRAYS_Comparison_among_NEON_implementations_relative.png │ ├── FLOAT_STRUCTURE_OF_ARRAYS_Comparison_among_multithreaded_implementations_relative.png │ ├── make_log.txt │ └── plot_spec.json ├── doc_ios │ ├── FLOAT_ANY_Overview.png │ ├── FLOAT_STRUCTURE_OF_ARRAYS_Comparison_among_NEON_implementations_relative.png │ ├── FLOAT_STRUCTURE_OF_ARRAYS_Comparison_among_multithreaded_implementations_relative.png │ ├── make_log.txt │ ├── make_log_cleaned.txt │ └── plot_spec.json ├── metal │ ├── nbody.metal │ ├── nbody_metal_cpp.cpp │ ├── nbody_metal_cpp.h │ ├── nbody_metal_cpp_impl.h │ ├── nbody_metal_cpp_impl.mm │ ├── nbody_metal_objc.h │ └── nbody_metal_objc.mm ├── nbody_elements.h ├── nbody_elements_impl.h └── test_nbody.cpp ├── 07_2d_filter ├── Makefile ├── README.md ├── ciimage │ ├── convolution_2d_ciimage_cpp.cpp │ ├── convolution_2d_ciimage_cpp.h │ ├── convolution_2d_ciimage_cpp_impl.h │ ├── convolution_2d_ciimage_cpp_impl.mm │ ├── convolution_2d_ciimage_objc.h │ └── convolution_2d_ciimage_objc.mm ├── doc │ ├── FLOAT_MATRIX_ROW_MAJOR_Comparison_Among_CPU_Multithreaded_Implementations_relative.png │ ├── FLOAT_MATRIX_ROW_MAJOR_Comparison_Among_GPU_Implementations_relative.png │ ├── FLOAT_MATRIX_ROW_MAJOR_Overview.png │ ├── make_log.txt │ └── plot_spec.json ├── doc_ios │ ├── FLOAT_MATRIX_ROW_MAJOR_Comparison_Among_CPU_Multithreaded_Implementations_relative.png │ ├── FLOAT_MATRIX_ROW_MAJOR_Comparison_Among_GPU_Implementations_relative.png │ ├── FLOAT_MATRIX_ROW_MAJOR_Overview.png │ ├── make_log.txt │ ├── make_log_cleaned.txt │ └── plot_spec.json ├── metal │ ├── convolution_2d.metal │ ├── convolution_2d_metal_cpp.cpp │ ├── convolution_2d_metal_cpp.h │ ├── convolution_2d_metal_cpp_impl.h │ ├── convolution_2d_metal_cpp_impl.mm │ ├── convolution_2d_metal_objc_mps.h │ ├── convolution_2d_metal_objc_mps.mm │ ├── convolution_2d_metal_objc_own_shader.h │ └── convolution_2d_metal_objc_own_shader.mm └── test_convolution_2d.cpp ├── 08_sparse_matrix_vector_mul ├── Makefile ├── README.md ├── doc │ ├── DOUBLE_MATRIX_SPARSE_Comparison_Among_Multithreaded_Implementations_:_Double_relative.png │ ├── DOUBLE_MATRIX_SPARSE_Overview_:_Double.png │ ├── FLOAT_MATRIX_SPARSE_Comparison_Among_GPU_Implementations_:_Float_relative.png │ ├── FLOAT_MATRIX_SPARSE_Comparison_Among_Multithreaded_Implementations_:_Float_relative.png │ ├── FLOAT_MATRIX_SPARSE_Overview_:_Float.png │ ├── make_log.txt │ └── plot_spec.json ├── doc_ios │ ├── DOUBLE_MATRIX_SPARSE_Comparison_Among_Multithreaded_Implementations_:_Double_relative.png │ ├── DOUBLE_MATRIX_SPARSE_Overview_:_Double.png │ ├── FLOAT_MATRIX_SPARSE_Comparison_Among_GPU_Implementations_:_Float_relative.png │ ├── FLOAT_MATRIX_SPARSE_Comparison_Among_Multithreaded_Implementations_:_Float_relative.png │ ├── FLOAT_MATRIX_SPARSE_Overview_:_Float.png │ ├── make_log.txt │ ├── make_log_cleaned.txt │ └── plot_spec.json ├── metal │ ├── sparse_matrix_vector.metal │ ├── sparse_matrix_vector_metal_cpp.cpp │ ├── sparse_matrix_vector_metal_cpp.h │ ├── sparse_matrix_vector_metal_cpp_impl.h │ ├── sparse_matrix_vector_metal_cpp_impl.mm │ ├── sparse_matrix_vector_metal_objc.h │ └── sparse_matrix_vector_metal_objc.mm └── test_sparse_matrix_vector.cpp ├── 09_dense_matrix_vector_mul ├── Makefile ├── README.md ├── README_runningtime_double_colmajor.md ├── README_runningtime_double_rowmajor.md ├── README_runningtime_float_colmajor.md ├── README_runningtime_float_rowmajor.md ├── doc │ ├── DOUBLE_ANY_Overview_Double.png │ ├── DOUBLE_MATRIX_COL_MAJOR_Comparison_Among_CPP_Multithread_relative.png │ ├── DOUBLE_MATRIX_COL_MAJOR_Comparison_Among_NEON_Loop_Unrolling_relative.png │ ├── DOUBLE_MATRIX_COL_MAJOR_Comparison_Among_NEON_Multithread_relative.png │ ├── DOUBLE_MATRIX_COL_MAJOR_Overview.png │ ├── DOUBLE_MATRIX_ROW_MAJOR_Comparison_Among_CPP_Multithread_relative.png │ ├── DOUBLE_MATRIX_ROW_MAJOR_Comparison_Among_NEON_Loop_Unrolling_relative.png │ ├── DOUBLE_MATRIX_ROW_MAJOR_Comparison_Among_NEON_Multithread_relative.png │ ├── DOUBLE_MATRIX_ROW_MAJOR_Overview.png │ ├── FLOAT_ANY_Overview_Float.png │ ├── FLOAT_MATRIX_COL_MAJOR_Comparison_Among_CPP_Multithread_relative.png │ ├── FLOAT_MATRIX_COL_MAJOR_Comparison_Among_Metal_relative.png │ ├── FLOAT_MATRIX_COL_MAJOR_Comparison_Among_NEON_Loop_Unrolling_relative.png │ ├── FLOAT_MATRIX_COL_MAJOR_Comparison_Among_NEON_Multithread_relative.png │ ├── FLOAT_MATRIX_COL_MAJOR_Overview.png │ ├── FLOAT_MATRIX_ROW_MAJOR_Comparison_Among_CPP_Multithread_relative.png │ ├── FLOAT_MATRIX_ROW_MAJOR_Comparison_Among_Metal_relative.png │ ├── FLOAT_MATRIX_ROW_MAJOR_Comparison_Among_NEON_Loop_Unrolling_relative.png │ ├── FLOAT_MATRIX_ROW_MAJOR_Comparison_Among_NEON_Multithread_relative.png │ ├── FLOAT_MATRIX_ROW_MAJOR_Overview.png │ ├── make_log.txt │ └── plot_spec.json ├── doc_ios │ ├── DOUBLE_ANY_Overview_Double.png │ ├── DOUBLE_MATRIX_COL_MAJOR_Comparison_Among_CPP_Multithread_relative.png │ ├── DOUBLE_MATRIX_COL_MAJOR_Comparison_Among_NEON_Loop_Unrolling_relative.png │ ├── DOUBLE_MATRIX_COL_MAJOR_Comparison_Among_NEON_Multithread_relative.png │ ├── DOUBLE_MATRIX_COL_MAJOR_Overview.png │ ├── DOUBLE_MATRIX_ROW_MAJOR_Comparison_Among_CPP_Multithread_relative.png │ ├── DOUBLE_MATRIX_ROW_MAJOR_Comparison_Among_NEON_Loop_Unrolling_relative.png │ ├── DOUBLE_MATRIX_ROW_MAJOR_Comparison_Among_NEON_Multithread_relative.png │ ├── DOUBLE_MATRIX_ROW_MAJOR_Overview.png │ ├── FLOAT_ANY_Overview_Float.png │ ├── FLOAT_MATRIX_COL_MAJOR_Comparison_Among_CPP_Multithread_relative.png │ ├── FLOAT_MATRIX_COL_MAJOR_Comparison_Among_Metal_relative.png │ ├── FLOAT_MATRIX_COL_MAJOR_Comparison_Among_NEON_Loop_Unrolling_relative.png │ ├── FLOAT_MATRIX_COL_MAJOR_Comparison_Among_NEON_Multithread_relative.png │ ├── FLOAT_MATRIX_COL_MAJOR_Overview.png │ ├── FLOAT_MATRIX_ROW_MAJOR_Comparison_Among_CPP_Multithread_relative.png │ ├── FLOAT_MATRIX_ROW_MAJOR_Comparison_Among_Metal_relative.png │ ├── FLOAT_MATRIX_ROW_MAJOR_Comparison_Among_NEON_Loop_Unrolling_relative.png │ ├── FLOAT_MATRIX_ROW_MAJOR_Comparison_Among_NEON_Multithread_relative.png │ ├── FLOAT_MATRIX_ROW_MAJOR_Overview.png │ ├── make_log.txt │ ├── make_log_cleaned.txt │ └── plot_spec.json ├── metal │ ├── dense_matrix_vector.metal │ ├── dense_matrix_vector_metal_cpp.cpp │ ├── dense_matrix_vector_metal_cpp.h │ ├── dense_matrix_vector_metal_cpp_impl.h │ ├── dense_matrix_vector_metal_cpp_impl.mm │ ├── dense_matrix_vector_metal_objc_mps.h │ ├── dense_matrix_vector_metal_objc_mps.mm │ ├── dense_matrix_vector_metal_objc_own_shader.h │ └── dense_matrix_vector_metal_objc_own_shader.mm └── test_dense_matrix_vector.cpp ├── 10_cholesky_decomp ├── Makefile ├── README.md ├── doc │ ├── DOUBLE_ANY_Overview_:_Double.png │ ├── FLOAT_ANY_Overview_:_Float.png │ ├── FLOAT_MATRIX_COL_MAJOR_Comparison_of_two_Metal_implementations_relative.png │ ├── make_log.txt │ └── plot_spec.json ├── doc_ios │ ├── DOUBLE_ANY_Overview_:_Double.png │ ├── FLOAT_ANY_Overview_:_Float.png │ ├── FLOAT_MATRIX_COL_MAJOR_Comparison_of_two_Metal_implementations_relative.png │ ├── make_log.txt │ ├── make_log_cleaned.txt │ └── plot_spec.json ├── metal │ ├── cholesky.metal │ ├── cholesky_metal_cpp.cpp │ ├── cholesky_metal_cpp.h │ ├── cholesky_metal_cpp_impl.h │ ├── cholesky_metal_cpp_impl.mm │ ├── cholesky_metal_objc_mps.h │ ├── cholesky_metal_objc_mps.mm │ ├── cholesky_metal_objc_own_shader.h │ └── cholesky_metal_objc_own_shader.mm ├── test_case_cholesky.h ├── test_case_cholesky_baseline.h ├── test_case_cholesky_eigen3.h ├── test_case_cholesky_gsl.cpp ├── test_case_cholesky_gsl.h ├── test_case_cholesky_lapack.h ├── test_case_cholesky_lapack_inverse.h ├── test_case_cholesky_metal.h └── test_cholesky.cpp ├── 11_jacobi_solver ├── Makefile ├── README.md ├── README_runningtime_double_colmajor.md ├── README_runningtime_double_rowmajor.md ├── README_runningtime_float_colmajor.md ├── README_runningtime_float_rowmajor.md ├── doc │ ├── DOUBLE_ANY_Overview.png │ ├── DOUBLE_MATRIX_COL_MAJOR_Comparison_Among_NEON_Loop_Unrolling_relative.png │ ├── DOUBLE_MATRIX_COL_MAJOR_Comparison_Among_NEON_Multithreads_relative.png │ ├── DOUBLE_MATRIX_COL_MAJOR_Overview.png │ ├── DOUBLE_MATRIX_ROW_MAJOR_Comparison_Among_NEON_Loop_Unrolling_relative.png │ ├── DOUBLE_MATRIX_ROW_MAJOR_Comparison_Among_NEON_Multithreads_relative.png │ ├── DOUBLE_MATRIX_ROW_MAJOR_Overview.png │ ├── FLOAT_ANY_Overview.png │ ├── FLOAT_MATRIX_COL_MAJOR_Comparison_Among_NEON_Loop_Unrolling_relative.png │ ├── FLOAT_MATRIX_COL_MAJOR_Comparison_Among_NEON_Multithreads_relative.png │ ├── FLOAT_MATRIX_COL_MAJOR_Overview.png │ ├── FLOAT_MATRIX_ROW_MAJOR_Comparison_Among_NEON_Loop_Unrolling_relative.png │ ├── FLOAT_MATRIX_ROW_MAJOR_Comparison_Among_NEON_Multithreads_relative.png │ ├── FLOAT_MATRIX_ROW_MAJOR_Overview.png │ ├── make_log.txt │ └── plot_spec.json ├── doc_ios │ ├── DOUBLE_ANY_Overview.png │ ├── DOUBLE_MATRIX_COL_MAJOR_Comparison_Among_NEON_Loop_Unrolling_relative.png │ ├── DOUBLE_MATRIX_COL_MAJOR_Comparison_Among_NEON_Multithreads_relative.png │ ├── DOUBLE_MATRIX_COL_MAJOR_Overview.png │ ├── DOUBLE_MATRIX_ROW_MAJOR_Comparison_Among_NEON_Loop_Unrolling_relative.png │ ├── DOUBLE_MATRIX_ROW_MAJOR_Comparison_Among_NEON_Multithreads_relative.png │ ├── DOUBLE_MATRIX_ROW_MAJOR_Overview.png │ ├── FLOAT_ANY_Overview.png │ ├── FLOAT_MATRIX_COL_MAJOR_Comparison_Among_NEON_Loop_Unrolling_relative.png │ ├── FLOAT_MATRIX_COL_MAJOR_Comparison_Among_NEON_Multithreads_relative.png │ ├── FLOAT_MATRIX_COL_MAJOR_Overview.png │ ├── FLOAT_MATRIX_ROW_MAJOR_Comparison_Among_NEON_Loop_Unrolling_relative.png │ ├── FLOAT_MATRIX_ROW_MAJOR_Comparison_Among_NEON_Multithreads_relative.png │ ├── FLOAT_MATRIX_ROW_MAJOR_Overview.png │ ├── make_log.txt │ ├── make_log_cleaned.txt │ └── plot_spec.json ├── metal │ ├── jacobi_solver.metal │ ├── jacobi_solver_metal_cpp.cpp │ ├── jacobi_solver_metal_cpp.h │ ├── jacobi_solver_metal_cpp_impl.h │ ├── jacobi_solver_metal_cpp_impl.mm │ ├── jacobi_solver_metal_objc.h │ └── jacobi_solver_metal_objc.mm └── test_jacobi_solver.cpp ├── 12_gauss_seidel_solver ├── Makefile ├── README.md ├── doc │ ├── DOUBLE_ANY_Overview.png │ ├── DOUBLE_MATRIX_ROW_MAJOR_Comparison_Among_NEON_Loop_Unrolling_relative.png │ ├── FLOAT_ANY_Overview.png │ ├── FLOAT_MATRIX_ROW_MAJOR_Comparison_Among_NEON_Loop_Unrolling_relative.png │ ├── make_log.txt │ └── plot_spec.json ├── doc_ios │ ├── DOUBLE_ANY_Overview.png │ ├── DOUBLE_MATRIX_ROW_MAJOR_Comparison_Among_NEON_Loop_Unrolling_relative.png │ ├── FLOAT_ANY_Overview.png │ ├── FLOAT_MATRIX_ROW_MAJOR_Comparison_Among_NEON_Loop_Unrolling_relative.png │ ├── make_log.txt │ ├── make_log_cleaned.txt │ └── plot_spec.json ├── metal │ ├── gauss_seidel_solver.metal │ ├── gauss_seidel_solver_metal_cpp.cpp │ ├── gauss_seidel_solver_metal_cpp.h │ ├── gauss_seidel_solver_metal_cpp_impl.h │ ├── gauss_seidel_solver_metal_cpp_impl.mm │ ├── gauss_seidel_solver_metal_objc.h │ └── gauss_seidel_solver_metal_objc.mm └── test_gauss_seidel_solver.cpp ├── 13_fft ├── Makefile ├── README.md ├── doc │ ├── make_log.txt │ └── plot_spec.json ├── doc_ios │ ├── make_log.txt │ └── make_log_cleaned.txt ├── metal │ ├── fft.metal │ ├── fft_metal_cpp.cpp │ ├── fft_metal_cpp.h │ ├── fft_metal_cpp_impl.h │ ├── fft_metal_cpp_impl.mm │ ├── fft_metal_objc.h │ └── fft_metal_objc.mm └── test_fft.cpp ├── 14_lcp ├── Makefile ├── NotesOnBilateralConstraintsForLemkeSolvers.md ├── NotesOnBoxedConstraintsForLemkeSolvers.md ├── README.md ├── bullet3 │ ├── README.txt │ ├── btAlignedAllocator.cpp │ ├── btAlignedAllocator.h │ ├── btAlignedObjectArray.h │ ├── btLemkeAlgorithm.cpp │ ├── btLemkeAlgorithm.h │ ├── btMatrixX.h │ └── btScalar.h ├── doc │ ├── DOUBLE_RANDOM_DIAGONALLY_DOMINANT_SKEWSYMMETRIC_Running_time_for_randomly_generated_diagnoally_dominant_skew-symmetric_matrices.png │ ├── DOUBLE_RANDOM_DIAGONALLY_DOMINANT_SYMMETRIC_Running_time_for_randomly_generated_diagnoally_dominant_symmetric_matrices.png │ ├── DOUBLE_REAL_NONSYMMETRIC_MU02_Running_time_for_real_contact_dry_frictional_cone_constraints_with_mu=0.2.png │ ├── DOUBLE_REAL_NONSYMMETRIC_MU08_Running_time_for_real_contact_dry_frictional_cone_constraints_with_mu=0.8.png │ ├── DOUBLE_REAL_SYMMETRIC_Running_time_for_real_contact_constraints_(symmetric_matrices).png │ ├── FLOAT_RANDOM_DIAGONALLY_DOMINANT_SKEWSYMMETRIC_Running_time_for_randomly_generated_diagnoally_dominant_skew-symmetric_matrices.png │ ├── FLOAT_RANDOM_DIAGONALLY_DOMINANT_SYMMETRIC_Running_time_for_randomly_generated_diagnoally_dominant_symmetric_matrices.png │ ├── FLOAT_REAL_NONSYMMETRIC_MU02_Running_time_for_real_contact_dry_frictional_cone_constraints_with_mu=0.2.png │ ├── FLOAT_REAL_NONSYMMETRIC_MU08_Running_time_for_real_contact_dry_frictional_cone_constraints_with_mu=0.8.png │ ├── FLOAT_REAL_SYMMETRIC_Running_time_for_real_contact_constraints_(symmetric_matrices).png │ ├── make_log.txt │ ├── pic1.png │ ├── pic2.png │ ├── pic3.png │ └── plot_spec.json ├── doc_ios │ ├── DOUBLE_RANDOM_DIAGONALLY_DOMINANT_SKEWSYMMETRIC_Residual_error_for_randomly_generated_diagnoally_dominant_skew-symmetric_matrices.png │ ├── DOUBLE_RANDOM_DIAGONALLY_DOMINANT_SKEWSYMMETRIC_Running_time_for_randomly_generated_diagnoally_dominant_skew-symmetric_matrices.png │ ├── DOUBLE_RANDOM_DIAGONALLY_DOMINANT_SYMMETRIC_Residual_error_for_randomly_generated_diagnoally_dominant_symmetric_matrices.png │ ├── DOUBLE_RANDOM_DIAGONALLY_DOMINANT_SYMMETRIC_Running_time_for_randomly_generated_diagnoally_dominant_symmetric_matrices.png │ ├── DOUBLE_REAL_NONSYMMETRIC_MU02_Residual_error_for_real_contact_dry_frictional_cone_constraints_with_mu=0.2.png │ ├── DOUBLE_REAL_NONSYMMETRIC_MU02_Running_time_for_real_contact_dry_frictional_cone_constraints_with_mu=0.2.png │ ├── DOUBLE_REAL_NONSYMMETRIC_MU08_Residual_error_for_real_contact_dry_frictional_cone_constraints_with_mu=0.8.png │ ├── DOUBLE_REAL_NONSYMMETRIC_MU08_Running_time_for_real_contact_dry_frictional_cone_constraints_with_mu=0.8.png │ ├── DOUBLE_REAL_SYMMETRIC_Residual_error_for_real_contact_constraints_(symmetric_matrices).png │ ├── DOUBLE_REAL_SYMMETRIC_Running_time_for_real_contact_constraints_(symmetric_matrices).png │ ├── FLOAT_RANDOM_DIAGONALLY_DOMINANT_SKEWSYMMETRIC_Iteraitons_for_randomly_generated_diagnoally_dominant_skew-symmetric_matrices.png │ ├── FLOAT_RANDOM_DIAGONALLY_DOMINANT_SKEWSYMMETRIC_Number_of_pivots_for_randomly_generated_diagnoally_dominant_skew-symmetric_matrices.png │ ├── FLOAT_RANDOM_DIAGONALLY_DOMINANT_SKEWSYMMETRIC_Residual_error_for_randomly_generated_diagnoally_dominant_skew-symmetric_matrices.png │ ├── FLOAT_RANDOM_DIAGONALLY_DOMINANT_SKEWSYMMETRIC_Running_time_for_randomly_generated_diagnoally_dominant_skew-symmetric_matrices.png │ ├── FLOAT_RANDOM_DIAGONALLY_DOMINANT_SYMMETRIC_Iteraitons_for_randomly_generated_diagnoally_dominant_symmetric_matrices.png │ ├── FLOAT_RANDOM_DIAGONALLY_DOMINANT_SYMMETRIC_Number_of_pivots_for_randomly_generated_diagnoally_dominant_symmetric_matrices.png │ ├── FLOAT_RANDOM_DIAGONALLY_DOMINANT_SYMMETRIC_Residual_error_for_randomly_generated_diagnoally_dominant_symmetric_matrices.png │ ├── FLOAT_RANDOM_DIAGONALLY_DOMINANT_SYMMETRIC_Running_time_for_randomly_generated_diagnoally_dominant_symmetric_matrices.png │ ├── FLOAT_REAL_NONSYMMETRIC_MU02_Iterations_for_real_contact_dry_frictional_cone_constraints_with_mu=0.2.png │ ├── FLOAT_REAL_NONSYMMETRIC_MU02_Number_of_pivots_for_real_contact_dry_frictional_cone_constraints_with_mu=0.2.png │ ├── FLOAT_REAL_NONSYMMETRIC_MU02_Residual_error_for_real_contact_dry_frictional_cone_constraints_with_mu=0.2.png │ ├── FLOAT_REAL_NONSYMMETRIC_MU02_Running_time_for_real_contact_dry_frictional_cone_constraints_with_mu=0.2.png │ ├── FLOAT_REAL_NONSYMMETRIC_MU08_Iterations_for_real_contact_dry_frictional_cone_constraints_with_mu=0.8.png │ ├── FLOAT_REAL_NONSYMMETRIC_MU08_Number_of_pivots_for_real_contact_dry_frictional_cone_constraints_with_mu=0.8.png │ ├── FLOAT_REAL_NONSYMMETRIC_MU08_Residual_error_for_real_contact_dry_frictional_cone_constraints_with_mu=0.8.png │ ├── FLOAT_REAL_NONSYMMETRIC_MU08_Running_time_for_real_contact_dry_frictional_cone_constraints_with_mu=0.8.png │ ├── FLOAT_REAL_SYMMETRIC_Iterations_for_real_contact_constraints_(symmetric_matrices).png │ ├── FLOAT_REAL_SYMMETRIC_Number_of_pivots_for_real_contact_constraints_(symmetric_matrices).png │ ├── FLOAT_REAL_SYMMETRIC_Residual_error_for_real_contact_constraints_(symmetric_matrices).png │ ├── FLOAT_REAL_SYMMETRIC_Running_time_for_real_contact_constraints_(symmetric_matrices).png │ ├── make_log.txt │ ├── make_log_cleaned.txt │ └── plot_spec.json ├── extra_reports │ ├── plot_spec_iteration.json │ ├── plot_spec_num_pivots.json │ ├── plot_spec_rms.json │ └── process_log_lcp.py ├── metal │ └── dummy.metal ├── test_case_lcp.h ├── test_case_lcp_lemke_baseline.h ├── test_case_lcp_lemke_bullet.h ├── test_case_lcp_lemke_neon.h ├── test_case_lcp_lemke_neon_multithread.h ├── test_case_lcp_lemke_vdsp.h ├── test_case_lcp_lemke_vdsp_multithread.h ├── test_case_lcp_pgs.h ├── test_case_lcp_pgs_sm.h ├── test_lcp.cpp ├── test_lcp_pattern_generator.h └── test_patterns │ ├── sample_data_1024_mu0.2.txt │ ├── sample_data_1024_mu0.8.txt │ ├── sample_data_1024_sym.txt │ ├── sample_data_128_mu0.2.txt │ ├── sample_data_128_mu0.8.txt │ ├── sample_data_128_sym.txt │ ├── sample_data_256_mu0.2.txt │ ├── sample_data_256_mu0.8.txt │ ├── sample_data_256_sym.txt │ ├── sample_data_32_mu0.2.txt │ ├── sample_data_32_mu0.8.txt │ ├── sample_data_32_sym.txt │ ├── sample_data_512_mu0.2.txt │ ├── sample_data_512_mu0.8.txt │ ├── sample_data_512_sym.txt │ ├── sample_data_64_mu0.2.txt │ ├── sample_data_64_mu0.8.txt │ └── sample_data_64_sym.txt ├── 15_conjugate_gradient ├── Makefile ├── README.md ├── doc │ ├── DOUBLE_MATRIX_ROW_MAJOR_Running_time_for_PD_Matrix_with_Cond_Num_1.0_-_100000.0.png │ ├── FLOAT_MATRIX_ROW_MAJOR_Number_of_Iterations_for_PD_Matrices_with_Cond_Num_1.0_-_100000.0.png │ ├── FLOAT_MATRIX_ROW_MAJOR_Running_time_for_PD_Matrix_with_Cond_Num_1.0_-_100000.0.png │ ├── make_log.txt │ └── plot_spec.json ├── doc_ios │ ├── DOUBLE_MATRIX_ROW_MAJOR_Running_time_for_PD_Matrix_with_Cond_Num_1.0_-_100000.0.png │ ├── FLOAT_MATRIX_ROW_MAJOR_Number_of_Iterations_for_PD_Matrices_with_Cond_Num_1.0_-_100000.0.png │ ├── FLOAT_MATRIX_ROW_MAJOR_Running_time_for_PD_Matrix_with_Cond_Num_1.0_-_100000.0.png │ ├── make_log.txt │ ├── make_log_cleaned.txt │ └── plot_spec.json ├── extra_reports │ ├── plot_spec_iteration.json │ └── process_log_extra.py ├── metal │ ├── conjugate_gradient.metal │ ├── conjugate_gradient_metal_cpp.cpp │ ├── conjugate_gradient_metal_cpp.h │ ├── conjugate_gradient_metal_cpp_impl.h │ ├── conjugate_gradient_metal_cpp_impl.mm │ ├── conjugate_gradient_metal_objc.h │ └── conjugate_gradient_metal_objc.mm └── test_conjugate_gradient_solver.cpp ├── 16_nonsymmetric_band_mat ├── Makefile ├── README.md ├── doc │ ├── DOUBLE_MATRIX_ROW_MAJOR_Running_time_for_Nonsymmetric_Band_Matrix_Solver.png │ ├── FLOAT_MATRIX_ROW_MAJOR_Running_time_for_Nonsymmetric_Band_Matrix_Solver.png │ ├── make_log.txt │ └── plot_spec.json ├── doc_ios │ ├── DOUBLE_MATRIX_ROW_MAJOR_Running_time_for_Nonsymmetric_Band_Matrix_Solver.png │ ├── FLOAT_MATRIX_ROW_MAJOR_Running_time_for_Nonsymmetric_Band_Matrix_Solver.png │ ├── make_log.txt │ ├── make_log_cleaned.txt │ └── plot_spec.json ├── metal │ └── conjugate_gradient.metal └── test_nonsymmetric_band_mat.cpp ├── LICENSE ├── Makefile ├── README.md ├── common ├── common.mk ├── metal │ ├── metal_compute_base.h │ └── metal_compute_base.mm ├── process_log.py ├── test_case_with_time_measurements.h ├── test_pattern_generation.h └── thread_synchronizer.h ├── iOSTester_01 ├── iOSTester_01.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ └── xcshareddata │ │ └── xcschemes │ │ └── iOSTester_01.xcscheme └── iOSTester_01 │ ├── Assets.xcassets │ ├── AccentColor.colorset │ │ └── Contents.json │ ├── AppIcon.appiconset │ │ └── Contents.json │ └── Contents.json │ ├── ContentView.swift │ ├── Preview Content │ └── Preview Assets.xcassets │ │ └── Contents.json │ ├── iOSTester_01-Bridging-Header.h │ ├── iOSTester_01App.swift │ ├── test_memcpy_objc.h │ └── test_memcpy_objc.mm ├── iOSTester_02 ├── iOSTester_02.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ └── xcshareddata │ │ └── xcschemes │ │ └── iOSTester_02.xcscheme └── iOSTester_02 │ ├── Assets.xcassets │ ├── AccentColor.colorset │ │ └── Contents.json │ ├── AppIcon.appiconset │ │ └── Contents.json │ └── Contents.json │ ├── ContentView.swift │ ├── Preview Content │ └── Preview Assets.xcassets │ │ └── Contents.json │ ├── iOSTester_02-Bridging-Header.h │ ├── iOSTester_02App.swift │ ├── test_saxpy_objc.h │ └── test_saxpy_objc.mm ├── iOSTester_03 ├── iOSTester_03.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ └── xcshareddata │ │ └── xcschemes │ │ └── iOSTester_03.xcscheme └── iOSTester_03 │ ├── Assets.xcassets │ ├── AccentColor.colorset │ │ └── Contents.json │ ├── AppIcon.appiconset │ │ └── Contents.json │ └── Contents.json │ ├── ContentView.swift │ ├── Preview Content │ └── Preview Assets.xcassets │ │ └── Contents.json │ ├── iOSTester_03-Bridging-Header.h │ ├── iOSTester_03App.swift │ ├── test_dot_objc.h │ └── test_dot_objc.mm ├── iOSTester_04 ├── iOSTester_04.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ └── xcshareddata │ │ └── xcschemes │ │ └── iOSTester_04.xcscheme └── iOSTester_04 │ ├── Assets.xcassets │ ├── AccentColor.colorset │ │ └── Contents.json │ ├── AppIcon.appiconset │ │ └── Contents.json │ └── Contents.json │ ├── ContentView.swift │ ├── Preview Content │ └── Preview Assets.xcassets │ │ └── Contents.json │ ├── iOSTester_04-Bridging-Header.h │ ├── iOSTester_04App.swift │ ├── test_prefix_sum_objc.h │ └── test_prefix_sum_objc.mm ├── iOSTester_05 ├── iOSTester_05.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ └── xcshareddata │ │ └── xcschemes │ │ └── iOSTester_05.xcscheme └── iOSTester_05 │ ├── Assets.xcassets │ ├── AccentColor.colorset │ │ └── Contents.json │ ├── AppIcon.appiconset │ │ └── Contents.json │ └── Contents.json │ ├── ContentView.swift │ ├── Preview Content │ └── Preview Assets.xcassets │ │ └── Contents.json │ ├── iOSTester_05-Bridging-Header.h │ ├── iOSTester_05App.swift │ ├── test_radix_sort_objc.h │ └── test_radix_sort_objc.mm ├── iOSTester_06 ├── iOSTester_06.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ └── xcshareddata │ │ └── xcschemes │ │ └── iOSTester_06.xcscheme └── iOSTester_06 │ ├── Assets.xcassets │ ├── AccentColor.colorset │ │ └── Contents.json │ ├── AppIcon.appiconset │ │ └── Contents.json │ └── Contents.json │ ├── ContentView.swift │ ├── Preview Content │ └── Preview Assets.xcassets │ │ └── Contents.json │ ├── iOSTester_06-Bridging-Header.h │ ├── iOSTester_06App.swift │ ├── test_nbocy_objc.mm │ └── test_nbody_objc.h ├── iOSTester_07 ├── iOSTester_07.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ └── xcshareddata │ │ └── xcschemes │ │ └── iOSTester_07.xcscheme └── iOSTester_07 │ ├── Assets.xcassets │ ├── AccentColor.colorset │ │ └── Contents.json │ ├── AppIcon.appiconset │ │ └── Contents.json │ └── Contents.json │ ├── ContentView.swift │ ├── Preview Content │ └── Preview Assets.xcassets │ │ └── Contents.json │ ├── iOSTester_07-Bridging-Header.h │ ├── iOSTester_07App.swift │ ├── test_2d_filter_objc.h │ └── test_2d_filter_objc.mm ├── iOSTester_08 ├── iOSTester_08.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ └── xcshareddata │ │ └── xcschemes │ │ └── iOSTester_08.xcscheme └── iOSTester_08 │ ├── Assets.xcassets │ ├── AccentColor.colorset │ │ └── Contents.json │ ├── AppIcon.appiconset │ │ └── Contents.json │ └── Contents.json │ ├── ContentView.swift │ ├── Preview Content │ └── Preview Assets.xcassets │ │ └── Contents.json │ ├── iOSTester_08-Bridging-Header.h │ ├── iOSTester_08App.swift │ ├── test_sparse_matrix_vector_objc.h │ └── test_sparse_matrix_vector_objc.mm ├── iOSTester_09 ├── iOSTester_09.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ └── xcshareddata │ │ └── xcschemes │ │ └── iOSTester_09.xcscheme └── iOSTester_09 │ ├── Assets.xcassets │ ├── AccentColor.colorset │ │ └── Contents.json │ ├── AppIcon.appiconset │ │ └── Contents.json │ └── Contents.json │ ├── ContentView.swift │ ├── Preview Content │ └── Preview Assets.xcassets │ │ └── Contents.json │ ├── dense_matrix_vector_objc.mm │ ├── iOSTester_09-Bridging-Header.h │ ├── iOSTester_09App.swift │ └── test_dense_matrix_vector_objc.h ├── iOSTester_10 ├── iOSTester_10.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ └── xcshareddata │ │ └── xcschemes │ │ └── iOSTester_10.xcscheme └── iOSTester_10 │ ├── Assets.xcassets │ ├── AccentColor.colorset │ │ └── Contents.json │ ├── AppIcon.appiconset │ │ └── Contents.json │ └── Contents.json │ ├── ContentView.swift │ ├── Preview Content │ └── Preview Assets.xcassets │ │ └── Contents.json │ ├── iOSTester_10-Bridging-Header.h │ ├── iOSTester_10App.swift │ ├── test_cholesky_decomp_objc.h │ └── test_cholesky_decomp_objc.mm ├── iOSTester_11 ├── iOSTester_11-Bridging-Header.h ├── iOSTester_11.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ └── xcshareddata │ │ └── xcschemes │ │ └── iOSTester_11.xcscheme ├── iOSTester_11 │ ├── Assets.xcassets │ │ ├── AccentColor.colorset │ │ │ └── Contents.json │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ └── Contents.json │ ├── ContentView.swift │ ├── Preview Content │ │ └── Preview Assets.xcassets │ │ │ └── Contents.json │ └── iOSTester_11App.swift ├── test_jacobi_solver_objc.h └── test_jacobi_solver_objc.mm ├── iOSTester_12 ├── iOSTester_12-Bridging-Header.h ├── iOSTester_12.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ └── xcshareddata │ │ └── xcschemes │ │ └── iOSTester_12.xcscheme └── iOSTester_12 │ ├── Assets.xcassets │ ├── AccentColor.colorset │ │ └── Contents.json │ ├── AppIcon.appiconset │ │ └── Contents.json │ └── Contents.json │ ├── ContentView.swift │ ├── Preview Content │ └── Preview Assets.xcassets │ │ └── Contents.json │ ├── iOSTester_12App.swift │ ├── test_gauss_seidel_solver_objc.h │ └── test_gauss_seldel_solver_objc.mm ├── iOSTester_13 ├── iOSTester_13.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ └── xcshareddata │ │ └── xcschemes │ │ └── iOSTester_13.xcscheme └── iOSTester_13 │ ├── Assets.xcassets │ ├── AccentColor.colorset │ │ └── Contents.json │ ├── AppIcon.appiconset │ │ └── Contents.json │ └── Contents.json │ ├── ContentView.swift │ ├── Preview Content │ └── Preview Assets.xcassets │ │ └── Contents.json │ ├── iOSTester_13-Bridging-Header.h │ ├── iOSTester_13App.swift │ ├── test_fft_objc.h │ └── test_fft_objc.mm ├── iOSTester_14 ├── iOSTester_14.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ └── xcshareddata │ │ └── xcschemes │ │ └── iOSTester_14.xcscheme └── iOSTester_14 │ ├── Assets.xcassets │ ├── AccentColor.colorset │ │ └── Contents.json │ ├── AppIcon.appiconset │ │ └── Contents.json │ └── Contents.json │ ├── ContentView.swift │ ├── Preview Content │ └── Preview Assets.xcassets │ │ └── Contents.json │ ├── iOSTester_14-Bridging-Header.h │ ├── iOSTester_14App.swift │ ├── sample_data_1024_mu0.2.txt │ ├── sample_data_1024_mu0.8.txt │ ├── sample_data_1024_sym.txt │ ├── sample_data_128_mu0.2.txt │ ├── sample_data_128_mu0.8.txt │ ├── sample_data_128_sym.txt │ ├── sample_data_256_mu0.2.txt │ ├── sample_data_256_mu0.8.txt │ ├── sample_data_256_sym.txt │ ├── sample_data_32_mu0.2.txt │ ├── sample_data_32_mu0.8.txt │ ├── sample_data_32_sym.txt │ ├── sample_data_512_mu0.2.txt │ ├── sample_data_512_mu0.8.txt │ ├── sample_data_512_sym.txt │ ├── sample_data_64_mu0.2.txt │ ├── sample_data_64_mu0.8.txt │ ├── sample_data_64_sym.txt │ ├── test_lcp_objc.h │ └── test_lcp_objc.mm ├── iOSTester_15 ├── iOSTester_15.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ └── xcshareddata │ │ └── xcschemes │ │ └── iOSTester_15.xcscheme └── iOSTester_15 │ ├── Assets.xcassets │ ├── AccentColor.colorset │ │ └── Contents.json │ ├── AppIcon.appiconset │ │ └── Contents.json │ └── Contents.json │ ├── ContentView.swift │ ├── Preview Content │ └── Preview Assets.xcassets │ │ └── Contents.json │ ├── iOSTester_15-Bridging-Header.h │ ├── iOSTester_15App.swift │ ├── test_conjugate_gradient_solver_objc.h │ └── test_conjugate_gradient_solver_objc.mm └── iOSTester_16 ├── iOSTester_16.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── xcshareddata │ └── xcschemes │ └── iOSTester_16.xcscheme └── iOSTester_16 ├── Assets.xcassets ├── AccentColor.colorset │ └── Contents.json ├── AppIcon.appiconset │ └── Contents.json └── Contents.json ├── ContentView.swift ├── Preview Content └── Preview Assets.xcassets │ └── Contents.json ├── iOSTester_16-Bridging-Header.h ├── iOSTester_16App.swift ├── test_nonsymmetric_band_mat_objc.h └── test_nonsymmetric_band_mat_objc.mm /01_memcpy/Makefile: -------------------------------------------------------------------------------- 1 | METAL_SHADER_LIB_NAME = memcpy 2 | MAIN_SRC = test_memcpy.cpp 3 | 4 | all: 5 | 6 | include ../common/common.mk 7 | -------------------------------------------------------------------------------- /01_memcpy/doc/INT_VECTOR_Comparison_Among_Metal_Implementations_relative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/01_memcpy/doc/INT_VECTOR_Comparison_Among_Metal_Implementations_relative.png -------------------------------------------------------------------------------- /01_memcpy/doc/INT_VECTOR_Effect_of_Loop_Unrolling_in_C++_relative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/01_memcpy/doc/INT_VECTOR_Effect_of_Loop_Unrolling_in_C++_relative.png -------------------------------------------------------------------------------- /01_memcpy/doc/INT_VECTOR_Effect_of_Multithreading_in_C++_relative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/01_memcpy/doc/INT_VECTOR_Effect_of_Multithreading_in_C++_relative.png -------------------------------------------------------------------------------- /01_memcpy/doc/INT_VECTOR_Effect_of_Multithreading_with_memcpy()_relative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/01_memcpy/doc/INT_VECTOR_Effect_of_Multithreading_with_memcpy()_relative.png -------------------------------------------------------------------------------- /01_memcpy/doc/INT_VECTOR_Overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/01_memcpy/doc/INT_VECTOR_Overview.png -------------------------------------------------------------------------------- /01_memcpy/doc/INT_VECTOR_Performance_Relative_to_Baseline_relative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/01_memcpy/doc/INT_VECTOR_Performance_Relative_to_Baseline_relative.png -------------------------------------------------------------------------------- /01_memcpy/doc_ios/INSTRUCTION.txt: -------------------------------------------------------------------------------- 1 | - Open AppleNumericalComputing/iOSTester_01/iOSTester_01.xcodeproj with Xcode 2 | - Build a release build 3 | - Run the iOS App in release build 4 | - Press 'Run' on the screen 5 | - Wait until App finished with 'finished!' on the log output. 6 | - Copy and paste the log into 01_memcpy/doc_ios/make_log.txt 7 | - Run the following in the terminal 8 | $ cd 01_memcpy 9 | $ grep '\(INT\|FLOAT\|DOUBLE\|data element type\)' doc_ios/make_log.txt > doc_ios/make_log_cleaned.txt 10 | $ python ../common/process_log.py -logfile doc_ios/make_log_cleaned.txt -specfile doc_ios/plot_spec.json -show_impl -plot_charts -base_dir doc_ios/ 11 | - You will get the PNG file in 01_memcpy/doc_ios/make_log.txt. 12 | -------------------------------------------------------------------------------- /01_memcpy/doc_ios/INT_VECTOR_Comparison_Among_Metal_Implementations_relative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/01_memcpy/doc_ios/INT_VECTOR_Comparison_Among_Metal_Implementations_relative.png -------------------------------------------------------------------------------- /01_memcpy/doc_ios/INT_VECTOR_Effect_of_Loop_Unrolling_in_C++_relative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/01_memcpy/doc_ios/INT_VECTOR_Effect_of_Loop_Unrolling_in_C++_relative.png -------------------------------------------------------------------------------- /01_memcpy/doc_ios/INT_VECTOR_Effect_of_Multithreading_in_C++_relative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/01_memcpy/doc_ios/INT_VECTOR_Effect_of_Multithreading_in_C++_relative.png -------------------------------------------------------------------------------- /01_memcpy/doc_ios/INT_VECTOR_Effect_of_Multithreading_with_memcpy()_relative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/01_memcpy/doc_ios/INT_VECTOR_Effect_of_Multithreading_with_memcpy()_relative.png -------------------------------------------------------------------------------- /01_memcpy/doc_ios/INT_VECTOR_Overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/01_memcpy/doc_ios/INT_VECTOR_Overview.png -------------------------------------------------------------------------------- /01_memcpy/doc_ios/INT_VECTOR_Performance_Relative_to_Baseline_relative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/01_memcpy/doc_ios/INT_VECTOR_Performance_Relative_to_Baseline_relative.png -------------------------------------------------------------------------------- /01_memcpy/metal/memcpy.metal: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | using namespace metal; 4 | 5 | struct memcpy_constants 6 | { 7 | uint num_elements; 8 | }; 9 | 10 | 11 | kernel void my_memcpy( 12 | 13 | device const int* in [[ buffer(0) ]], 14 | 15 | device int* out [[ buffer(1) ]], 16 | 17 | device const memcpy_constants& c [[ buffer(2) ]], 18 | 19 | const uint thread_position_in_grid [[ thread_position_in_grid ]] 20 | ) { 21 | if ( thread_position_in_grid < c.num_elements ) { 22 | 23 | out[ thread_position_in_grid ] = in[ thread_position_in_grid ]; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /01_memcpy/metal/memcpy_metal_cpp.h: -------------------------------------------------------------------------------- 1 | #ifndef __MEMCPY_METAL_CPP_H__ 2 | #define __MEMCPY_METAL_CPP_H__ 3 | 4 | class MemcpyMetalCppImpl; 5 | 6 | class MemcpyMetalCpp 7 | { 8 | 9 | public: 10 | MemcpyMetalCpp( const size_t num_bytes, const bool useManagedBuffer ); 11 | 12 | virtual ~MemcpyMetalCpp(); 13 | 14 | unsigned int numBytes(); 15 | 16 | unsigned int numGroupsPerGrid(); 17 | 18 | unsigned int numThreadsPerGroup(); 19 | 20 | void* getRawPointerIn(); 21 | 22 | void* getRawPointerOut(); 23 | 24 | void performComputationKernel(); 25 | 26 | void performComputationBlit(); 27 | 28 | private: 29 | MemcpyMetalCppImpl* m_impl; 30 | 31 | }; 32 | 33 | #endif /*__MEMCPY_METAL_CPP_H__*/ 34 | -------------------------------------------------------------------------------- /01_memcpy/metal/memcpy_metal_cpp_impl.h: -------------------------------------------------------------------------------- 1 | #ifndef __MEMCPY_METAL_CPP_IMPL_H__ 2 | #define __MEMCPY_METAL_CPP_IMPL_H__ 3 | 4 | #include 5 | 6 | class MemcpyMetalCppImpl 7 | { 8 | 9 | public: 10 | MemcpyMetalCppImpl( const size_t num_bytes, const bool useManagedBuffer ); 11 | 12 | virtual ~MemcpyMetalCppImpl(); 13 | 14 | unsigned int numBytes(); 15 | 16 | unsigned int numGroupsPerGrid(); 17 | 18 | unsigned int numThreadsPerGroup(); 19 | 20 | void* getRawPointerIn(); 21 | 22 | void* getRawPointerOut(); 23 | 24 | void performComputationKernel(); 25 | 26 | void performComputationBlit(); 27 | 28 | private: 29 | MemcpyMetalObjC* m_self; 30 | 31 | }; 32 | 33 | #endif /*__MEMCPY_METAL_CPP_IMPL_H__*/ 34 | -------------------------------------------------------------------------------- /01_memcpy/metal/memcpy_metal_objc.h: -------------------------------------------------------------------------------- 1 | #import "metal_compute_base.h" 2 | 3 | @interface MemcpyMetalObjC : MetalComputeBase 4 | - (instancetype) initWithNumBytes:(size_t) numBytes UseManagedBuffer:(bool) useManagedBuffer; 5 | - (uint) numBytes; 6 | - (uint) numGroupsPerGrid; 7 | - (uint) numThreadsPerGroup; 8 | - (void*) getRawPointerIn; 9 | - (void*) getRawPointerOut; 10 | - (void) performComputationKernel; 11 | - (void) performComputationBlit; 12 | @end 13 | -------------------------------------------------------------------------------- /01_memcpy/side_experiments/test_copy.cpp: -------------------------------------------------------------------------------- 1 | // clang++ -O3 -Wall -pthread -march=armv8-a+fp+simd -std=c++17 -S -c -o test_copy.S test_copy.cpp 2 | 3 | void copy_baseline( const int* const x, int* const y, const int num ) 4 | { 5 | for ( int i = 0; i < num; i++ ) { 6 | y[i] = x[i]; 7 | } 8 | } 9 | 10 | void copy_baseline2( 11 | const int* const __attribute__((aligned(64))) x, 12 | int* const __attribute__((aligned(64))) y, 13 | const int num 14 | ) { 15 | # pragma unroll 8 16 | for ( int i = 0; i < num; i++ ) { 17 | y[i] = x[i]; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /02_saxpy/Makefile: -------------------------------------------------------------------------------- 1 | METAL_SHADER_LIB_NAME = saxpy 2 | MAIN_SRC = test_saxpy.cpp 3 | 4 | all: 5 | 6 | include ../common/common.mk 7 | -------------------------------------------------------------------------------- /02_saxpy/doc/DOUBLE_VECTOR_Comparison_Among_C++_Multithreaded_Implementations_relative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/02_saxpy/doc/DOUBLE_VECTOR_Comparison_Among_C++_Multithreaded_Implementations_relative.png -------------------------------------------------------------------------------- /02_saxpy/doc/DOUBLE_VECTOR_Comparison_Among_CPU_Implementations.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/02_saxpy/doc/DOUBLE_VECTOR_Comparison_Among_CPU_Implementations.png -------------------------------------------------------------------------------- /02_saxpy/doc/DOUBLE_VECTOR_Comparison_Among_NEON_Implementations_relative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/02_saxpy/doc/DOUBLE_VECTOR_Comparison_Among_NEON_Implementations_relative.png -------------------------------------------------------------------------------- /02_saxpy/doc/DOUBLE_VECTOR_Overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/02_saxpy/doc/DOUBLE_VECTOR_Overview.png -------------------------------------------------------------------------------- /02_saxpy/doc/FLOAT_VECTOR_Comparison_Among_C++_Multithreaded_Implementations_relative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/02_saxpy/doc/FLOAT_VECTOR_Comparison_Among_C++_Multithreaded_Implementations_relative.png -------------------------------------------------------------------------------- /02_saxpy/doc/FLOAT_VECTOR_Comparison_Among_CPU_Implementations.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/02_saxpy/doc/FLOAT_VECTOR_Comparison_Among_CPU_Implementations.png -------------------------------------------------------------------------------- /02_saxpy/doc/FLOAT_VECTOR_Comparison_Among_NEON_Implementations_relative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/02_saxpy/doc/FLOAT_VECTOR_Comparison_Among_NEON_Implementations_relative.png -------------------------------------------------------------------------------- /02_saxpy/doc/FLOAT_VECTOR_Overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/02_saxpy/doc/FLOAT_VECTOR_Overview.png -------------------------------------------------------------------------------- /02_saxpy/doc_ios/DOUBLE_VECTOR_Comparison_Among_C++_Multithreaded_Implementations_relative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/02_saxpy/doc_ios/DOUBLE_VECTOR_Comparison_Among_C++_Multithreaded_Implementations_relative.png -------------------------------------------------------------------------------- /02_saxpy/doc_ios/DOUBLE_VECTOR_Comparison_Among_CPU_Implementations.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/02_saxpy/doc_ios/DOUBLE_VECTOR_Comparison_Among_CPU_Implementations.png -------------------------------------------------------------------------------- /02_saxpy/doc_ios/DOUBLE_VECTOR_Comparison_Among_NEON_Implementations_relative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/02_saxpy/doc_ios/DOUBLE_VECTOR_Comparison_Among_NEON_Implementations_relative.png -------------------------------------------------------------------------------- /02_saxpy/doc_ios/DOUBLE_VECTOR_Overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/02_saxpy/doc_ios/DOUBLE_VECTOR_Overview.png -------------------------------------------------------------------------------- /02_saxpy/doc_ios/FLOAT_VECTOR_Comparison_Among_C++_Multithreaded_Implementations_relative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/02_saxpy/doc_ios/FLOAT_VECTOR_Comparison_Among_C++_Multithreaded_Implementations_relative.png -------------------------------------------------------------------------------- /02_saxpy/doc_ios/FLOAT_VECTOR_Comparison_Among_CPU_Implementations.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/02_saxpy/doc_ios/FLOAT_VECTOR_Comparison_Among_CPU_Implementations.png -------------------------------------------------------------------------------- /02_saxpy/doc_ios/FLOAT_VECTOR_Comparison_Among_NEON_Implementations_relative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/02_saxpy/doc_ios/FLOAT_VECTOR_Comparison_Among_NEON_Implementations_relative.png -------------------------------------------------------------------------------- /02_saxpy/doc_ios/FLOAT_VECTOR_Overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/02_saxpy/doc_ios/FLOAT_VECTOR_Overview.png -------------------------------------------------------------------------------- /02_saxpy/metal/saxpy.metal: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | using namespace metal; 4 | 5 | struct saxpy_constants 6 | { 7 | uint num_elements; 8 | }; 9 | 10 | kernel void saxpy( 11 | 12 | device const float* X [[ buffer(0) ]], 13 | device float* Y [[ buffer(1) ]], 14 | device float& a [[ buffer(2) ]], 15 | device saxpy_constants& c [[ buffer(3) ]], 16 | 17 | const uint thread_position_in_grid [[ thread_position_in_grid ]], 18 | const uint threads_per_grid [[ threads_per_grid ]] 19 | ) { 20 | for ( uint i = thread_position_in_grid; i < c.num_elements; i += threads_per_grid ) { 21 | 22 | Y[i] = X[i] * a + Y[i]; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /02_saxpy/metal/saxpy_metal_cpp.cpp: -------------------------------------------------------------------------------- 1 | class SaxpyMetalObjC; 2 | #include "saxpy_metal_cpp_impl.h" 3 | #include "saxpy_metal_cpp.h" 4 | 5 | SaxpyMetalCpp::SaxpyMetalCpp( const size_t num_elements, const size_t num_threads_per_group, const size_t num_groups_per_grid ) 6 | :m_impl( new SaxpyMetalCppImpl( num_elements, num_threads_per_group, num_groups_per_grid ) ) 7 | { 8 | ; 9 | } 10 | 11 | SaxpyMetalCpp::~SaxpyMetalCpp() 12 | { 13 | delete m_impl; 14 | }; 15 | 16 | float* SaxpyMetalCpp::getRawPointerX() 17 | { 18 | return m_impl->getRawPointerX(); 19 | } 20 | 21 | float* SaxpyMetalCpp::getRawPointerY() 22 | { 23 | return m_impl->getRawPointerY(); 24 | } 25 | 26 | void SaxpyMetalCpp::setScalar_a( const float a ) 27 | { 28 | m_impl->setScalar_a( a ); 29 | } 30 | 31 | void SaxpyMetalCpp::performComputation() 32 | { 33 | m_impl->performComputation(); 34 | } 35 | -------------------------------------------------------------------------------- /02_saxpy/metal/saxpy_metal_cpp.h: -------------------------------------------------------------------------------- 1 | #ifndef __SAXPY_METAL_CPP_H__ 2 | #define __SAXPY_METAL_CPP_H__ 3 | 4 | class SaxpyMetalCppImpl; 5 | 6 | class SaxpyMetalCpp 7 | { 8 | 9 | public: 10 | SaxpyMetalCpp( const size_t num_elements , const size_t num_threads_per_group, const size_t num_groups_per_grid ); 11 | 12 | virtual ~SaxpyMetalCpp(); 13 | 14 | float* getRawPointerX(); 15 | 16 | float* getRawPointerY(); 17 | 18 | void setScalar_a( const float a ); 19 | 20 | void performComputation(); 21 | 22 | private: 23 | SaxpyMetalCppImpl* m_impl; 24 | 25 | }; 26 | 27 | #endif /*__SAXPY_METAL_CPP_H__*/ 28 | -------------------------------------------------------------------------------- /02_saxpy/metal/saxpy_metal_cpp_impl.h: -------------------------------------------------------------------------------- 1 | #ifndef __SAXPY_METAL_CPP_IMPL_H__ 2 | #define __SAXPY_METAL_CPP_IMPL_H__ 3 | 4 | #include 5 | 6 | class SaxpyMetalCppImpl 7 | { 8 | 9 | public: 10 | SaxpyMetalCppImpl( const size_t num_elements, const size_t num_threads_per_group, const size_t num_groups_per_grid ); 11 | 12 | virtual ~SaxpyMetalCppImpl(); 13 | 14 | float* getRawPointerX(); 15 | 16 | float* getRawPointerY(); 17 | 18 | void setScalar_a( const float a ); 19 | 20 | void performComputation(); 21 | 22 | private: 23 | SaxpyMetalObjC* m_self; 24 | 25 | }; 26 | 27 | #endif /*__SAXPY_METAL_CPP_IMPL_H__*/ 28 | -------------------------------------------------------------------------------- /02_saxpy/metal/saxpy_metal_cpp_impl.mm: -------------------------------------------------------------------------------- 1 | #import "saxpy_metal_objc.h" 2 | #import "saxpy_metal_cpp_impl.h" 3 | 4 | SaxpyMetalCppImpl::SaxpyMetalCppImpl( const size_t num_elements, const size_t num_threads_per_group, const size_t num_groups_per_grid ){ 5 | 6 | m_self = [ [ SaxpyMetalObjC alloc ] 7 | 8 | initWithNumElements : num_elements 9 | NumThreadsPerGroup : num_threads_per_group 10 | NumGroupsPerGrid : num_groups_per_grid 11 | ]; 12 | } 13 | 14 | SaxpyMetalCppImpl::~SaxpyMetalCppImpl(){;} 15 | 16 | 17 | float* SaxpyMetalCppImpl::getRawPointerX() { 18 | 19 | return [ m_self getRawPointerX ]; 20 | } 21 | 22 | float* SaxpyMetalCppImpl::getRawPointerY() { 23 | 24 | return [ m_self getRawPointerY ]; 25 | } 26 | 27 | void SaxpyMetalCppImpl::setScalar_a( const float a ) { 28 | 29 | [ m_self setScalar_a:a ]; 30 | } 31 | 32 | void SaxpyMetalCppImpl::performComputation() { 33 | 34 | return [ m_self performComputation ]; 35 | } 36 | -------------------------------------------------------------------------------- /02_saxpy/metal/saxpy_metal_objc.h: -------------------------------------------------------------------------------- 1 | #import "metal_compute_base.h" 2 | 3 | @interface SaxpyMetalObjC : MetalComputeBase 4 | - (instancetype) initWithNumElements:(size_t) numElements 5 | NumThreadsPerGroup:(size_t) numThreadsPerGroup 6 | NumGroupsPerGrid:(size_t) numGroupsPerGrid; 7 | - (float*) getRawPointerX; 8 | - (float*) getRawPointerY; 9 | - (void) performComputation; 10 | @property float scalar_a; 11 | @end 12 | -------------------------------------------------------------------------------- /03_dot/Makefile: -------------------------------------------------------------------------------- 1 | METAL_SHADER_LIB_NAME = dot 2 | MAIN_SRC = test_dot.cpp 3 | 4 | all: 5 | 6 | include ../common/common.mk 7 | -------------------------------------------------------------------------------- /03_dot/doc/DOUBLE_VECTOR_Effect_of_NEON_Loop_Unrolling_relative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/03_dot/doc/DOUBLE_VECTOR_Effect_of_NEON_Loop_Unrolling_relative.png -------------------------------------------------------------------------------- /03_dot/doc/DOUBLE_VECTOR_Effect_of_NEON_Multithreading_relative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/03_dot/doc/DOUBLE_VECTOR_Effect_of_NEON_Multithreading_relative.png -------------------------------------------------------------------------------- /03_dot/doc/DOUBLE_VECTOR_Overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/03_dot/doc/DOUBLE_VECTOR_Overview.png -------------------------------------------------------------------------------- /03_dot/doc/FLOAT_VECTOR_Comparison_Among_Metal_Implementations_relative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/03_dot/doc/FLOAT_VECTOR_Comparison_Among_Metal_Implementations_relative.png -------------------------------------------------------------------------------- /03_dot/doc/FLOAT_VECTOR_Effect_of_NEON_Loop_Unrolling_relative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/03_dot/doc/FLOAT_VECTOR_Effect_of_NEON_Loop_Unrolling_relative.png -------------------------------------------------------------------------------- /03_dot/doc/FLOAT_VECTOR_Effect_of_NEON_Multithreading_relative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/03_dot/doc/FLOAT_VECTOR_Effect_of_NEON_Multithreading_relative.png -------------------------------------------------------------------------------- /03_dot/doc/FLOAT_VECTOR_Overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/03_dot/doc/FLOAT_VECTOR_Overview.png -------------------------------------------------------------------------------- /03_dot/doc_ios/DOUBLE_VECTOR_Effect_of_NEON_Loop_Unrolling_relative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/03_dot/doc_ios/DOUBLE_VECTOR_Effect_of_NEON_Loop_Unrolling_relative.png -------------------------------------------------------------------------------- /03_dot/doc_ios/DOUBLE_VECTOR_Effect_of_NEON_Multithreading_relative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/03_dot/doc_ios/DOUBLE_VECTOR_Effect_of_NEON_Multithreading_relative.png -------------------------------------------------------------------------------- /03_dot/doc_ios/DOUBLE_VECTOR_Overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/03_dot/doc_ios/DOUBLE_VECTOR_Overview.png -------------------------------------------------------------------------------- /03_dot/doc_ios/FLOAT_VECTOR_Comparison_Among_Metal_Implementations_relative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/03_dot/doc_ios/FLOAT_VECTOR_Comparison_Among_Metal_Implementations_relative.png -------------------------------------------------------------------------------- /03_dot/doc_ios/FLOAT_VECTOR_Effect_of_NEON_Loop_Unrolling_relative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/03_dot/doc_ios/FLOAT_VECTOR_Effect_of_NEON_Loop_Unrolling_relative.png -------------------------------------------------------------------------------- /03_dot/doc_ios/FLOAT_VECTOR_Effect_of_NEON_Multithreading_relative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/03_dot/doc_ios/FLOAT_VECTOR_Effect_of_NEON_Multithreading_relative.png -------------------------------------------------------------------------------- /03_dot/doc_ios/FLOAT_VECTOR_Overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/03_dot/doc_ios/FLOAT_VECTOR_Overview.png -------------------------------------------------------------------------------- /03_dot/metal/dot_metal_cpp.cpp: -------------------------------------------------------------------------------- 1 | class DotMetalObjC; 2 | #include "dot_metal_cpp_impl.h" 3 | #include "dot_metal_cpp.h" 4 | 5 | DotMetalCpp::DotMetalCpp( const size_t num_elements, const size_t num_threads_per_group, const size_t num_groups_per_grid, const int reduction_type ) 6 | :m_impl( new DotMetalCppImpl( num_elements, num_threads_per_group, num_groups_per_grid, reduction_type ) ) 7 | { 8 | ; 9 | } 10 | 11 | DotMetalCpp::~DotMetalCpp() 12 | { 13 | delete m_impl; 14 | }; 15 | 16 | float* DotMetalCpp::getRawPointerX() 17 | { 18 | return m_impl->getRawPointerX(); 19 | } 20 | 21 | float* DotMetalCpp::getRawPointerY() 22 | { 23 | return m_impl->getRawPointerY(); 24 | } 25 | 26 | float DotMetalCpp::getDotXY() 27 | { 28 | return m_impl->getDotXY(); 29 | } 30 | 31 | void DotMetalCpp::performComputation() 32 | { 33 | m_impl->performComputation(); 34 | } 35 | -------------------------------------------------------------------------------- /03_dot/metal/dot_metal_cpp_impl.h: -------------------------------------------------------------------------------- 1 | #ifndef __DOT_METAL_CPP_IMPL_H__ 2 | #define __DOT_METAL_CPP_IMPL_H__ 3 | 4 | #include 5 | 6 | class DotMetalCppImpl 7 | { 8 | 9 | public: 10 | DotMetalCppImpl( const size_t num_elements, const size_t num_threads_per_group, const size_t num_groups_per_grid, const int reduction_type ); 11 | 12 | virtual ~DotMetalCppImpl(); 13 | 14 | float* getRawPointerX(); 15 | 16 | float* getRawPointerY(); 17 | 18 | float getDotXY(); 19 | 20 | void performComputation(); 21 | 22 | private: 23 | DotMetalObjC* m_self; 24 | 25 | }; 26 | 27 | #endif /*__DOT_METAL_CPP_IMPL_H__*/ 28 | -------------------------------------------------------------------------------- /03_dot/metal/dot_metal_objc.h: -------------------------------------------------------------------------------- 1 | #import "metal_compute_base.h" 2 | 3 | @interface DotMetalObjC : MetalComputeBase 4 | - (instancetype) initWithNumElements:(size_t) numElements 5 | ReductionType :(int) recution_type 6 | NumThreadsPerGroup:(size_t) num_threads_per_group 7 | NumGroupsPerGrid:(size_t) num_groups_per_grid; 8 | - (float*) getRawPointerX; 9 | - (float*) getRawPointerY; 10 | - (void) performComputation; 11 | - (float) getDotXY; 12 | @end 13 | -------------------------------------------------------------------------------- /04_prefix_sum/Makefile: -------------------------------------------------------------------------------- 1 | METAL_SHADER_LIB_NAME = prefix_sum 2 | MAIN_SRC = test_prefix_sum.cpp 3 | 4 | all: 5 | 6 | include ../common/common.mk 7 | -------------------------------------------------------------------------------- /04_prefix_sum/doc/INT_VECTOR_Comparison_Among_CPU_Implementations_relative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/04_prefix_sum/doc/INT_VECTOR_Comparison_Among_CPU_Implementations_relative.png -------------------------------------------------------------------------------- /04_prefix_sum/doc/INT_VECTOR_Comparison_Among_GPU_Implementations_relative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/04_prefix_sum/doc/INT_VECTOR_Comparison_Among_GPU_Implementations_relative.png -------------------------------------------------------------------------------- /04_prefix_sum/doc/INT_VECTOR_Overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/04_prefix_sum/doc/INT_VECTOR_Overview.png -------------------------------------------------------------------------------- /04_prefix_sum/doc_ios/INT_VECTOR_Comparison_Among_CPU_Implementations_relative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/04_prefix_sum/doc_ios/INT_VECTOR_Comparison_Among_CPU_Implementations_relative.png -------------------------------------------------------------------------------- /04_prefix_sum/doc_ios/INT_VECTOR_Comparison_Among_GPU_Implementations_relative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/04_prefix_sum/doc_ios/INT_VECTOR_Comparison_Among_GPU_Implementations_relative.png -------------------------------------------------------------------------------- /04_prefix_sum/doc_ios/INT_VECTOR_Overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/04_prefix_sum/doc_ios/INT_VECTOR_Overview.png -------------------------------------------------------------------------------- /04_prefix_sum/metal/prefix_sum_metal_objc_merrill_grimshaw.h: -------------------------------------------------------------------------------- 1 | #import "metal_compute_base.h" 2 | 3 | @interface PrefixSumMetalObjCMerrillGrimshaw : MetalComputeBase 4 | 5 | - (instancetype) initWithNumElements:(size_t) num_elements 6 | NumPartialSums:(size_t) num_partial_sums 7 | ForFloat:(bool) for_float 8 | NumThreadsPerThreadgroup:(int) num_threads_per_threadgroup; 9 | - (uint) numElements; 10 | - (int*) getRawPointerInForInt; 11 | - (float*) getRawPointerInForFloat; 12 | - (int*) getRawPointerOutForInt; 13 | - (float*) getRawPointerOutForFloat; 14 | - (int*) getRawPointerPartialSumsForInt; 15 | - (float*) getRawPointerPartialSumsForFloat; 16 | - (void) performComputation; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /04_prefix_sum/metal/prefix_sum_metal_objc_recursive.h: -------------------------------------------------------------------------------- 1 | #import "metal_compute_base.h" 2 | 3 | @interface PrefixSumMetalObjCRecursive : MetalComputeBase 4 | 5 | - (instancetype) initWithNumElements:(size_t) numElements 6 | Type:(int) algo_type 7 | NumPartialSums:(size_t) num_partial_sums 8 | ForFloat:(bool) for_float 9 | NumThreadsPerThreadgroup:(int) num_threads_per_threadgroup; 10 | 11 | - (uint) numElements:(uint) layer; 12 | - (uint) numThreadsPerGroup:(uint) layer; 13 | - (uint) numGroupsPerGrid:(uint) layer; 14 | - (int*) getRawPointerInForInt; 15 | - (float*) getRawPointerInForFloat; 16 | - (int*) getRawPointerOutForInt; 17 | - (float*) getRawPointerOutForFloat; 18 | - (int*) getRawPointerGridPrefixSumsForInt:(uint)layer ForIn:(bool) forIn; 19 | - (float*) getRawPointerGridPrefixSumsForFloat:(uint)layer ForIn:(bool) forIn; 20 | - (void) performComputation; 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /05_radix_sort/Makefile: -------------------------------------------------------------------------------- 1 | METAL_SHADER_LIB_NAME = radix_sort 2 | MAIN_SRC = test_radix_sort.cpp 3 | LOCAL_INC = -I/opt/homebrew/include 4 | 5 | all: 6 | 7 | include ../common/common.mk 8 | -------------------------------------------------------------------------------- /05_radix_sort/doc/FLOAT_VECTOR_Comparison_Among_Metal_Implementations_relative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/05_radix_sort/doc/FLOAT_VECTOR_Comparison_Among_Metal_Implementations_relative.png -------------------------------------------------------------------------------- /05_radix_sort/doc/FLOAT_VECTOR_Comparison_among_CPU_Sort_relative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/05_radix_sort/doc/FLOAT_VECTOR_Comparison_among_CPU_Sort_relative.png -------------------------------------------------------------------------------- /05_radix_sort/doc/FLOAT_VECTOR_Overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/05_radix_sort/doc/FLOAT_VECTOR_Overview.png -------------------------------------------------------------------------------- /05_radix_sort/doc/INT_VECTOR_Comparison_Among_Metal_Implementations_relative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/05_radix_sort/doc/INT_VECTOR_Comparison_Among_Metal_Implementations_relative.png -------------------------------------------------------------------------------- /05_radix_sort/doc/INT_VECTOR_Comparison_among_CPU_Sort_relative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/05_radix_sort/doc/INT_VECTOR_Comparison_among_CPU_Sort_relative.png -------------------------------------------------------------------------------- /05_radix_sort/doc/INT_VECTOR_Overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/05_radix_sort/doc/INT_VECTOR_Overview.png -------------------------------------------------------------------------------- /05_radix_sort/doc_ios/FLOAT_VECTOR_Comparison_Among_Metal_Implementations_relative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/05_radix_sort/doc_ios/FLOAT_VECTOR_Comparison_Among_Metal_Implementations_relative.png -------------------------------------------------------------------------------- /05_radix_sort/doc_ios/FLOAT_VECTOR_Comparison_among_CPU_Sort_relative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/05_radix_sort/doc_ios/FLOAT_VECTOR_Comparison_among_CPU_Sort_relative.png -------------------------------------------------------------------------------- /05_radix_sort/doc_ios/FLOAT_VECTOR_Overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/05_radix_sort/doc_ios/FLOAT_VECTOR_Overview.png -------------------------------------------------------------------------------- /05_radix_sort/doc_ios/INT_VECTOR_Comparison_Among_Metal_Implementations_relative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/05_radix_sort/doc_ios/INT_VECTOR_Comparison_Among_Metal_Implementations_relative.png -------------------------------------------------------------------------------- /05_radix_sort/doc_ios/INT_VECTOR_Comparison_among_CPU_Sort_relative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/05_radix_sort/doc_ios/INT_VECTOR_Comparison_among_CPU_Sort_relative.png -------------------------------------------------------------------------------- /05_radix_sort/doc_ios/INT_VECTOR_Overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/05_radix_sort/doc_ios/INT_VECTOR_Overview.png -------------------------------------------------------------------------------- /05_radix_sort/metal/bitonic_sort_metal_cpp.cpp: -------------------------------------------------------------------------------- 1 | 2 | class BitonicSortMetalObjC; 3 | #include "bitonic_sort_metal_cpp_impl.h" 4 | #include "bitonic_sort_metal_cpp.h" 5 | 6 | BitonicSortMetalCpp::BitonicSortMetalCpp( 7 | const size_t num_elements, 8 | const bool for_float, 9 | const size_t num_threads_per_threadgroup 10 | ) 11 | :m_impl( new BitonicSortMetalCppImpl( num_elements , for_float , num_threads_per_threadgroup ) ) 12 | { 13 | ; 14 | } 15 | 16 | BitonicSortMetalCpp::~BitonicSortMetalCpp() 17 | { 18 | delete m_impl; 19 | }; 20 | 21 | unsigned int BitonicSortMetalCpp::numElements() 22 | { 23 | return m_impl->numElements(); 24 | } 25 | 26 | int* BitonicSortMetalCpp::getRawPointerInOut() 27 | { 28 | return m_impl->getRawPointerInOut(); 29 | } 30 | 31 | void BitonicSortMetalCpp::performComputation() 32 | { 33 | m_impl->performComputation(); 34 | } 35 | -------------------------------------------------------------------------------- /05_radix_sort/metal/bitonic_sort_metal_cpp.h: -------------------------------------------------------------------------------- 1 | #ifndef __BITONIC_SORT_METAL_CPP_H__ 2 | #define __BITONIC_SORT_METAL_CPP_H__ 3 | 4 | class BitonicSortMetalCppImpl; 5 | 6 | class BitonicSortMetalCpp 7 | { 8 | 9 | public: 10 | BitonicSortMetalCpp( 11 | const size_t num_elements, 12 | const bool for_float, 13 | const size_t num_threads_per_threadgroup ); 14 | 15 | virtual ~BitonicSortMetalCpp(); 16 | 17 | unsigned int numElements(); 18 | 19 | int* getRawPointerInOut(); 20 | 21 | void performComputation(); 22 | 23 | private: 24 | BitonicSortMetalCppImpl* m_impl; 25 | 26 | }; 27 | 28 | #endif /*__BITONIC_SORT_METAL_CPP_H__*/ 29 | -------------------------------------------------------------------------------- /05_radix_sort/metal/bitonic_sort_metal_cpp_impl.h: -------------------------------------------------------------------------------- 1 | #ifndef __BITONIC_SORT_METAL_CPP_IMPL_H__ 2 | #define __BITONIC_SORT_METAL_CPP_IMPL_H__ 3 | 4 | #include 5 | 6 | class BitonicSortMetalCppImpl 7 | { 8 | 9 | public: 10 | BitonicSortMetalCppImpl( 11 | const size_t num_elements, 12 | const bool for_float, 13 | const size_t num_threads_per_threadgroup ); 14 | 15 | virtual ~BitonicSortMetalCppImpl(); 16 | 17 | unsigned int numElements(); 18 | 19 | int* getRawPointerInOut(); 20 | 21 | void performComputation(); 22 | 23 | private: 24 | BitonicSortMetalObjC* m_self; 25 | 26 | }; 27 | 28 | #endif /*__BITONIC_SORT_METAL_CPP_IMPL_H__*/ 29 | -------------------------------------------------------------------------------- /05_radix_sort/metal/bitonic_sort_metal_objc.h: -------------------------------------------------------------------------------- 1 | #import "metal_compute_base.h" 2 | 3 | @interface BitonicSortMetalObjC : MetalComputeBase 4 | - (instancetype) initWithNumElements:(size_t) num_elements 5 | forFloat:(bool) for_float 6 | NumThreadsPerThreadgrouop:(size_t) num_threads_per_threadgroup; 7 | 8 | - (uint) numElements; 9 | - (void) performComputation; 10 | - (int*) getRawPointerInOut; 11 | @end 12 | -------------------------------------------------------------------------------- /05_radix_sort/metal/radix_sort_metal_cpp.h: -------------------------------------------------------------------------------- 1 | #ifndef __RADIX_SORT_METAL_CPP_H__ 2 | #define __RADIX_SORT_METAL_CPP_H__ 3 | 4 | class RadixSortMetalCppImpl; 5 | 6 | class RadixSortMetalCpp 7 | { 8 | 9 | public: 10 | RadixSortMetalCpp( 11 | const size_t num_elements , 12 | const bool for_float, 13 | const bool coalesced_write, 14 | const bool early_out , 15 | const int num_iterations_per_commit, 16 | const size_t num_threads_per_threadgroup ); 17 | 18 | virtual ~RadixSortMetalCpp(); 19 | 20 | void resetBufferFlag(); 21 | 22 | unsigned int numElements(); 23 | 24 | int* getRawPointerIn(); 25 | 26 | int* getRawPointerOut(); 27 | 28 | int* getRawPointerIn1(); 29 | 30 | int* getRawPointerIn2(); 31 | 32 | void performComputation(); 33 | 34 | private: 35 | RadixSortMetalCppImpl* m_impl; 36 | 37 | }; 38 | 39 | #endif /*__RADIX_SORT_METAL_CPP_H__*/ 40 | -------------------------------------------------------------------------------- /05_radix_sort/metal/radix_sort_metal_cpp_impl.h: -------------------------------------------------------------------------------- 1 | #ifndef __RADIX_SORT_METAL_CPP_IMPL_H__ 2 | #define __RADIX_SORT_METAL_CPP_IMPL_H__ 3 | 4 | #include 5 | 6 | class RadixSortMetalCppImpl 7 | { 8 | 9 | public: 10 | RadixSortMetalCppImpl( 11 | const size_t num_elements, 12 | const bool for_float, 13 | const bool coalesced_write, 14 | const bool early_out, 15 | const int num_iterations_per_commit, 16 | const size_t num_threads_per_threadgroup ); 17 | 18 | virtual ~RadixSortMetalCppImpl(); 19 | 20 | void resetBufferFlag(); 21 | 22 | unsigned int numElements(); 23 | 24 | int* getRawPointerIn(); 25 | 26 | int* getRawPointerOut(); 27 | 28 | int* getRawPointerIn1(); 29 | 30 | int* getRawPointerIn2(); 31 | 32 | void performComputation(); 33 | private: 34 | RadixSortMetalObjC* m_self; 35 | 36 | }; 37 | 38 | #endif /*__RADIX_SORT_METAL_CPP_IMPL_H__*/ 39 | -------------------------------------------------------------------------------- /05_radix_sort/metal/radix_sort_metal_objc.h: -------------------------------------------------------------------------------- 1 | #import "metal_compute_base.h" 2 | 3 | @interface RadixSortMetalObjC : MetalComputeBase 4 | - (instancetype) initWithNumElements:(size_t) num_elements 5 | forFloat:(bool) for_float 6 | CoalescedWrite:(bool) coalesced_write 7 | EarlyOut:(bool) early_out 8 | NumIterationsPerCommit:(int) num_iterations_per_commit 9 | NumThreadsPerThreadgrouop:(size_t) num_threads_per_threadgroup; 10 | - (void) resetBufferFlag; 11 | - (uint) numElements; 12 | - (int*) getRawPointerIn; 13 | - (int*) getRawPointerOut; 14 | - (void) performComputation; 15 | - (int*) getRawPointerIn1; 16 | - (int*) getRawPointerIn2; 17 | @end 18 | -------------------------------------------------------------------------------- /06_nbody/Makefile: -------------------------------------------------------------------------------- 1 | METAL_SHADER_LIB_NAME = nbody 2 | MAIN_SRC = test_nbody.cpp 3 | 4 | all: 5 | 6 | include ../common/common.mk 7 | -------------------------------------------------------------------------------- /06_nbody/doc/FLOAT_ANY_Overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/06_nbody/doc/FLOAT_ANY_Overview.png -------------------------------------------------------------------------------- /06_nbody/doc/FLOAT_STRUCTURE_OF_ARRAYS_Comparison_among_NEON_implementations_relative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/06_nbody/doc/FLOAT_STRUCTURE_OF_ARRAYS_Comparison_among_NEON_implementations_relative.png -------------------------------------------------------------------------------- /06_nbody/doc/FLOAT_STRUCTURE_OF_ARRAYS_Comparison_among_multithreaded_implementations_relative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/06_nbody/doc/FLOAT_STRUCTURE_OF_ARRAYS_Comparison_among_multithreaded_implementations_relative.png -------------------------------------------------------------------------------- /06_nbody/doc_ios/FLOAT_ANY_Overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/06_nbody/doc_ios/FLOAT_ANY_Overview.png -------------------------------------------------------------------------------- /06_nbody/doc_ios/FLOAT_STRUCTURE_OF_ARRAYS_Comparison_among_NEON_implementations_relative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/06_nbody/doc_ios/FLOAT_STRUCTURE_OF_ARRAYS_Comparison_among_NEON_implementations_relative.png -------------------------------------------------------------------------------- /06_nbody/doc_ios/FLOAT_STRUCTURE_OF_ARRAYS_Comparison_among_multithreaded_implementations_relative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/06_nbody/doc_ios/FLOAT_STRUCTURE_OF_ARRAYS_Comparison_among_multithreaded_implementations_relative.png -------------------------------------------------------------------------------- /06_nbody/metal/nbody_metal_cpp.cpp: -------------------------------------------------------------------------------- 1 | class NBodyMetalObjC; 2 | #include "nbody_metal_cpp_impl.h" 3 | #include "nbody_metal_cpp.h" 4 | 5 | NBodyMetalCpp::NBodyMetalCpp( const size_t num_elements ) 6 | :m_impl( new NBodyMetalCppImpl( num_elements ) ) 7 | { 8 | ; 9 | } 10 | 11 | NBodyMetalCpp::~NBodyMetalCpp() 12 | { 13 | delete m_impl; 14 | }; 15 | 16 | unsigned int NBodyMetalCpp::numElements(){ return m_impl->numElements(); } 17 | 18 | struct particle* NBodyMetalCpp::getRawPointerParticles() 19 | { 20 | return m_impl->getRawPointerParticles(); 21 | } 22 | 23 | void NBodyMetalCpp::performComputationDirectionIsP0ToP1( const bool p0_to_p1 ) 24 | { 25 | m_impl->performComputationDirectionIsP0ToP1( p0_to_p1 ); 26 | } 27 | -------------------------------------------------------------------------------- /06_nbody/metal/nbody_metal_cpp_impl.h: -------------------------------------------------------------------------------- 1 | #ifndef __NBODY_METAL_CPP_IMPL_H__ 2 | #define __NBODY_METAL_CPP_IMPL_H__ 3 | 4 | #include "nbody_metal_cpp.h" 5 | 6 | #include 7 | 8 | class NBodyMetalCppImpl 9 | { 10 | 11 | public: 12 | NBodyMetalCppImpl( const size_t num_elements ); 13 | 14 | virtual ~NBodyMetalCppImpl(); 15 | 16 | unsigned int numElements(); 17 | 18 | struct particle* getRawPointerParticles(); 19 | 20 | void performComputationDirectionIsP0ToP1( const bool p0_to_p1 ); 21 | 22 | private: 23 | NBodyMetalObjC* m_self; 24 | 25 | }; 26 | 27 | #endif /*__NBODY_METAL_CPP_IMPL_H__*/ 28 | -------------------------------------------------------------------------------- /06_nbody/metal/nbody_metal_cpp_impl.mm: -------------------------------------------------------------------------------- 1 | #import "nbody_metal_objc.h" 2 | #import "nbody_metal_cpp_impl.h" 3 | 4 | NBodyMetalCppImpl::NBodyMetalCppImpl( const size_t num_elements ){ 5 | 6 | m_self = [ [ NBodyMetalObjC alloc ] initWithNumElements : num_elements ]; 7 | } 8 | 9 | NBodyMetalCppImpl::~NBodyMetalCppImpl(){;} 10 | 11 | unsigned int NBodyMetalCppImpl::numElements() { 12 | return [ m_self numElements ]; 13 | } 14 | 15 | struct particle* NBodyMetalCppImpl::getRawPointerParticles() { 16 | return [ m_self getRawPointerParticles ]; 17 | } 18 | 19 | void NBodyMetalCppImpl::performComputationDirectionIsP0ToP1( const bool p0_to_p1 ) { 20 | 21 | return [ m_self performComputationDirectionIsP0ToP1:p0_to_p1 ]; 22 | } 23 | -------------------------------------------------------------------------------- /06_nbody/metal/nbody_metal_objc.h: -------------------------------------------------------------------------------- 1 | #import "metal_compute_base.h" 2 | 3 | #include "nbody_metal_cpp.h" 4 | 5 | @interface NBodyMetalObjC : MetalComputeBase 6 | - (instancetype) initWithNumElements:(size_t) num_elements ; 7 | - (uint) numElements; 8 | - (struct particle*) getRawPointerParticles; 9 | - (void) performComputationDirectionIsP0ToP1:(bool) p0_to_p1; 10 | @end 11 | -------------------------------------------------------------------------------- /07_2d_filter/Makefile: -------------------------------------------------------------------------------- 1 | METAL_SHADER_LIB_NAME = convolution_2d 2 | MAIN_SRC = test_convolution_2d.cpp 3 | LOCAL_INC = -Iciimage 4 | LOCAL_OBJ_DIR = ciimage 5 | LOCAL_FRAMEWORKS = -framework CoreImage -framework MetalPerformanceShaders 6 | 7 | all: 8 | 9 | include ../common/common.mk 10 | 11 | 12 | -------------------------------------------------------------------------------- /07_2d_filter/ciimage/convolution_2d_ciimage_cpp.h: -------------------------------------------------------------------------------- 1 | #ifndef __CONVOLUTION_2D_CIIMAGE_CPP_H__ 2 | #define __CONVOLUTION_2D_CIIMAGE_CPP_H__ 3 | 4 | #include "convolution_2d_ciimage_cpp_impl.h" 5 | 6 | class Convolution2D_CIImageCpp 7 | { 8 | public: 9 | Convolution2D_CIImageCpp( const size_t width, const size_t height, const size_t kernel_size, const bool use_gpu ); 10 | virtual ~Convolution2D_CIImageCpp(); 11 | void copyToInputBuffer(const float* const p); 12 | void copyToKernelBuffer(const float* const p); 13 | float* getOutputImagePtr(); 14 | void performConvolution(); 15 | 16 | private: 17 | Convolution2D_CIImageCppImpl *m_impl; 18 | }; 19 | 20 | #endif /*__CONVOLUTION_2D_CIIMAGE_CPP_H__*/ 21 | -------------------------------------------------------------------------------- /07_2d_filter/ciimage/convolution_2d_ciimage_cpp_impl.h: -------------------------------------------------------------------------------- 1 | #ifndef __CONVOLUTION_2D_CIIMAGE_CPP_IMPL_H__ 2 | #define __CONVOLUTION_2D_CIIMAGE_CPP_IMPL_H__ 3 | 4 | #include 5 | 6 | class Convolution2D_CIImageCppImpl 7 | { 8 | 9 | public: 10 | Convolution2D_CIImageCppImpl( const size_t width, const size_t height, const size_t kernel_size, const bool use_gpu ); 11 | 12 | virtual ~Convolution2D_CIImageCppImpl(); 13 | 14 | void copyToInputBuffer ( const float* const p ); 15 | void copyToKernelBuffer( const float* const p ); 16 | float* getOutputImagePtr(); 17 | void performConvolution(); 18 | 19 | private: 20 | Convolution2D_CIImageObjc* m_self; 21 | }; 22 | 23 | #endif /*__CONVOLUTION_2D_CIIMAGE_CPP_IMPL_H__*/ 24 | -------------------------------------------------------------------------------- /07_2d_filter/ciimage/convolution_2d_ciimage_objc.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface Convolution2D_CIImageObjc : NSObject 4 | - (instancetype) initWithWidth:(size_t) width Height:(size_t) height KernelSize:(size_t) kernel UseGPU:(bool) use_gpu; 5 | - (void) release_explicit; 6 | - (void) copyToInputBuffer:(const float*)p; 7 | - (void) copyToKernelBuffer:(const float*)p; 8 | - (float*) getOutputImagePtr; 9 | - (void) performConvolution; 10 | @end 11 | 12 | 13 | -------------------------------------------------------------------------------- /07_2d_filter/doc/FLOAT_MATRIX_ROW_MAJOR_Comparison_Among_CPU_Multithreaded_Implementations_relative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/07_2d_filter/doc/FLOAT_MATRIX_ROW_MAJOR_Comparison_Among_CPU_Multithreaded_Implementations_relative.png -------------------------------------------------------------------------------- /07_2d_filter/doc/FLOAT_MATRIX_ROW_MAJOR_Comparison_Among_GPU_Implementations_relative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/07_2d_filter/doc/FLOAT_MATRIX_ROW_MAJOR_Comparison_Among_GPU_Implementations_relative.png -------------------------------------------------------------------------------- /07_2d_filter/doc/FLOAT_MATRIX_ROW_MAJOR_Overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/07_2d_filter/doc/FLOAT_MATRIX_ROW_MAJOR_Overview.png -------------------------------------------------------------------------------- /07_2d_filter/doc_ios/FLOAT_MATRIX_ROW_MAJOR_Comparison_Among_CPU_Multithreaded_Implementations_relative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/07_2d_filter/doc_ios/FLOAT_MATRIX_ROW_MAJOR_Comparison_Among_CPU_Multithreaded_Implementations_relative.png -------------------------------------------------------------------------------- /07_2d_filter/doc_ios/FLOAT_MATRIX_ROW_MAJOR_Comparison_Among_GPU_Implementations_relative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/07_2d_filter/doc_ios/FLOAT_MATRIX_ROW_MAJOR_Comparison_Among_GPU_Implementations_relative.png -------------------------------------------------------------------------------- /07_2d_filter/doc_ios/FLOAT_MATRIX_ROW_MAJOR_Overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/07_2d_filter/doc_ios/FLOAT_MATRIX_ROW_MAJOR_Overview.png -------------------------------------------------------------------------------- /07_2d_filter/metal/convolution_2d_metal_cpp.h: -------------------------------------------------------------------------------- 1 | #ifndef __CONVOLUTION_2D_METAL_CPP_H__ 2 | #define __CONVOLUTION_2D_METAL_CPP_H__ 3 | 4 | #include 5 | 6 | class Convolution2DMetalCppImpl; 7 | 8 | class Convolution2DMetalCpp 9 | { 10 | public: 11 | Convolution2DMetalCpp( const size_t width, const size_t height, const size_t kernel_size , const int algo_type); 12 | virtual ~Convolution2DMetalCpp(); 13 | 14 | void copyToInputBuffer ( const float* const p ); 15 | void copyToKernelBuffer( const float* const p ); 16 | float* getOutputImagePtr(); 17 | void performConvolution(); 18 | 19 | private: 20 | Convolution2DMetalCppImpl* m_impl; 21 | }; 22 | 23 | #endif /*__CONVOLUTION_2D_METAL_CPP_H__*/ 24 | -------------------------------------------------------------------------------- /07_2d_filter/metal/convolution_2d_metal_cpp_impl.h: -------------------------------------------------------------------------------- 1 | #ifndef __CONVOLUTION_2D_METAL_CPP_IMPL_H__ 2 | #define __CONVOLUTION_2D_METAL_CPP_IMPL_H__ 3 | 4 | #include "convolution_2d_metal_cpp.h" 5 | 6 | class Convolution2DMetalCppImpl 7 | { 8 | public: 9 | Convolution2DMetalCppImpl( const size_t width, const size_t height, const size_t kernel_size, const int algo_type ); 10 | virtual ~Convolution2DMetalCppImpl(); 11 | void copyToInputBuffer ( const float* const p ); 12 | void copyToKernelBuffer( const float* const p ); 13 | float* getOutputImagePtr(); 14 | void performConvolution(); 15 | 16 | private: 17 | const int m_algo_type; 18 | Convolution2DMetalObjCOwnShader* m_self_own_shader; 19 | Convolution2DMetalObjCMPS* m_self_mps; 20 | }; 21 | #endif /*__CONVOLUTION_2D_METAL_CPP_IMPL_H__*/ 22 | -------------------------------------------------------------------------------- /07_2d_filter/metal/convolution_2d_metal_objc_mps.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | #include "convolution_2d_metal_cpp.h" 5 | 6 | @interface Convolution2DMetalObjCMPS : NSObject 7 | 8 | - (instancetype) initWithWidth:(size_t) width Height:(size_t) height KernelSize:(size_t) kernel_size; 9 | 10 | - (void) copyToInputBuffer: (const float* const) p; 11 | - (void) copyToKernelBuffer:(const float* const) p; 12 | - (float*) getOutputImagePtr; 13 | - (void) performConvolution; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /07_2d_filter/metal/convolution_2d_metal_objc_own_shader.h: -------------------------------------------------------------------------------- 1 | #import "metal_compute_base.h" 2 | 3 | #include "convolution_2d_metal_cpp.h" 4 | 5 | @interface Convolution2DMetalObjCOwnShader : MetalComputeBase 6 | 7 | - (instancetype) initWithWidth:(size_t) width Height:(size_t) height KernelSize:(size_t) kernel_size Use2Stages:(bool) use2stages; 8 | 9 | - (void) copyToInputBuffer: (const float* const) p; 10 | - (void) copyToKernelBuffer:(const float* const) p; 11 | - (float*) getOutputImagePtr; 12 | - (void) performConvolution; 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /08_sparse_matrix_vector_mul/Makefile: -------------------------------------------------------------------------------- 1 | METAL_SHADER_LIB_NAME = sparse_matrix_vector 2 | MAIN_SRC = test_sparse_matrix_vector.cpp 3 | 4 | all: 5 | 6 | include ../common/common.mk 7 | -------------------------------------------------------------------------------- /08_sparse_matrix_vector_mul/doc/DOUBLE_MATRIX_SPARSE_Comparison_Among_Multithreaded_Implementations_:_Double_relative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/08_sparse_matrix_vector_mul/doc/DOUBLE_MATRIX_SPARSE_Comparison_Among_Multithreaded_Implementations_:_Double_relative.png -------------------------------------------------------------------------------- /08_sparse_matrix_vector_mul/doc/DOUBLE_MATRIX_SPARSE_Overview_:_Double.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/08_sparse_matrix_vector_mul/doc/DOUBLE_MATRIX_SPARSE_Overview_:_Double.png -------------------------------------------------------------------------------- /08_sparse_matrix_vector_mul/doc/FLOAT_MATRIX_SPARSE_Comparison_Among_GPU_Implementations_:_Float_relative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/08_sparse_matrix_vector_mul/doc/FLOAT_MATRIX_SPARSE_Comparison_Among_GPU_Implementations_:_Float_relative.png -------------------------------------------------------------------------------- /08_sparse_matrix_vector_mul/doc/FLOAT_MATRIX_SPARSE_Comparison_Among_Multithreaded_Implementations_:_Float_relative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/08_sparse_matrix_vector_mul/doc/FLOAT_MATRIX_SPARSE_Comparison_Among_Multithreaded_Implementations_:_Float_relative.png -------------------------------------------------------------------------------- /08_sparse_matrix_vector_mul/doc/FLOAT_MATRIX_SPARSE_Overview_:_Float.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/08_sparse_matrix_vector_mul/doc/FLOAT_MATRIX_SPARSE_Overview_:_Float.png -------------------------------------------------------------------------------- /08_sparse_matrix_vector_mul/doc_ios/DOUBLE_MATRIX_SPARSE_Comparison_Among_Multithreaded_Implementations_:_Double_relative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/08_sparse_matrix_vector_mul/doc_ios/DOUBLE_MATRIX_SPARSE_Comparison_Among_Multithreaded_Implementations_:_Double_relative.png -------------------------------------------------------------------------------- /08_sparse_matrix_vector_mul/doc_ios/DOUBLE_MATRIX_SPARSE_Overview_:_Double.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/08_sparse_matrix_vector_mul/doc_ios/DOUBLE_MATRIX_SPARSE_Overview_:_Double.png -------------------------------------------------------------------------------- /08_sparse_matrix_vector_mul/doc_ios/FLOAT_MATRIX_SPARSE_Comparison_Among_GPU_Implementations_:_Float_relative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/08_sparse_matrix_vector_mul/doc_ios/FLOAT_MATRIX_SPARSE_Comparison_Among_GPU_Implementations_:_Float_relative.png -------------------------------------------------------------------------------- /08_sparse_matrix_vector_mul/doc_ios/FLOAT_MATRIX_SPARSE_Comparison_Among_Multithreaded_Implementations_:_Float_relative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/08_sparse_matrix_vector_mul/doc_ios/FLOAT_MATRIX_SPARSE_Comparison_Among_Multithreaded_Implementations_:_Float_relative.png -------------------------------------------------------------------------------- /08_sparse_matrix_vector_mul/doc_ios/FLOAT_MATRIX_SPARSE_Overview_:_Float.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/08_sparse_matrix_vector_mul/doc_ios/FLOAT_MATRIX_SPARSE_Overview_:_Float.png -------------------------------------------------------------------------------- /09_dense_matrix_vector_mul/Makefile: -------------------------------------------------------------------------------- 1 | METAL_SHADER_LIB_NAME = dense_matrix_vector 2 | MAIN_SRC = test_dense_matrix_vector.cpp 3 | LOCAL_FRAMEWORKS = -framework MetalPerformanceShaders 4 | 5 | all: 6 | 7 | include ../common/common.mk 8 | -------------------------------------------------------------------------------- /09_dense_matrix_vector_mul/doc/DOUBLE_ANY_Overview_Double.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/09_dense_matrix_vector_mul/doc/DOUBLE_ANY_Overview_Double.png -------------------------------------------------------------------------------- /09_dense_matrix_vector_mul/doc/DOUBLE_MATRIX_COL_MAJOR_Comparison_Among_CPP_Multithread_relative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/09_dense_matrix_vector_mul/doc/DOUBLE_MATRIX_COL_MAJOR_Comparison_Among_CPP_Multithread_relative.png -------------------------------------------------------------------------------- /09_dense_matrix_vector_mul/doc/DOUBLE_MATRIX_COL_MAJOR_Comparison_Among_NEON_Loop_Unrolling_relative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/09_dense_matrix_vector_mul/doc/DOUBLE_MATRIX_COL_MAJOR_Comparison_Among_NEON_Loop_Unrolling_relative.png -------------------------------------------------------------------------------- /09_dense_matrix_vector_mul/doc/DOUBLE_MATRIX_COL_MAJOR_Comparison_Among_NEON_Multithread_relative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/09_dense_matrix_vector_mul/doc/DOUBLE_MATRIX_COL_MAJOR_Comparison_Among_NEON_Multithread_relative.png -------------------------------------------------------------------------------- /09_dense_matrix_vector_mul/doc/DOUBLE_MATRIX_COL_MAJOR_Overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/09_dense_matrix_vector_mul/doc/DOUBLE_MATRIX_COL_MAJOR_Overview.png -------------------------------------------------------------------------------- /09_dense_matrix_vector_mul/doc/DOUBLE_MATRIX_ROW_MAJOR_Comparison_Among_CPP_Multithread_relative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/09_dense_matrix_vector_mul/doc/DOUBLE_MATRIX_ROW_MAJOR_Comparison_Among_CPP_Multithread_relative.png -------------------------------------------------------------------------------- /09_dense_matrix_vector_mul/doc/DOUBLE_MATRIX_ROW_MAJOR_Comparison_Among_NEON_Loop_Unrolling_relative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/09_dense_matrix_vector_mul/doc/DOUBLE_MATRIX_ROW_MAJOR_Comparison_Among_NEON_Loop_Unrolling_relative.png -------------------------------------------------------------------------------- /09_dense_matrix_vector_mul/doc/DOUBLE_MATRIX_ROW_MAJOR_Comparison_Among_NEON_Multithread_relative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/09_dense_matrix_vector_mul/doc/DOUBLE_MATRIX_ROW_MAJOR_Comparison_Among_NEON_Multithread_relative.png -------------------------------------------------------------------------------- /09_dense_matrix_vector_mul/doc/DOUBLE_MATRIX_ROW_MAJOR_Overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/09_dense_matrix_vector_mul/doc/DOUBLE_MATRIX_ROW_MAJOR_Overview.png -------------------------------------------------------------------------------- /09_dense_matrix_vector_mul/doc/FLOAT_ANY_Overview_Float.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/09_dense_matrix_vector_mul/doc/FLOAT_ANY_Overview_Float.png -------------------------------------------------------------------------------- /09_dense_matrix_vector_mul/doc/FLOAT_MATRIX_COL_MAJOR_Comparison_Among_CPP_Multithread_relative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/09_dense_matrix_vector_mul/doc/FLOAT_MATRIX_COL_MAJOR_Comparison_Among_CPP_Multithread_relative.png -------------------------------------------------------------------------------- /09_dense_matrix_vector_mul/doc/FLOAT_MATRIX_COL_MAJOR_Comparison_Among_Metal_relative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/09_dense_matrix_vector_mul/doc/FLOAT_MATRIX_COL_MAJOR_Comparison_Among_Metal_relative.png -------------------------------------------------------------------------------- /09_dense_matrix_vector_mul/doc/FLOAT_MATRIX_COL_MAJOR_Comparison_Among_NEON_Loop_Unrolling_relative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/09_dense_matrix_vector_mul/doc/FLOAT_MATRIX_COL_MAJOR_Comparison_Among_NEON_Loop_Unrolling_relative.png -------------------------------------------------------------------------------- /09_dense_matrix_vector_mul/doc/FLOAT_MATRIX_COL_MAJOR_Comparison_Among_NEON_Multithread_relative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/09_dense_matrix_vector_mul/doc/FLOAT_MATRIX_COL_MAJOR_Comparison_Among_NEON_Multithread_relative.png -------------------------------------------------------------------------------- /09_dense_matrix_vector_mul/doc/FLOAT_MATRIX_COL_MAJOR_Overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/09_dense_matrix_vector_mul/doc/FLOAT_MATRIX_COL_MAJOR_Overview.png -------------------------------------------------------------------------------- /09_dense_matrix_vector_mul/doc/FLOAT_MATRIX_ROW_MAJOR_Comparison_Among_CPP_Multithread_relative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/09_dense_matrix_vector_mul/doc/FLOAT_MATRIX_ROW_MAJOR_Comparison_Among_CPP_Multithread_relative.png -------------------------------------------------------------------------------- /09_dense_matrix_vector_mul/doc/FLOAT_MATRIX_ROW_MAJOR_Comparison_Among_Metal_relative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/09_dense_matrix_vector_mul/doc/FLOAT_MATRIX_ROW_MAJOR_Comparison_Among_Metal_relative.png -------------------------------------------------------------------------------- /09_dense_matrix_vector_mul/doc/FLOAT_MATRIX_ROW_MAJOR_Comparison_Among_NEON_Loop_Unrolling_relative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/09_dense_matrix_vector_mul/doc/FLOAT_MATRIX_ROW_MAJOR_Comparison_Among_NEON_Loop_Unrolling_relative.png -------------------------------------------------------------------------------- /09_dense_matrix_vector_mul/doc/FLOAT_MATRIX_ROW_MAJOR_Comparison_Among_NEON_Multithread_relative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/09_dense_matrix_vector_mul/doc/FLOAT_MATRIX_ROW_MAJOR_Comparison_Among_NEON_Multithread_relative.png -------------------------------------------------------------------------------- /09_dense_matrix_vector_mul/doc/FLOAT_MATRIX_ROW_MAJOR_Overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/09_dense_matrix_vector_mul/doc/FLOAT_MATRIX_ROW_MAJOR_Overview.png -------------------------------------------------------------------------------- /09_dense_matrix_vector_mul/doc_ios/DOUBLE_ANY_Overview_Double.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/09_dense_matrix_vector_mul/doc_ios/DOUBLE_ANY_Overview_Double.png -------------------------------------------------------------------------------- /09_dense_matrix_vector_mul/doc_ios/DOUBLE_MATRIX_COL_MAJOR_Comparison_Among_CPP_Multithread_relative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/09_dense_matrix_vector_mul/doc_ios/DOUBLE_MATRIX_COL_MAJOR_Comparison_Among_CPP_Multithread_relative.png -------------------------------------------------------------------------------- /09_dense_matrix_vector_mul/doc_ios/DOUBLE_MATRIX_COL_MAJOR_Comparison_Among_NEON_Loop_Unrolling_relative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/09_dense_matrix_vector_mul/doc_ios/DOUBLE_MATRIX_COL_MAJOR_Comparison_Among_NEON_Loop_Unrolling_relative.png -------------------------------------------------------------------------------- /09_dense_matrix_vector_mul/doc_ios/DOUBLE_MATRIX_COL_MAJOR_Comparison_Among_NEON_Multithread_relative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/09_dense_matrix_vector_mul/doc_ios/DOUBLE_MATRIX_COL_MAJOR_Comparison_Among_NEON_Multithread_relative.png -------------------------------------------------------------------------------- /09_dense_matrix_vector_mul/doc_ios/DOUBLE_MATRIX_COL_MAJOR_Overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/09_dense_matrix_vector_mul/doc_ios/DOUBLE_MATRIX_COL_MAJOR_Overview.png -------------------------------------------------------------------------------- /09_dense_matrix_vector_mul/doc_ios/DOUBLE_MATRIX_ROW_MAJOR_Comparison_Among_CPP_Multithread_relative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/09_dense_matrix_vector_mul/doc_ios/DOUBLE_MATRIX_ROW_MAJOR_Comparison_Among_CPP_Multithread_relative.png -------------------------------------------------------------------------------- /09_dense_matrix_vector_mul/doc_ios/DOUBLE_MATRIX_ROW_MAJOR_Comparison_Among_NEON_Loop_Unrolling_relative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/09_dense_matrix_vector_mul/doc_ios/DOUBLE_MATRIX_ROW_MAJOR_Comparison_Among_NEON_Loop_Unrolling_relative.png -------------------------------------------------------------------------------- /09_dense_matrix_vector_mul/doc_ios/DOUBLE_MATRIX_ROW_MAJOR_Comparison_Among_NEON_Multithread_relative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/09_dense_matrix_vector_mul/doc_ios/DOUBLE_MATRIX_ROW_MAJOR_Comparison_Among_NEON_Multithread_relative.png -------------------------------------------------------------------------------- /09_dense_matrix_vector_mul/doc_ios/DOUBLE_MATRIX_ROW_MAJOR_Overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/09_dense_matrix_vector_mul/doc_ios/DOUBLE_MATRIX_ROW_MAJOR_Overview.png -------------------------------------------------------------------------------- /09_dense_matrix_vector_mul/doc_ios/FLOAT_ANY_Overview_Float.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/09_dense_matrix_vector_mul/doc_ios/FLOAT_ANY_Overview_Float.png -------------------------------------------------------------------------------- /09_dense_matrix_vector_mul/doc_ios/FLOAT_MATRIX_COL_MAJOR_Comparison_Among_CPP_Multithread_relative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/09_dense_matrix_vector_mul/doc_ios/FLOAT_MATRIX_COL_MAJOR_Comparison_Among_CPP_Multithread_relative.png -------------------------------------------------------------------------------- /09_dense_matrix_vector_mul/doc_ios/FLOAT_MATRIX_COL_MAJOR_Comparison_Among_Metal_relative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/09_dense_matrix_vector_mul/doc_ios/FLOAT_MATRIX_COL_MAJOR_Comparison_Among_Metal_relative.png -------------------------------------------------------------------------------- /09_dense_matrix_vector_mul/doc_ios/FLOAT_MATRIX_COL_MAJOR_Comparison_Among_NEON_Loop_Unrolling_relative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/09_dense_matrix_vector_mul/doc_ios/FLOAT_MATRIX_COL_MAJOR_Comparison_Among_NEON_Loop_Unrolling_relative.png -------------------------------------------------------------------------------- /09_dense_matrix_vector_mul/doc_ios/FLOAT_MATRIX_COL_MAJOR_Comparison_Among_NEON_Multithread_relative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/09_dense_matrix_vector_mul/doc_ios/FLOAT_MATRIX_COL_MAJOR_Comparison_Among_NEON_Multithread_relative.png -------------------------------------------------------------------------------- /09_dense_matrix_vector_mul/doc_ios/FLOAT_MATRIX_COL_MAJOR_Overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/09_dense_matrix_vector_mul/doc_ios/FLOAT_MATRIX_COL_MAJOR_Overview.png -------------------------------------------------------------------------------- /09_dense_matrix_vector_mul/doc_ios/FLOAT_MATRIX_ROW_MAJOR_Comparison_Among_CPP_Multithread_relative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/09_dense_matrix_vector_mul/doc_ios/FLOAT_MATRIX_ROW_MAJOR_Comparison_Among_CPP_Multithread_relative.png -------------------------------------------------------------------------------- /09_dense_matrix_vector_mul/doc_ios/FLOAT_MATRIX_ROW_MAJOR_Comparison_Among_Metal_relative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/09_dense_matrix_vector_mul/doc_ios/FLOAT_MATRIX_ROW_MAJOR_Comparison_Among_Metal_relative.png -------------------------------------------------------------------------------- /09_dense_matrix_vector_mul/doc_ios/FLOAT_MATRIX_ROW_MAJOR_Comparison_Among_NEON_Loop_Unrolling_relative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/09_dense_matrix_vector_mul/doc_ios/FLOAT_MATRIX_ROW_MAJOR_Comparison_Among_NEON_Loop_Unrolling_relative.png -------------------------------------------------------------------------------- /09_dense_matrix_vector_mul/doc_ios/FLOAT_MATRIX_ROW_MAJOR_Comparison_Among_NEON_Multithread_relative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/09_dense_matrix_vector_mul/doc_ios/FLOAT_MATRIX_ROW_MAJOR_Comparison_Among_NEON_Multithread_relative.png -------------------------------------------------------------------------------- /09_dense_matrix_vector_mul/doc_ios/FLOAT_MATRIX_ROW_MAJOR_Overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/09_dense_matrix_vector_mul/doc_ios/FLOAT_MATRIX_ROW_MAJOR_Overview.png -------------------------------------------------------------------------------- /09_dense_matrix_vector_mul/metal/dense_matrix_vector_metal_cpp.h: -------------------------------------------------------------------------------- 1 | #ifndef __DENSE_MATRIX_VECTOR_METAL_CPP_H__ 2 | #define __DENSE_MATRIX_VECTOR_METAL_CPP_H__ 3 | 4 | #include 5 | 6 | struct dense_matrix_vector_constants { 7 | int M; 8 | int N; 9 | }; 10 | 11 | class DenseMatrixVectorMetalCppImpl; 12 | 13 | class DenseMatrixVectorMetalCpp 14 | { 15 | 16 | public: 17 | 18 | DenseMatrixVectorMetalCpp( const int M, const int N, const bool col_major, const bool threads_over_rows ); 19 | 20 | DenseMatrixVectorMetalCpp( const int M, const int N ); // MPS 21 | 22 | virtual ~DenseMatrixVectorMetalCpp(); 23 | 24 | float* getRawPointerMat(); 25 | 26 | float* getRawPointerVec(); 27 | 28 | float* getRawPointerOutVec(); 29 | 30 | void setInitialStates( float* M, float* v ); 31 | 32 | void performComputation(); 33 | 34 | private: 35 | DenseMatrixVectorMetalCppImpl* m_impl; 36 | 37 | }; 38 | 39 | #endif /*__DENSE_MATRIX_VECTOR_METAL_CPP_H__*/ 40 | -------------------------------------------------------------------------------- /09_dense_matrix_vector_mul/metal/dense_matrix_vector_metal_objc_mps.h: -------------------------------------------------------------------------------- 1 | #import "metal_compute_base.h" 2 | 3 | #include "dense_matrix_vector_metal_cpp.h" 4 | 5 | @interface DenseMatrixVectorMetalObjCMPS : MetalComputeBase 6 | 7 | - (instancetype) initWithM:(int) m N:(int) n; 8 | 9 | - (void) setInitialStatesMat:(float*) mat Vec:(float*) v; 10 | 11 | - (float*) getRawPointerMat; 12 | 13 | - (float*) getRawPointerVec; 14 | 15 | - (float*) getRawPointerOutVec; 16 | 17 | - (void) performComputation; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /09_dense_matrix_vector_mul/metal/dense_matrix_vector_metal_objc_own_shader.h: -------------------------------------------------------------------------------- 1 | #import "metal_compute_base.h" 2 | 3 | #include "dense_matrix_vector_metal_cpp.h" 4 | 5 | @interface DenseMatrixVectorMetalObjCOwnShader : MetalComputeBase 6 | 7 | - (instancetype) initWithM:(int) m N:(int) n ColMajor:(bool) col_major ThreadsOverRows:(bool) threads_over_rows; 8 | 9 | - (void) setInitialStatesMat:(float*) mat Vec:(float*) v; 10 | 11 | - (float*) getRawPointerMat; 12 | 13 | - (float*) getRawPointerVec; 14 | 15 | - (float*) getRawPointerOutVec; 16 | 17 | - (void) performComputation; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /10_cholesky_decomp/Makefile: -------------------------------------------------------------------------------- 1 | METAL_SHADER_LIB_NAME = cholesky 2 | MAIN_SRC = test_cholesky.cpp 3 | LOCAL_INC = -I/usr/local/include/eigen3 4 | LOCAL_LIBS = -lgsl 5 | LOCAL_FRAMEWORKS = -framework MetalPerformanceShaders 6 | 7 | include ../common/common.mk 8 | -------------------------------------------------------------------------------- /10_cholesky_decomp/doc/DOUBLE_ANY_Overview_:_Double.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/10_cholesky_decomp/doc/DOUBLE_ANY_Overview_:_Double.png -------------------------------------------------------------------------------- /10_cholesky_decomp/doc/FLOAT_ANY_Overview_:_Float.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/10_cholesky_decomp/doc/FLOAT_ANY_Overview_:_Float.png -------------------------------------------------------------------------------- /10_cholesky_decomp/doc/FLOAT_MATRIX_COL_MAJOR_Comparison_of_two_Metal_implementations_relative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/10_cholesky_decomp/doc/FLOAT_MATRIX_COL_MAJOR_Comparison_of_two_Metal_implementations_relative.png -------------------------------------------------------------------------------- /10_cholesky_decomp/doc_ios/DOUBLE_ANY_Overview_:_Double.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/10_cholesky_decomp/doc_ios/DOUBLE_ANY_Overview_:_Double.png -------------------------------------------------------------------------------- /10_cholesky_decomp/doc_ios/FLOAT_ANY_Overview_:_Float.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/10_cholesky_decomp/doc_ios/FLOAT_ANY_Overview_:_Float.png -------------------------------------------------------------------------------- /10_cholesky_decomp/doc_ios/FLOAT_MATRIX_COL_MAJOR_Comparison_of_two_Metal_implementations_relative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/10_cholesky_decomp/doc_ios/FLOAT_MATRIX_COL_MAJOR_Comparison_of_two_Metal_implementations_relative.png -------------------------------------------------------------------------------- /10_cholesky_decomp/metal/cholesky_metal_cpp.h: -------------------------------------------------------------------------------- 1 | #ifndef __CHOLESKY_METAL_CPP_H__ 2 | #define __CHOLESKY_METAL_CPP_H__ 3 | 4 | #include 5 | typedef unsigned int uint; 6 | 7 | struct cholesky_constants { 8 | uint dim; 9 | }; 10 | 11 | class CholeskyMetalCppImpl; 12 | 13 | class CholeskyMetalCpp 14 | { 15 | 16 | public: 17 | CholeskyMetalCpp( const int dim, const bool use_mps ); 18 | 19 | virtual ~CholeskyMetalCpp(); 20 | 21 | float* getRawPointerL(); 22 | 23 | float* getRawPointerX(); 24 | 25 | float* getRawPointerY(); 26 | 27 | float* getRawPointerB(); 28 | 29 | void setInitialStates( float* L, float* b ); 30 | 31 | void performComputation(); 32 | 33 | private: 34 | CholeskyMetalCppImpl* m_impl; 35 | 36 | }; 37 | 38 | #endif /*__CHOLESKY__METAL_CPP_H__*/ 39 | -------------------------------------------------------------------------------- /10_cholesky_decomp/metal/cholesky_metal_cpp_impl.h: -------------------------------------------------------------------------------- 1 | #ifndef __CHOLESKY_METAL_CPP_IMPL_H__ 2 | #define __CHOLESKY_METAL_CPP_IMPL_H__ 3 | 4 | #include "cholesky_metal_cpp.h" 5 | 6 | #include 7 | 8 | class CholeskyMetalCppImpl 9 | { 10 | public: 11 | CholeskyMetalCppImpl( const int dim, const bool useMPS ); 12 | 13 | virtual ~CholeskyMetalCppImpl(); 14 | 15 | float* getRawPointerL(); 16 | 17 | float* getRawPointerX(); 18 | 19 | float* getRawPointerY(); 20 | 21 | float* getRawPointerB(); 22 | 23 | void setInitialStates( float* L, float* b ); 24 | 25 | void performComputation(); 26 | 27 | private: 28 | bool m_use_mps; 29 | CholeskyMetalObjCOwnShader* m_self_own_shader; 30 | CholeskyMetalObjCMPS* m_self_mps; 31 | 32 | }; 33 | 34 | #endif /*__CHOLESKY_METAL_CPP_IMPL_H__*/ 35 | -------------------------------------------------------------------------------- /10_cholesky_decomp/metal/cholesky_metal_objc_mps.h: -------------------------------------------------------------------------------- 1 | #import "metal_compute_base.h" 2 | 3 | @interface CholeskyMetalObjCMPS : MetalComputeBase 4 | 5 | - (instancetype) initWithDim:(size_t) dim; 6 | 7 | - (void) setInitialStatesL:(float*) L B:(float*) b; 8 | 9 | - (float*) getRawPointerL; 10 | 11 | - (float*) getRawPointerX; 12 | 13 | - (float*) getRawPointerY; 14 | 15 | - (float*) getRawPointerB; 16 | 17 | - (void) performComputation; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /10_cholesky_decomp/metal/cholesky_metal_objc_own_shader.h: -------------------------------------------------------------------------------- 1 | #import "metal_compute_base.h" 2 | 3 | #include "cholesky_metal_cpp.h" 4 | 5 | @interface CholeskyMetalObjCOwnShader : MetalComputeBase 6 | 7 | - (instancetype) initWithDim:(size_t) dim; 8 | 9 | - (void) setInitialStatesL:(float*) L B:(float*) b; 10 | 11 | - (float*) getRawPointerL; 12 | 13 | - (float*) getRawPointerX; 14 | 15 | - (float*) getRawPointerY; 16 | 17 | - (float*) getRawPointerB; 18 | 19 | - (void) performComputation; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /10_cholesky_decomp/test_case_cholesky_gsl.h: -------------------------------------------------------------------------------- 1 | #ifndef __TEST_CASE_CHOLESKY_GSL_H__ 2 | #define __TEST_CASE_CHOLESKY_GSL_H__ 3 | 4 | #include "test_case_cholesky.h" 5 | 6 | template 7 | class TestCaseCholesky_gsl : public TestCaseCholesky { 8 | 9 | void* m_Ap; // gsl_matrix 10 | void* m_xp; // gsl_vector 11 | void* m_bp; // gsl_vector 12 | 13 | public: 14 | 15 | TestCaseCholesky_gsl( const int dim ); 16 | 17 | virtual ~TestCaseCholesky_gsl(); 18 | 19 | virtual void setInitialStates( T* A, T* b ); 20 | 21 | virtual void compareTruth( const T* const L_baseline, const T* const x_baseline ); 22 | 23 | void run(); 24 | }; 25 | 26 | 27 | #endif /*__TEST_CASE_CHOLESKY_GSL_H__*/ 28 | -------------------------------------------------------------------------------- /11_jacobi_solver/Makefile: -------------------------------------------------------------------------------- 1 | 2 | METAL_SHADER_LIB_NAME = jacobi_solver 3 | MAIN_SRC = test_jacobi_solver.cpp 4 | 5 | all: 6 | 7 | include ../common/common.mk 8 | -------------------------------------------------------------------------------- /11_jacobi_solver/doc/DOUBLE_ANY_Overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/11_jacobi_solver/doc/DOUBLE_ANY_Overview.png -------------------------------------------------------------------------------- /11_jacobi_solver/doc/DOUBLE_MATRIX_COL_MAJOR_Comparison_Among_NEON_Loop_Unrolling_relative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/11_jacobi_solver/doc/DOUBLE_MATRIX_COL_MAJOR_Comparison_Among_NEON_Loop_Unrolling_relative.png -------------------------------------------------------------------------------- /11_jacobi_solver/doc/DOUBLE_MATRIX_COL_MAJOR_Comparison_Among_NEON_Multithreads_relative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/11_jacobi_solver/doc/DOUBLE_MATRIX_COL_MAJOR_Comparison_Among_NEON_Multithreads_relative.png -------------------------------------------------------------------------------- /11_jacobi_solver/doc/DOUBLE_MATRIX_COL_MAJOR_Overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/11_jacobi_solver/doc/DOUBLE_MATRIX_COL_MAJOR_Overview.png -------------------------------------------------------------------------------- /11_jacobi_solver/doc/DOUBLE_MATRIX_ROW_MAJOR_Comparison_Among_NEON_Loop_Unrolling_relative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/11_jacobi_solver/doc/DOUBLE_MATRIX_ROW_MAJOR_Comparison_Among_NEON_Loop_Unrolling_relative.png -------------------------------------------------------------------------------- /11_jacobi_solver/doc/DOUBLE_MATRIX_ROW_MAJOR_Comparison_Among_NEON_Multithreads_relative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/11_jacobi_solver/doc/DOUBLE_MATRIX_ROW_MAJOR_Comparison_Among_NEON_Multithreads_relative.png -------------------------------------------------------------------------------- /11_jacobi_solver/doc/DOUBLE_MATRIX_ROW_MAJOR_Overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/11_jacobi_solver/doc/DOUBLE_MATRIX_ROW_MAJOR_Overview.png -------------------------------------------------------------------------------- /11_jacobi_solver/doc/FLOAT_ANY_Overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/11_jacobi_solver/doc/FLOAT_ANY_Overview.png -------------------------------------------------------------------------------- /11_jacobi_solver/doc/FLOAT_MATRIX_COL_MAJOR_Comparison_Among_NEON_Loop_Unrolling_relative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/11_jacobi_solver/doc/FLOAT_MATRIX_COL_MAJOR_Comparison_Among_NEON_Loop_Unrolling_relative.png -------------------------------------------------------------------------------- /11_jacobi_solver/doc/FLOAT_MATRIX_COL_MAJOR_Comparison_Among_NEON_Multithreads_relative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/11_jacobi_solver/doc/FLOAT_MATRIX_COL_MAJOR_Comparison_Among_NEON_Multithreads_relative.png -------------------------------------------------------------------------------- /11_jacobi_solver/doc/FLOAT_MATRIX_COL_MAJOR_Overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/11_jacobi_solver/doc/FLOAT_MATRIX_COL_MAJOR_Overview.png -------------------------------------------------------------------------------- /11_jacobi_solver/doc/FLOAT_MATRIX_ROW_MAJOR_Comparison_Among_NEON_Loop_Unrolling_relative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/11_jacobi_solver/doc/FLOAT_MATRIX_ROW_MAJOR_Comparison_Among_NEON_Loop_Unrolling_relative.png -------------------------------------------------------------------------------- /11_jacobi_solver/doc/FLOAT_MATRIX_ROW_MAJOR_Comparison_Among_NEON_Multithreads_relative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/11_jacobi_solver/doc/FLOAT_MATRIX_ROW_MAJOR_Comparison_Among_NEON_Multithreads_relative.png -------------------------------------------------------------------------------- /11_jacobi_solver/doc/FLOAT_MATRIX_ROW_MAJOR_Overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/11_jacobi_solver/doc/FLOAT_MATRIX_ROW_MAJOR_Overview.png -------------------------------------------------------------------------------- /11_jacobi_solver/doc_ios/DOUBLE_ANY_Overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/11_jacobi_solver/doc_ios/DOUBLE_ANY_Overview.png -------------------------------------------------------------------------------- /11_jacobi_solver/doc_ios/DOUBLE_MATRIX_COL_MAJOR_Comparison_Among_NEON_Loop_Unrolling_relative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/11_jacobi_solver/doc_ios/DOUBLE_MATRIX_COL_MAJOR_Comparison_Among_NEON_Loop_Unrolling_relative.png -------------------------------------------------------------------------------- /11_jacobi_solver/doc_ios/DOUBLE_MATRIX_COL_MAJOR_Comparison_Among_NEON_Multithreads_relative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/11_jacobi_solver/doc_ios/DOUBLE_MATRIX_COL_MAJOR_Comparison_Among_NEON_Multithreads_relative.png -------------------------------------------------------------------------------- /11_jacobi_solver/doc_ios/DOUBLE_MATRIX_COL_MAJOR_Overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/11_jacobi_solver/doc_ios/DOUBLE_MATRIX_COL_MAJOR_Overview.png -------------------------------------------------------------------------------- /11_jacobi_solver/doc_ios/DOUBLE_MATRIX_ROW_MAJOR_Comparison_Among_NEON_Loop_Unrolling_relative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/11_jacobi_solver/doc_ios/DOUBLE_MATRIX_ROW_MAJOR_Comparison_Among_NEON_Loop_Unrolling_relative.png -------------------------------------------------------------------------------- /11_jacobi_solver/doc_ios/DOUBLE_MATRIX_ROW_MAJOR_Comparison_Among_NEON_Multithreads_relative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/11_jacobi_solver/doc_ios/DOUBLE_MATRIX_ROW_MAJOR_Comparison_Among_NEON_Multithreads_relative.png -------------------------------------------------------------------------------- /11_jacobi_solver/doc_ios/DOUBLE_MATRIX_ROW_MAJOR_Overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/11_jacobi_solver/doc_ios/DOUBLE_MATRIX_ROW_MAJOR_Overview.png -------------------------------------------------------------------------------- /11_jacobi_solver/doc_ios/FLOAT_ANY_Overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/11_jacobi_solver/doc_ios/FLOAT_ANY_Overview.png -------------------------------------------------------------------------------- /11_jacobi_solver/doc_ios/FLOAT_MATRIX_COL_MAJOR_Comparison_Among_NEON_Loop_Unrolling_relative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/11_jacobi_solver/doc_ios/FLOAT_MATRIX_COL_MAJOR_Comparison_Among_NEON_Loop_Unrolling_relative.png -------------------------------------------------------------------------------- /11_jacobi_solver/doc_ios/FLOAT_MATRIX_COL_MAJOR_Comparison_Among_NEON_Multithreads_relative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/11_jacobi_solver/doc_ios/FLOAT_MATRIX_COL_MAJOR_Comparison_Among_NEON_Multithreads_relative.png -------------------------------------------------------------------------------- /11_jacobi_solver/doc_ios/FLOAT_MATRIX_COL_MAJOR_Overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/11_jacobi_solver/doc_ios/FLOAT_MATRIX_COL_MAJOR_Overview.png -------------------------------------------------------------------------------- /11_jacobi_solver/doc_ios/FLOAT_MATRIX_ROW_MAJOR_Comparison_Among_NEON_Loop_Unrolling_relative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/11_jacobi_solver/doc_ios/FLOAT_MATRIX_ROW_MAJOR_Comparison_Among_NEON_Loop_Unrolling_relative.png -------------------------------------------------------------------------------- /11_jacobi_solver/doc_ios/FLOAT_MATRIX_ROW_MAJOR_Comparison_Among_NEON_Multithreads_relative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/11_jacobi_solver/doc_ios/FLOAT_MATRIX_ROW_MAJOR_Comparison_Among_NEON_Multithreads_relative.png -------------------------------------------------------------------------------- /11_jacobi_solver/doc_ios/FLOAT_MATRIX_ROW_MAJOR_Overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/11_jacobi_solver/doc_ios/FLOAT_MATRIX_ROW_MAJOR_Overview.png -------------------------------------------------------------------------------- /11_jacobi_solver/metal/jacobi_solver_metal_cpp.h: -------------------------------------------------------------------------------- 1 | #ifndef __JACOBI_SOLVER_METAL_CPP_H__ 2 | #define __JACOBI_SOLVER_METAL_CPP_H__ 3 | 4 | #include 5 | 6 | struct jacobi_solver_constants { 7 | int dim; 8 | }; 9 | 10 | class JacobiSolverMetalCppImpl; 11 | 12 | class JacobiSolverMetalCpp 13 | { 14 | 15 | public: 16 | JacobiSolverMetalCpp( const int dim, const int iteration, const int type, const bool one_commit ); 17 | 18 | virtual ~JacobiSolverMetalCpp(); 19 | 20 | float* getRawPointerA(); 21 | 22 | float* getRawPointerB(); 23 | 24 | float* getRawPointerActiveX(); 25 | 26 | float getError(); 27 | 28 | void setInitialStates( float* A, float* D, float* b, float* x1, float* x2 ); 29 | 30 | void performComputation(); 31 | 32 | private: 33 | JacobiSolverMetalCppImpl* m_impl; 34 | 35 | }; 36 | 37 | #endif /*__JACOBI_SOLVER_METAL_CPP_H__*/ 38 | -------------------------------------------------------------------------------- /11_jacobi_solver/metal/jacobi_solver_metal_cpp_impl.h: -------------------------------------------------------------------------------- 1 | #ifndef __JACOBI_SOLVER_METAL_CPP_IMPL_H__ 2 | #define __JACOBI_SOLVER_METAL_CPP_IMPL_H__ 3 | 4 | #include "jacobi_solver_metal_cpp.h" 5 | 6 | #include 7 | 8 | class JacobiSolverMetalCppImpl 9 | { 10 | 11 | public: 12 | JacobiSolverMetalCppImpl( const int dim, const int iteration, const int type, const bool one_commit ); 13 | 14 | virtual ~JacobiSolverMetalCppImpl(); 15 | 16 | float* getRawPointerA(); 17 | 18 | float* getRawPointerB(); 19 | 20 | float* getRawPointerActiveX(); 21 | 22 | float getError(); 23 | 24 | void setInitialStates( float* A, float* D, float* b, float* x1, float* x2 ); 25 | 26 | void performComputation(); 27 | 28 | private: 29 | JacobiSolverMetalObjC* m_self; 30 | }; 31 | 32 | #endif /*__JACOBI_SOLVER_METAL_CPP_IMPL_H__*/ 33 | -------------------------------------------------------------------------------- /11_jacobi_solver/metal/jacobi_solver_metal_objc.h: -------------------------------------------------------------------------------- 1 | #import "metal_compute_base.h" 2 | 3 | #include "jacobi_solver_metal_cpp.h" 4 | 5 | @interface JacobiSolverMetalObjC : MetalComputeBase 6 | 7 | - (instancetype)initWithDim:(int) dim Iteration:(int) iteration Type:(int) type OneCommit:(bool) one_commit; 8 | 9 | - (void) setInitialStatesA:(float*) A D:(float*) D B:(float*) b X1:(float*) x1 X2:(float*) x2; 10 | 11 | - (float*) getRawPointerA; 12 | 13 | - (float*) getRawPointerB; 14 | 15 | - (float*) getRawPointerActiveX; 16 | 17 | - (float) getError; 18 | 19 | - (void) performComputation; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /12_gauss_seidel_solver/Makefile: -------------------------------------------------------------------------------- 1 | METAL_SHADER_LIB_NAME = gauss_seidel_solver 2 | MAIN_SRC = test_gauss_seidel_solver.cpp 3 | 4 | all: 5 | 6 | include ../common/common.mk 7 | -------------------------------------------------------------------------------- /12_gauss_seidel_solver/doc/DOUBLE_ANY_Overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/12_gauss_seidel_solver/doc/DOUBLE_ANY_Overview.png -------------------------------------------------------------------------------- /12_gauss_seidel_solver/doc/DOUBLE_MATRIX_ROW_MAJOR_Comparison_Among_NEON_Loop_Unrolling_relative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/12_gauss_seidel_solver/doc/DOUBLE_MATRIX_ROW_MAJOR_Comparison_Among_NEON_Loop_Unrolling_relative.png -------------------------------------------------------------------------------- /12_gauss_seidel_solver/doc/FLOAT_ANY_Overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/12_gauss_seidel_solver/doc/FLOAT_ANY_Overview.png -------------------------------------------------------------------------------- /12_gauss_seidel_solver/doc/FLOAT_MATRIX_ROW_MAJOR_Comparison_Among_NEON_Loop_Unrolling_relative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/12_gauss_seidel_solver/doc/FLOAT_MATRIX_ROW_MAJOR_Comparison_Among_NEON_Loop_Unrolling_relative.png -------------------------------------------------------------------------------- /12_gauss_seidel_solver/doc_ios/DOUBLE_ANY_Overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/12_gauss_seidel_solver/doc_ios/DOUBLE_ANY_Overview.png -------------------------------------------------------------------------------- /12_gauss_seidel_solver/doc_ios/DOUBLE_MATRIX_ROW_MAJOR_Comparison_Among_NEON_Loop_Unrolling_relative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/12_gauss_seidel_solver/doc_ios/DOUBLE_MATRIX_ROW_MAJOR_Comparison_Among_NEON_Loop_Unrolling_relative.png -------------------------------------------------------------------------------- /12_gauss_seidel_solver/doc_ios/FLOAT_ANY_Overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/12_gauss_seidel_solver/doc_ios/FLOAT_ANY_Overview.png -------------------------------------------------------------------------------- /12_gauss_seidel_solver/doc_ios/FLOAT_MATRIX_ROW_MAJOR_Comparison_Among_NEON_Loop_Unrolling_relative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/12_gauss_seidel_solver/doc_ios/FLOAT_MATRIX_ROW_MAJOR_Comparison_Among_NEON_Loop_Unrolling_relative.png -------------------------------------------------------------------------------- /12_gauss_seidel_solver/metal/gauss_seidel_solver_metal_cpp.h: -------------------------------------------------------------------------------- 1 | #ifndef __GAUSS_SEIDEL_SOLVER_METAL_CPP_H__ 2 | #define __GAUSS_SEIDEL_SOLVER_METAL_CPP_H__ 3 | 4 | #include 5 | 6 | struct gauss_seidel_solver_constants { 7 | int dim; 8 | }; 9 | 10 | class GaussSeidelSolverMetalCppImpl; 11 | 12 | class GaussSeidelSolverMetalCpp 13 | { 14 | 15 | public: 16 | GaussSeidelSolverMetalCpp( const int dim, const int iteration, const bool one_commit ); 17 | 18 | virtual ~GaussSeidelSolverMetalCpp(); 19 | 20 | float* getRawPointerA(); 21 | 22 | float* getRawPointerB(); 23 | 24 | float* getRawPointerActiveX(); 25 | 26 | float getError(); 27 | 28 | void setInitialStates( float* A, float* D, float* b, float* x1, float* x2 ); 29 | 30 | void performComputation(); 31 | 32 | private: 33 | GaussSeidelSolverMetalCppImpl* m_impl; 34 | 35 | }; 36 | 37 | #endif /*__GAUSS_SEIDEL_SOLVER_METAL_CPP_H__*/ 38 | -------------------------------------------------------------------------------- /12_gauss_seidel_solver/metal/gauss_seidel_solver_metal_cpp_impl.h: -------------------------------------------------------------------------------- 1 | #ifndef __GAUSS_SEIDEL_SOLVER_METAL_CPP_IMPL_H__ 2 | #define __GAUSS_SEIDEL_SOLVER_METAL_CPP_IMPL_H__ 3 | 4 | #include "gauss_seidel_solver_metal_cpp.h" 5 | 6 | #include 7 | 8 | class GaussSeidelSolverMetalCppImpl 9 | { 10 | 11 | public: 12 | GaussSeidelSolverMetalCppImpl( const int dim, const int iteration, const bool one_commit ); 13 | 14 | virtual ~GaussSeidelSolverMetalCppImpl(); 15 | 16 | float* getRawPointerA(); 17 | 18 | float* getRawPointerB(); 19 | 20 | float* getRawPointerActiveX(); 21 | 22 | float getError(); 23 | 24 | void setInitialStates( float* A, float* D, float* b, float* x1, float* x2 ); 25 | 26 | void performComputation(); 27 | 28 | private: 29 | GaussSeidelSolverMetalObjC* m_self; 30 | }; 31 | 32 | #endif /*__GAUSS_SEIDEL_SOLVER_METAL_CPP_IMPL_H__*/ 33 | -------------------------------------------------------------------------------- /12_gauss_seidel_solver/metal/gauss_seidel_solver_metal_objc.h: -------------------------------------------------------------------------------- 1 | #import "metal_compute_base.h" 2 | 3 | #include "gauss_seidel_solver_metal_cpp.h" 4 | 5 | @interface GaussSeidelSolverMetalObjC : MetalComputeBase 6 | 7 | - (instancetype)initWithDim:(int) dim Iteration:(int) iteration oneCommit:(bool) one_commit; 8 | 9 | - (void) setInitialStatesA:(float*) A D:(float*) D B:(float*) b X1:(float*) x1 X2:(float*) x2; 10 | 11 | - (float*) getRawPointerA; 12 | 13 | - (float*) getRawPointerB; 14 | 15 | - (float*) getRawPointerActiveX; 16 | 17 | - (float) getError; 18 | 19 | - (void) performComputation; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /13_fft/Makefile: -------------------------------------------------------------------------------- 1 | METAL_SHADER_LIB_NAME = fft 2 | MAIN_SRC = test_fft.cpp 3 | 4 | all: 5 | 6 | include ../common/common.mk 7 | -------------------------------------------------------------------------------- /13_fft/doc/plot_spec.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "DataElementType": "FLOAT", 4 | "DataElementSubtype": "VECTOR", 5 | "Width" : 13, 6 | "Height" : 8, 7 | "Title": "Overview : Float", 8 | "PlotType": "LOG-LOG", 9 | "PlotBase": "CPP_BLOCK 1 1", 10 | "UpperLimit" : 1.2, 11 | "PlotCases": [ "CPP_BLOCK 1 1", "NEON 1 1", "NEON 1 4", "METAL DEFAULT 0 0", "VDSP 1 1" ] 12 | }, 13 | { 14 | "DataElementType": "DOUBLE", 15 | "DataElementSubtype": "VECTOR", 16 | "Width" : 13, 17 | "Height" : 8, 18 | "Title": "Overview : Float", 19 | "PlotType": "LOG-LOG", 20 | "PlotBase": "CPP_BLOCK 1 1", 21 | "UpperLimit" : 1.2, 22 | "PlotCases": [ "CPP_BLOCK 1 1", "NEON 1 1", "NEON 1 4", "VDSP 1 1" ] 23 | } 24 | ] 25 | 26 | -------------------------------------------------------------------------------- /13_fft/metal/fft_metal_cpp.cpp: -------------------------------------------------------------------------------- 1 | class FFTMetalObjC; 2 | #include "fft_metal_cpp_impl.h" 3 | #include "fft_metal_cpp.h" 4 | 5 | FFTMetalCpp::FFTMetalCpp() 6 | :m_impl( new FFTMetalCppImpl() ) 7 | { 8 | ; 9 | } 10 | 11 | FFTMetalCpp::~FFTMetalCpp() 12 | { 13 | delete m_impl; 14 | } 15 | 16 | float* FFTMetalCpp::getRawPointerTimeRe() 17 | { 18 | return m_impl->getRawPointerTimeRe(); 19 | } 20 | 21 | float* FFTMetalCpp::getRawPointerTimeIm() 22 | { 23 | return m_impl->getRawPointerTimeIm(); 24 | } 25 | 26 | float* FFTMetalCpp::getRawPointerFreqRe() 27 | { 28 | return m_impl->getRawPointerFreqRe(); 29 | } 30 | 31 | float* FFTMetalCpp::getRawPointerFreqIm() 32 | { 33 | return m_impl->getRawPointerFreqIm(); 34 | } 35 | 36 | void FFTMetalCpp::setInitialStates( float* time_re, float* time_im ) 37 | { 38 | return m_impl->setInitialStates( time_re, time_im ); 39 | } 40 | 41 | void FFTMetalCpp::performComputation() 42 | { 43 | m_impl->performComputation(); 44 | } 45 | -------------------------------------------------------------------------------- /13_fft/metal/fft_metal_cpp.h: -------------------------------------------------------------------------------- 1 | #ifndef __FFT_METAL_CPP_H__ 2 | #define __FFT_METAL_CPP_H__ 3 | 4 | #include 5 | 6 | class FFTMetalCppImpl; 7 | 8 | class FFTMetalCpp 9 | { 10 | 11 | public: 12 | FFTMetalCpp(); 13 | 14 | virtual ~FFTMetalCpp(); 15 | 16 | float* getRawPointerTimeRe(); 17 | 18 | float* getRawPointerTimeIm(); 19 | 20 | float* getRawPointerFreqRe(); 21 | 22 | float* getRawPointerFreqIm(); 23 | 24 | void setInitialStates( float* time_re, float* time_im ); 25 | 26 | void performComputation(); 27 | 28 | private: 29 | FFTMetalCppImpl* m_impl; 30 | 31 | }; 32 | 33 | #endif /*__FFT_METAL_CPP_H__*/ 34 | -------------------------------------------------------------------------------- /13_fft/metal/fft_metal_cpp_impl.h: -------------------------------------------------------------------------------- 1 | #ifndef __FFT_METAL_CPP_IMPL_H__ 2 | #define __FFT_METAL_CPP_IMPL_H__ 3 | 4 | #include "fft_metal_cpp.h" 5 | 6 | #include 7 | 8 | class FFTMetalCppImpl 9 | { 10 | 11 | public: 12 | FFTMetalCppImpl(); 13 | 14 | virtual ~FFTMetalCppImpl(); 15 | 16 | float* getRawPointerTimeRe(); 17 | 18 | float* getRawPointerTimeIm(); 19 | 20 | float* getRawPointerFreqRe(); 21 | 22 | float* getRawPointerFreqIm(); 23 | 24 | void setInitialStates( float* time_re, float* time_im ); 25 | 26 | void performComputation(); 27 | 28 | private: 29 | FFTMetalObjC* m_self; 30 | }; 31 | 32 | #endif /*__FFT_METAL_CPP_IMPL_H__*/ 33 | -------------------------------------------------------------------------------- /13_fft/metal/fft_metal_objc.h: -------------------------------------------------------------------------------- 1 | #import "metal_compute_base.h" 2 | 3 | #include "fft_metal_cpp.h" 4 | 5 | @interface FFTMetalObjC : MetalComputeBase 6 | 7 | - (instancetype)init; 8 | 9 | - (void) setInitialStatesTimeRe:(float*) time_re TimeIm:(float*) time_im; 10 | 11 | - (float*) getRawPointerTimeRe; 12 | 13 | - (float*) getRawPointerTimeIm; 14 | 15 | - (float*) getRawPointerFreqRe; 16 | 17 | - (float*) getRawPointerFreqIm; 18 | 19 | - (void) performComputation; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /14_lcp/Makefile: -------------------------------------------------------------------------------- 1 | METAL_SHADER_LIB_NAME = lcp 2 | MAIN_SRC = test_lcp.cpp 3 | 4 | LOCAL_INC = -Ibullet3 5 | LOCAL_OBJ_DIR = bullet3 6 | 7 | include ../common/common.mk 8 | -------------------------------------------------------------------------------- /14_lcp/doc/DOUBLE_RANDOM_DIAGONALLY_DOMINANT_SKEWSYMMETRIC_Running_time_for_randomly_generated_diagnoally_dominant_skew-symmetric_matrices.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/14_lcp/doc/DOUBLE_RANDOM_DIAGONALLY_DOMINANT_SKEWSYMMETRIC_Running_time_for_randomly_generated_diagnoally_dominant_skew-symmetric_matrices.png -------------------------------------------------------------------------------- /14_lcp/doc/DOUBLE_RANDOM_DIAGONALLY_DOMINANT_SYMMETRIC_Running_time_for_randomly_generated_diagnoally_dominant_symmetric_matrices.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/14_lcp/doc/DOUBLE_RANDOM_DIAGONALLY_DOMINANT_SYMMETRIC_Running_time_for_randomly_generated_diagnoally_dominant_symmetric_matrices.png -------------------------------------------------------------------------------- /14_lcp/doc/DOUBLE_REAL_NONSYMMETRIC_MU02_Running_time_for_real_contact_dry_frictional_cone_constraints_with_mu=0.2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/14_lcp/doc/DOUBLE_REAL_NONSYMMETRIC_MU02_Running_time_for_real_contact_dry_frictional_cone_constraints_with_mu=0.2.png -------------------------------------------------------------------------------- /14_lcp/doc/DOUBLE_REAL_NONSYMMETRIC_MU08_Running_time_for_real_contact_dry_frictional_cone_constraints_with_mu=0.8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/14_lcp/doc/DOUBLE_REAL_NONSYMMETRIC_MU08_Running_time_for_real_contact_dry_frictional_cone_constraints_with_mu=0.8.png -------------------------------------------------------------------------------- /14_lcp/doc/DOUBLE_REAL_SYMMETRIC_Running_time_for_real_contact_constraints_(symmetric_matrices).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/14_lcp/doc/DOUBLE_REAL_SYMMETRIC_Running_time_for_real_contact_constraints_(symmetric_matrices).png -------------------------------------------------------------------------------- /14_lcp/doc/FLOAT_RANDOM_DIAGONALLY_DOMINANT_SKEWSYMMETRIC_Running_time_for_randomly_generated_diagnoally_dominant_skew-symmetric_matrices.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/14_lcp/doc/FLOAT_RANDOM_DIAGONALLY_DOMINANT_SKEWSYMMETRIC_Running_time_for_randomly_generated_diagnoally_dominant_skew-symmetric_matrices.png -------------------------------------------------------------------------------- /14_lcp/doc/FLOAT_RANDOM_DIAGONALLY_DOMINANT_SYMMETRIC_Running_time_for_randomly_generated_diagnoally_dominant_symmetric_matrices.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/14_lcp/doc/FLOAT_RANDOM_DIAGONALLY_DOMINANT_SYMMETRIC_Running_time_for_randomly_generated_diagnoally_dominant_symmetric_matrices.png -------------------------------------------------------------------------------- /14_lcp/doc/FLOAT_REAL_NONSYMMETRIC_MU02_Running_time_for_real_contact_dry_frictional_cone_constraints_with_mu=0.2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/14_lcp/doc/FLOAT_REAL_NONSYMMETRIC_MU02_Running_time_for_real_contact_dry_frictional_cone_constraints_with_mu=0.2.png -------------------------------------------------------------------------------- /14_lcp/doc/FLOAT_REAL_NONSYMMETRIC_MU08_Running_time_for_real_contact_dry_frictional_cone_constraints_with_mu=0.8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/14_lcp/doc/FLOAT_REAL_NONSYMMETRIC_MU08_Running_time_for_real_contact_dry_frictional_cone_constraints_with_mu=0.8.png -------------------------------------------------------------------------------- /14_lcp/doc/FLOAT_REAL_SYMMETRIC_Running_time_for_real_contact_constraints_(symmetric_matrices).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/14_lcp/doc/FLOAT_REAL_SYMMETRIC_Running_time_for_real_contact_constraints_(symmetric_matrices).png -------------------------------------------------------------------------------- /14_lcp/doc/pic1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/14_lcp/doc/pic1.png -------------------------------------------------------------------------------- /14_lcp/doc/pic2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/14_lcp/doc/pic2.png -------------------------------------------------------------------------------- /14_lcp/doc/pic3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/14_lcp/doc/pic3.png -------------------------------------------------------------------------------- /14_lcp/doc_ios/DOUBLE_RANDOM_DIAGONALLY_DOMINANT_SKEWSYMMETRIC_Residual_error_for_randomly_generated_diagnoally_dominant_skew-symmetric_matrices.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/14_lcp/doc_ios/DOUBLE_RANDOM_DIAGONALLY_DOMINANT_SKEWSYMMETRIC_Residual_error_for_randomly_generated_diagnoally_dominant_skew-symmetric_matrices.png -------------------------------------------------------------------------------- /14_lcp/doc_ios/DOUBLE_RANDOM_DIAGONALLY_DOMINANT_SKEWSYMMETRIC_Running_time_for_randomly_generated_diagnoally_dominant_skew-symmetric_matrices.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/14_lcp/doc_ios/DOUBLE_RANDOM_DIAGONALLY_DOMINANT_SKEWSYMMETRIC_Running_time_for_randomly_generated_diagnoally_dominant_skew-symmetric_matrices.png -------------------------------------------------------------------------------- /14_lcp/doc_ios/DOUBLE_RANDOM_DIAGONALLY_DOMINANT_SYMMETRIC_Residual_error_for_randomly_generated_diagnoally_dominant_symmetric_matrices.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/14_lcp/doc_ios/DOUBLE_RANDOM_DIAGONALLY_DOMINANT_SYMMETRIC_Residual_error_for_randomly_generated_diagnoally_dominant_symmetric_matrices.png -------------------------------------------------------------------------------- /14_lcp/doc_ios/DOUBLE_RANDOM_DIAGONALLY_DOMINANT_SYMMETRIC_Running_time_for_randomly_generated_diagnoally_dominant_symmetric_matrices.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/14_lcp/doc_ios/DOUBLE_RANDOM_DIAGONALLY_DOMINANT_SYMMETRIC_Running_time_for_randomly_generated_diagnoally_dominant_symmetric_matrices.png -------------------------------------------------------------------------------- /14_lcp/doc_ios/DOUBLE_REAL_NONSYMMETRIC_MU02_Residual_error_for_real_contact_dry_frictional_cone_constraints_with_mu=0.2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/14_lcp/doc_ios/DOUBLE_REAL_NONSYMMETRIC_MU02_Residual_error_for_real_contact_dry_frictional_cone_constraints_with_mu=0.2.png -------------------------------------------------------------------------------- /14_lcp/doc_ios/DOUBLE_REAL_NONSYMMETRIC_MU02_Running_time_for_real_contact_dry_frictional_cone_constraints_with_mu=0.2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/14_lcp/doc_ios/DOUBLE_REAL_NONSYMMETRIC_MU02_Running_time_for_real_contact_dry_frictional_cone_constraints_with_mu=0.2.png -------------------------------------------------------------------------------- /14_lcp/doc_ios/DOUBLE_REAL_NONSYMMETRIC_MU08_Residual_error_for_real_contact_dry_frictional_cone_constraints_with_mu=0.8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/14_lcp/doc_ios/DOUBLE_REAL_NONSYMMETRIC_MU08_Residual_error_for_real_contact_dry_frictional_cone_constraints_with_mu=0.8.png -------------------------------------------------------------------------------- /14_lcp/doc_ios/DOUBLE_REAL_NONSYMMETRIC_MU08_Running_time_for_real_contact_dry_frictional_cone_constraints_with_mu=0.8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/14_lcp/doc_ios/DOUBLE_REAL_NONSYMMETRIC_MU08_Running_time_for_real_contact_dry_frictional_cone_constraints_with_mu=0.8.png -------------------------------------------------------------------------------- /14_lcp/doc_ios/DOUBLE_REAL_SYMMETRIC_Residual_error_for_real_contact_constraints_(symmetric_matrices).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/14_lcp/doc_ios/DOUBLE_REAL_SYMMETRIC_Residual_error_for_real_contact_constraints_(symmetric_matrices).png -------------------------------------------------------------------------------- /14_lcp/doc_ios/DOUBLE_REAL_SYMMETRIC_Running_time_for_real_contact_constraints_(symmetric_matrices).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/14_lcp/doc_ios/DOUBLE_REAL_SYMMETRIC_Running_time_for_real_contact_constraints_(symmetric_matrices).png -------------------------------------------------------------------------------- /14_lcp/doc_ios/FLOAT_RANDOM_DIAGONALLY_DOMINANT_SKEWSYMMETRIC_Iteraitons_for_randomly_generated_diagnoally_dominant_skew-symmetric_matrices.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/14_lcp/doc_ios/FLOAT_RANDOM_DIAGONALLY_DOMINANT_SKEWSYMMETRIC_Iteraitons_for_randomly_generated_diagnoally_dominant_skew-symmetric_matrices.png -------------------------------------------------------------------------------- /14_lcp/doc_ios/FLOAT_RANDOM_DIAGONALLY_DOMINANT_SKEWSYMMETRIC_Number_of_pivots_for_randomly_generated_diagnoally_dominant_skew-symmetric_matrices.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/14_lcp/doc_ios/FLOAT_RANDOM_DIAGONALLY_DOMINANT_SKEWSYMMETRIC_Number_of_pivots_for_randomly_generated_diagnoally_dominant_skew-symmetric_matrices.png -------------------------------------------------------------------------------- /14_lcp/doc_ios/FLOAT_RANDOM_DIAGONALLY_DOMINANT_SKEWSYMMETRIC_Residual_error_for_randomly_generated_diagnoally_dominant_skew-symmetric_matrices.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/14_lcp/doc_ios/FLOAT_RANDOM_DIAGONALLY_DOMINANT_SKEWSYMMETRIC_Residual_error_for_randomly_generated_diagnoally_dominant_skew-symmetric_matrices.png -------------------------------------------------------------------------------- /14_lcp/doc_ios/FLOAT_RANDOM_DIAGONALLY_DOMINANT_SKEWSYMMETRIC_Running_time_for_randomly_generated_diagnoally_dominant_skew-symmetric_matrices.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/14_lcp/doc_ios/FLOAT_RANDOM_DIAGONALLY_DOMINANT_SKEWSYMMETRIC_Running_time_for_randomly_generated_diagnoally_dominant_skew-symmetric_matrices.png -------------------------------------------------------------------------------- /14_lcp/doc_ios/FLOAT_RANDOM_DIAGONALLY_DOMINANT_SYMMETRIC_Iteraitons_for_randomly_generated_diagnoally_dominant_symmetric_matrices.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/14_lcp/doc_ios/FLOAT_RANDOM_DIAGONALLY_DOMINANT_SYMMETRIC_Iteraitons_for_randomly_generated_diagnoally_dominant_symmetric_matrices.png -------------------------------------------------------------------------------- /14_lcp/doc_ios/FLOAT_RANDOM_DIAGONALLY_DOMINANT_SYMMETRIC_Number_of_pivots_for_randomly_generated_diagnoally_dominant_symmetric_matrices.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/14_lcp/doc_ios/FLOAT_RANDOM_DIAGONALLY_DOMINANT_SYMMETRIC_Number_of_pivots_for_randomly_generated_diagnoally_dominant_symmetric_matrices.png -------------------------------------------------------------------------------- /14_lcp/doc_ios/FLOAT_RANDOM_DIAGONALLY_DOMINANT_SYMMETRIC_Residual_error_for_randomly_generated_diagnoally_dominant_symmetric_matrices.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/14_lcp/doc_ios/FLOAT_RANDOM_DIAGONALLY_DOMINANT_SYMMETRIC_Residual_error_for_randomly_generated_diagnoally_dominant_symmetric_matrices.png -------------------------------------------------------------------------------- /14_lcp/doc_ios/FLOAT_RANDOM_DIAGONALLY_DOMINANT_SYMMETRIC_Running_time_for_randomly_generated_diagnoally_dominant_symmetric_matrices.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/14_lcp/doc_ios/FLOAT_RANDOM_DIAGONALLY_DOMINANT_SYMMETRIC_Running_time_for_randomly_generated_diagnoally_dominant_symmetric_matrices.png -------------------------------------------------------------------------------- /14_lcp/doc_ios/FLOAT_REAL_NONSYMMETRIC_MU02_Iterations_for_real_contact_dry_frictional_cone_constraints_with_mu=0.2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/14_lcp/doc_ios/FLOAT_REAL_NONSYMMETRIC_MU02_Iterations_for_real_contact_dry_frictional_cone_constraints_with_mu=0.2.png -------------------------------------------------------------------------------- /14_lcp/doc_ios/FLOAT_REAL_NONSYMMETRIC_MU02_Number_of_pivots_for_real_contact_dry_frictional_cone_constraints_with_mu=0.2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/14_lcp/doc_ios/FLOAT_REAL_NONSYMMETRIC_MU02_Number_of_pivots_for_real_contact_dry_frictional_cone_constraints_with_mu=0.2.png -------------------------------------------------------------------------------- /14_lcp/doc_ios/FLOAT_REAL_NONSYMMETRIC_MU02_Residual_error_for_real_contact_dry_frictional_cone_constraints_with_mu=0.2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/14_lcp/doc_ios/FLOAT_REAL_NONSYMMETRIC_MU02_Residual_error_for_real_contact_dry_frictional_cone_constraints_with_mu=0.2.png -------------------------------------------------------------------------------- /14_lcp/doc_ios/FLOAT_REAL_NONSYMMETRIC_MU02_Running_time_for_real_contact_dry_frictional_cone_constraints_with_mu=0.2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/14_lcp/doc_ios/FLOAT_REAL_NONSYMMETRIC_MU02_Running_time_for_real_contact_dry_frictional_cone_constraints_with_mu=0.2.png -------------------------------------------------------------------------------- /14_lcp/doc_ios/FLOAT_REAL_NONSYMMETRIC_MU08_Iterations_for_real_contact_dry_frictional_cone_constraints_with_mu=0.8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/14_lcp/doc_ios/FLOAT_REAL_NONSYMMETRIC_MU08_Iterations_for_real_contact_dry_frictional_cone_constraints_with_mu=0.8.png -------------------------------------------------------------------------------- /14_lcp/doc_ios/FLOAT_REAL_NONSYMMETRIC_MU08_Number_of_pivots_for_real_contact_dry_frictional_cone_constraints_with_mu=0.8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/14_lcp/doc_ios/FLOAT_REAL_NONSYMMETRIC_MU08_Number_of_pivots_for_real_contact_dry_frictional_cone_constraints_with_mu=0.8.png -------------------------------------------------------------------------------- /14_lcp/doc_ios/FLOAT_REAL_NONSYMMETRIC_MU08_Residual_error_for_real_contact_dry_frictional_cone_constraints_with_mu=0.8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/14_lcp/doc_ios/FLOAT_REAL_NONSYMMETRIC_MU08_Residual_error_for_real_contact_dry_frictional_cone_constraints_with_mu=0.8.png -------------------------------------------------------------------------------- /14_lcp/doc_ios/FLOAT_REAL_NONSYMMETRIC_MU08_Running_time_for_real_contact_dry_frictional_cone_constraints_with_mu=0.8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/14_lcp/doc_ios/FLOAT_REAL_NONSYMMETRIC_MU08_Running_time_for_real_contact_dry_frictional_cone_constraints_with_mu=0.8.png -------------------------------------------------------------------------------- /14_lcp/doc_ios/FLOAT_REAL_SYMMETRIC_Iterations_for_real_contact_constraints_(symmetric_matrices).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/14_lcp/doc_ios/FLOAT_REAL_SYMMETRIC_Iterations_for_real_contact_constraints_(symmetric_matrices).png -------------------------------------------------------------------------------- /14_lcp/doc_ios/FLOAT_REAL_SYMMETRIC_Number_of_pivots_for_real_contact_constraints_(symmetric_matrices).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/14_lcp/doc_ios/FLOAT_REAL_SYMMETRIC_Number_of_pivots_for_real_contact_constraints_(symmetric_matrices).png -------------------------------------------------------------------------------- /14_lcp/doc_ios/FLOAT_REAL_SYMMETRIC_Residual_error_for_real_contact_constraints_(symmetric_matrices).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/14_lcp/doc_ios/FLOAT_REAL_SYMMETRIC_Residual_error_for_real_contact_constraints_(symmetric_matrices).png -------------------------------------------------------------------------------- /14_lcp/doc_ios/FLOAT_REAL_SYMMETRIC_Running_time_for_real_contact_constraints_(symmetric_matrices).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/14_lcp/doc_ios/FLOAT_REAL_SYMMETRIC_Running_time_for_real_contact_constraints_(symmetric_matrices).png -------------------------------------------------------------------------------- /14_lcp/metal/dummy.metal: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | kernel void dummy ( 4 | const uint thread_position_in_grid [[ thread_position_in_grid ]] 5 | ) { 6 | return; 7 | } 8 | 9 | -------------------------------------------------------------------------------- /15_conjugate_gradient/Makefile: -------------------------------------------------------------------------------- 1 | METAL_SHADER_LIB_NAME = conjugate_gradient 2 | MAIN_SRC = test_conjugate_gradient_solver.cpp 3 | 4 | all: 5 | 6 | include ../common/common.mk 7 | -------------------------------------------------------------------------------- /15_conjugate_gradient/doc/DOUBLE_MATRIX_ROW_MAJOR_Running_time_for_PD_Matrix_with_Cond_Num_1.0_-_100000.0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/15_conjugate_gradient/doc/DOUBLE_MATRIX_ROW_MAJOR_Running_time_for_PD_Matrix_with_Cond_Num_1.0_-_100000.0.png -------------------------------------------------------------------------------- /15_conjugate_gradient/doc/FLOAT_MATRIX_ROW_MAJOR_Number_of_Iterations_for_PD_Matrices_with_Cond_Num_1.0_-_100000.0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/15_conjugate_gradient/doc/FLOAT_MATRIX_ROW_MAJOR_Number_of_Iterations_for_PD_Matrices_with_Cond_Num_1.0_-_100000.0.png -------------------------------------------------------------------------------- /15_conjugate_gradient/doc/FLOAT_MATRIX_ROW_MAJOR_Running_time_for_PD_Matrix_with_Cond_Num_1.0_-_100000.0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/15_conjugate_gradient/doc/FLOAT_MATRIX_ROW_MAJOR_Running_time_for_PD_Matrix_with_Cond_Num_1.0_-_100000.0.png -------------------------------------------------------------------------------- /15_conjugate_gradient/doc/plot_spec.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "DataElementType": "FLOAT", 4 | "DataElementSubtype": "MATRIX_ROW_MAJOR", 5 | "Width" : 13, 6 | "Height" : 8, 7 | "Title": "Running time for PD Matrix with Cond Num 1.0 - 100000.0", 8 | "PlotType": "LOG-LOG", 9 | "PlotBase": "CPP_BLOCK 1 1", 10 | "UpperLimit" : 1.2, 11 | "PlotCases": [ 12 | "CPP_BLOCK 1 1", 13 | "VDSP 1 1", 14 | "METAL ONE_PASS_ATOMIC_SIMD_SUM 1 1" 15 | ] 16 | }, 17 | { 18 | "DataElementType": "DOUBLE", 19 | "DataElementSubtype": "MATRIX_ROW_MAJOR", 20 | "Width" : 13, 21 | "Height" : 8, 22 | "Title": "Running time for PD Matrix with Cond Num 1.0 - 100000.0", 23 | "PlotType": "LOG-LOG", 24 | "PlotBase": "CPP_BLOCK 1 1", 25 | "UpperLimit" : 1.2, 26 | "PlotCases": [ 27 | "CPP_BLOCK 1 1", 28 | "VDSP 1 1" 29 | ] 30 | } 31 | ] 32 | -------------------------------------------------------------------------------- /15_conjugate_gradient/doc_ios/DOUBLE_MATRIX_ROW_MAJOR_Running_time_for_PD_Matrix_with_Cond_Num_1.0_-_100000.0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/15_conjugate_gradient/doc_ios/DOUBLE_MATRIX_ROW_MAJOR_Running_time_for_PD_Matrix_with_Cond_Num_1.0_-_100000.0.png -------------------------------------------------------------------------------- /15_conjugate_gradient/doc_ios/FLOAT_MATRIX_ROW_MAJOR_Number_of_Iterations_for_PD_Matrices_with_Cond_Num_1.0_-_100000.0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/15_conjugate_gradient/doc_ios/FLOAT_MATRIX_ROW_MAJOR_Number_of_Iterations_for_PD_Matrices_with_Cond_Num_1.0_-_100000.0.png -------------------------------------------------------------------------------- /15_conjugate_gradient/doc_ios/FLOAT_MATRIX_ROW_MAJOR_Running_time_for_PD_Matrix_with_Cond_Num_1.0_-_100000.0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/15_conjugate_gradient/doc_ios/FLOAT_MATRIX_ROW_MAJOR_Running_time_for_PD_Matrix_with_Cond_Num_1.0_-_100000.0.png -------------------------------------------------------------------------------- /15_conjugate_gradient/doc_ios/plot_spec.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "DataElementType": "FLOAT", 4 | "DataElementSubtype": "MATRIX_ROW_MAJOR", 5 | "Width" : 13, 6 | "Height" : 8, 7 | "Title": "Running time for PD Matrix with Cond Num 1.0 - 100000.0", 8 | "PlotType": "LOG-LOG", 9 | "PlotBase": "CPP_BLOCK 1 1", 10 | "UpperLimit" : 1.2, 11 | "PlotCases": [ 12 | "CPP_BLOCK 1 1", 13 | "VDSP 1 1", 14 | "METAL ONE_PASS_ATOMIC_SIMD_SUM 1 1" 15 | ] 16 | }, 17 | { 18 | "DataElementType": "DOUBLE", 19 | "DataElementSubtype": "MATRIX_ROW_MAJOR", 20 | "Width" : 13, 21 | "Height" : 8, 22 | "Title": "Running time for PD Matrix with Cond Num 1.0 - 100000.0", 23 | "PlotType": "LOG-LOG", 24 | "PlotBase": "CPP_BLOCK 1 1", 25 | "UpperLimit" : 1.2, 26 | "PlotCases": [ 27 | "CPP_BLOCK 1 1", 28 | "VDSP 1 1" 29 | ] 30 | } 31 | ] 32 | -------------------------------------------------------------------------------- /15_conjugate_gradient/extra_reports/plot_spec_iteration.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "DataElementType": "FLOAT", 4 | "DataElementSubtype": "MATRIX_ROW_MAJOR", 5 | "Width" : 13, 6 | "Height" : 8, 7 | "Title": "Number of Iterations for PD Matrices with Cond Num 1.0 - 100000.0", 8 | "PlotType": "LOG-LIN", 9 | "PlotBase": "CPP_BLOCK 1 1", 10 | "UpperLimit" : 1.2, 11 | "PlotCases": [ 12 | "CPP_BLOCK 1 1", 13 | "VDSP 1 1", 14 | "METAL ONE_PASS_ATOMIC_SIMD_SUM 1 1" 15 | ] 16 | } 17 | ] 18 | -------------------------------------------------------------------------------- /15_conjugate_gradient/metal/conjugate_gradient_metal_cpp.h: -------------------------------------------------------------------------------- 1 | #ifndef __CONJUGATE_GRADIENT_METAL_CPP_H__ 2 | #define __CONJUGATE_GRADIENT_METAL_CPP_H__ 3 | 4 | class ConjugateGradientMetalCppImpl; 5 | 6 | class ConjugateGradientMetalCpp 7 | { 8 | 9 | public: 10 | 11 | ConjugateGradientMetalCpp( const int dim, const int num_threads_per_group, const int max_num_iterations, const float epsilon ); 12 | 13 | virtual ~ConjugateGradientMetalCpp(); 14 | 15 | float* getRawPointerA(); 16 | 17 | float* getRawPointerB(); 18 | 19 | float* getX(); 20 | 21 | void performComputation(); 22 | 23 | int getNumIterations(); 24 | 25 | private: 26 | ConjugateGradientMetalCppImpl* m_impl; 27 | 28 | }; 29 | 30 | #endif /*__CONJUGATE_GRADIENT_METAL_CPP_H__*/ 31 | 32 | -------------------------------------------------------------------------------- /15_conjugate_gradient/metal/conjugate_gradient_metal_cpp_impl.h: -------------------------------------------------------------------------------- 1 | #ifndef __CONJUGATE_GRADIENT_METAL_CPP_IMPL_H__ 2 | #define __CONJUGATE_GRADIENT_METAL_CPP_IMPL_H__ 3 | 4 | #include 5 | 6 | class ConjugateGradientMetalCppImpl 7 | { 8 | public: 9 | 10 | ConjugateGradientMetalCppImpl( const int dim, const int num_threads_per_group, const int max_num_iterations, const float epsilon ); 11 | 12 | ~ConjugateGradientMetalCppImpl(); 13 | 14 | float* getRawPointerA(); 15 | 16 | float* getRawPointerB(); 17 | 18 | void performComputation(); 19 | 20 | float* getX(); 21 | 22 | int getNumIterations(); 23 | 24 | private: 25 | ConjugateGradientMetalObjC* m_self; 26 | }; 27 | 28 | #endif /*__CONJUGATE_GRADIENT_METAL_CPP_IMPL_H__*/ 29 | -------------------------------------------------------------------------------- /15_conjugate_gradient/metal/conjugate_gradient_metal_objc.h: -------------------------------------------------------------------------------- 1 | #import "metal_compute_base.h" 2 | 3 | @interface ConjugateGradientMetalObjC : MetalComputeBase 4 | 5 | - (instancetype) initWithNumElements: (int) dim 6 | NumThreadsPerGroup: (int) num_threads_per_group 7 | MaxNumIterations: (int) max_num_iterations 8 | Epsilon: (float) epsilon; 9 | - (float*) getRawPointerA; 10 | - (float*) getRawPointerB; 11 | - (void) performComputation; 12 | - (float*) getX; 13 | - (int) getNumIterations; 14 | @end 15 | -------------------------------------------------------------------------------- /16_nonsymmetric_band_mat/Makefile: -------------------------------------------------------------------------------- 1 | METAL_SHADER_LIB_NAME = nonsymmetric_band_mat 2 | MAIN_SRC = test_nonsymmetric_band_mat.cpp 3 | 4 | all: 5 | 6 | include ../common/common.mk 7 | -------------------------------------------------------------------------------- /16_nonsymmetric_band_mat/doc/DOUBLE_MATRIX_ROW_MAJOR_Running_time_for_Nonsymmetric_Band_Matrix_Solver.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/16_nonsymmetric_band_mat/doc/DOUBLE_MATRIX_ROW_MAJOR_Running_time_for_Nonsymmetric_Band_Matrix_Solver.png -------------------------------------------------------------------------------- /16_nonsymmetric_band_mat/doc/FLOAT_MATRIX_ROW_MAJOR_Running_time_for_Nonsymmetric_Band_Matrix_Solver.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/16_nonsymmetric_band_mat/doc/FLOAT_MATRIX_ROW_MAJOR_Running_time_for_Nonsymmetric_Band_Matrix_Solver.png -------------------------------------------------------------------------------- /16_nonsymmetric_band_mat/doc/plot_spec.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "DataElementType": "FLOAT", 4 | "DataElementSubtype": "MATRIX_ROW_MAJOR", 5 | "Width" : 13, 6 | "Height" : 8, 7 | "Title": "Running time for Nonsymmetric Band Matrix Solver", 8 | "PlotType": "LOG-LOG", 9 | "PlotBase": "LAPACK 1 1", 10 | "UpperLimit" : 1.2, 11 | "PlotCases": [ 12 | "LAPACK 1 1" 13 | ] 14 | }, 15 | { 16 | "DataElementType": "DOUBLE", 17 | "DataElementSubtype": "MATRIX_ROW_MAJOR", 18 | "Width" : 13, 19 | "Height" : 8, 20 | "Title": "Running time for Nonsymmetric Band Matrix Solver", 21 | "PlotType": "LOG-LOG", 22 | "PlotBase": "LAPACK 1 1", 23 | "UpperLimit" : 1.2, 24 | "PlotCases": [ 25 | "LAPACK 1 1" 26 | ] 27 | } 28 | ] 29 | -------------------------------------------------------------------------------- /16_nonsymmetric_band_mat/doc_ios/DOUBLE_MATRIX_ROW_MAJOR_Running_time_for_Nonsymmetric_Band_Matrix_Solver.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/16_nonsymmetric_band_mat/doc_ios/DOUBLE_MATRIX_ROW_MAJOR_Running_time_for_Nonsymmetric_Band_Matrix_Solver.png -------------------------------------------------------------------------------- /16_nonsymmetric_band_mat/doc_ios/FLOAT_MATRIX_ROW_MAJOR_Running_time_for_Nonsymmetric_Band_Matrix_Solver.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShoYamanishi/AppleNumericalComputing/053f06c1f5a831095c4bcc29aaf11366fce5231e/16_nonsymmetric_band_mat/doc_ios/FLOAT_MATRIX_ROW_MAJOR_Running_time_for_Nonsymmetric_Band_Matrix_Solver.png -------------------------------------------------------------------------------- /16_nonsymmetric_band_mat/doc_ios/plot_spec.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "DataElementType": "FLOAT", 4 | "DataElementSubtype": "MATRIX_ROW_MAJOR", 5 | "Width" : 13, 6 | "Height" : 8, 7 | "Title": "Running time for Nonsymmetric Band Matrix Solver", 8 | "PlotType": "LOG-LOG", 9 | "PlotBase": "LAPACK 1 1", 10 | "UpperLimit" : 1.2, 11 | "PlotCases": [ 12 | "LAPACK 1 1" 13 | ] 14 | }, 15 | { 16 | "DataElementType": "DOUBLE", 17 | "DataElementSubtype": "MATRIX_ROW_MAJOR", 18 | "Width" : 13, 19 | "Height" : 8, 20 | "Title": "Running time for Nonsymmetric Band Matrix Solver", 21 | "PlotType": "LOG-LOG", 22 | "PlotBase": "LAPACK 1 1", 23 | "UpperLimit" : 1.2, 24 | "PlotCases": [ 25 | "LAPACK 1 1" 26 | ] 27 | } 28 | ] 29 | -------------------------------------------------------------------------------- /16_nonsymmetric_band_mat/metal/conjugate_gradient.metal: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | using namespace metal; 4 | 5 | // Dummy. Place holder for Makefile. -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | 2 | .PHONY: clean 3 | 4 | MAKEFILES_FOUND = $(shell find . -maxdepth 2 -type f -name Makefile) 5 | SUBDIRS = $(filter-out ./,$(dir $(MAKEFILES_FOUND))) 6 | 7 | clean: 8 | find . -name "*~" -exec rm {} \; 9 | for dir in $(SUBDIRS); do \ 10 | make -C $$dir clean; \ 11 | done 12 | 13 | all: 14 | @date 15 | find . -name "*~" -exec rm {} \; 16 | for dir in $(SUBDIRS); do \ 17 | echo "=========================";\ 18 | echo " Making $${dir}";\ 19 | echo "=========================";\ 20 | make -C $$dir all; \ 21 | done 22 | @date 23 | -------------------------------------------------------------------------------- /common/metal/metal_compute_base.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | @interface MetalComputeBase : NSObject 5 | - (instancetype) init; 6 | - (bool) loadLibraryWithName:(NSString*)name; 7 | - (id) getPipelineStateForFunction:(NSString*)name; 8 | - (id) getSharedMTLBufferForBytes:(int)bytes for:(NSString*)name; 9 | - (id) getPrivateMTLBufferForBytes:(int)bytes for:(NSString*)name; 10 | - (id) getManagedMTLBufferForBytes:(int)bytes for:(NSString*)name; 11 | 12 | @property(readonly) id device; 13 | @property(readonly) id commandQueue; 14 | @property(readonly) id library; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /iOSTester_01/iOSTester_01.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /iOSTester_01/iOSTester_01.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /iOSTester_01/iOSTester_01/Assets.xcassets/AccentColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "idiom" : "universal" 5 | } 6 | ], 7 | "info" : { 8 | "author" : "xcode", 9 | "version" : 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /iOSTester_01/iOSTester_01/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /iOSTester_01/iOSTester_01/ContentView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ContentView.swift 3 | // iOSTester_01 4 | // 5 | // Created by Shoichiro Yamanishi on 18.04.22. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct ContentView: View { 11 | 12 | @State private var running = false 13 | 14 | var body: some View { 15 | VStack(alignment: .leading) { 16 | Button("Run") { 17 | if !running { 18 | running = true 19 | let runner = TestMemcpyObjc() 20 | runner!.run() 21 | print("finished!") 22 | } 23 | }.font(.system(size: 60)) 24 | } 25 | } 26 | } 27 | 28 | struct ContentView_Previews: PreviewProvider { 29 | static var previews: some View { 30 | ContentView() 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /iOSTester_01/iOSTester_01/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /iOSTester_01/iOSTester_01/iOSTester_01-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | // 2 | // Use this file to import your target's public headers that you would like to expose to Swift. 3 | // 4 | 5 | #import "test_memcpy_objc.h" 6 | -------------------------------------------------------------------------------- /iOSTester_01/iOSTester_01/iOSTester_01App.swift: -------------------------------------------------------------------------------- 1 | // 2 | // iOSTester_01App.swift 3 | // iOSTester_01 4 | // 5 | // Created by Shoichiro Yamanishi on 18.04.22. 6 | // 7 | 8 | import SwiftUI 9 | 10 | @main 11 | struct iOSTester_01App: App { 12 | var body: some Scene { 13 | WindowGroup { 14 | ContentView() 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /iOSTester_01/iOSTester_01/test_memcpy_objc.h: -------------------------------------------------------------------------------- 1 | // 2 | // test_memcpy_bridge.h 3 | // iOSTester_01 4 | // 5 | // Created by Shoichiro Yamanishi on 18.04.22. 6 | // 7 | 8 | #ifndef test_memcpy_objc_h 9 | #define test_memcpy_objc_h 10 | 11 | #import 12 | #import 13 | 14 | @interface TestMemcpyObjc: NSObject 15 | -(instancetype) init; 16 | -(void) run; 17 | @end 18 | 19 | #endif /* test_memcpy_objc_h */ 20 | -------------------------------------------------------------------------------- /iOSTester_01/iOSTester_01/test_memcpy_objc.mm: -------------------------------------------------------------------------------- 1 | // 2 | // test_memcpy_bridge.m 3 | // iOSTester_01 4 | // 5 | // Created by Shoichiro Yamanishi on 18.04.22. 6 | // 7 | 8 | #import 9 | #import "test_memcpy_objc.h" 10 | 11 | int run_test(); 12 | 13 | @implementation TestMemcpyObjc: NSObject 14 | -(instancetype) init 15 | { 16 | self = [super init]; 17 | return self; 18 | } 19 | 20 | -(void) run{ 21 | run_test(); 22 | } 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /iOSTester_02/iOSTester_02.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /iOSTester_02/iOSTester_02.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /iOSTester_02/iOSTester_02/Assets.xcassets/AccentColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "idiom" : "universal" 5 | } 6 | ], 7 | "info" : { 8 | "author" : "xcode", 9 | "version" : 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /iOSTester_02/iOSTester_02/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /iOSTester_02/iOSTester_02/ContentView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ContentView.swift 3 | // iOSTester_02 4 | // 5 | // Created by Shoichiro Yamanishi on 19.04.22. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct ContentView: View { 11 | 12 | @State private var running = false 13 | 14 | var body: some View { 15 | VStack(alignment: .leading) { 16 | Button("Run") { 17 | if !running { 18 | running = true 19 | let runner = TestSaxpyObjc() 20 | runner!.run() 21 | print("finished!") 22 | } 23 | }.font(.system(size: 60)) 24 | } 25 | } 26 | } 27 | 28 | struct ContentView_Previews: PreviewProvider { 29 | static var previews: some View { 30 | ContentView() 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /iOSTester_02/iOSTester_02/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /iOSTester_02/iOSTester_02/iOSTester_02-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | // 2 | // Use this file to import your target's public headers that you would like to expose to Swift. 3 | // 4 | 5 | #import "test_saxpy_objc.h" 6 | -------------------------------------------------------------------------------- /iOSTester_02/iOSTester_02/iOSTester_02App.swift: -------------------------------------------------------------------------------- 1 | // 2 | // iOSTester_02App.swift 3 | // iOSTester_02 4 | // 5 | // Created by Shoichiro Yamanishi on 19.04.22. 6 | // 7 | 8 | import SwiftUI 9 | 10 | @main 11 | struct iOSTester_02App: App { 12 | var body: some Scene { 13 | WindowGroup { 14 | ContentView() 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /iOSTester_02/iOSTester_02/test_saxpy_objc.h: -------------------------------------------------------------------------------- 1 | // 2 | // test_saxpy_objc.h 3 | // iOSTester_02 4 | // 5 | // Created by Shoichiro Yamanishi on 19.04.22. 6 | // 7 | 8 | #ifndef test_saxpy_objc_h 9 | #define test_saxpy_objc_h 10 | 11 | #import 12 | #import 13 | 14 | @interface TestSaxpyObjc: NSObject 15 | -(instancetype) init; 16 | -(void) run; 17 | @end 18 | 19 | #endif /* test_saxpy_objc_h */ 20 | -------------------------------------------------------------------------------- /iOSTester_02/iOSTester_02/test_saxpy_objc.mm: -------------------------------------------------------------------------------- 1 | // 2 | // test_saxpy_objc.m 3 | // iOSTester_02 4 | // 5 | // Created by Shoichiro Yamanishi on 19.04.22. 6 | // 7 | 8 | #import 9 | 10 | #import "test_saxpy_objc.h" 11 | 12 | int run_test(); 13 | 14 | @implementation TestSaxpyObjc: NSObject 15 | -(instancetype) init 16 | { 17 | self = [super init]; 18 | return self; 19 | } 20 | 21 | -(void) run{ 22 | run_test(); 23 | } 24 | @end 25 | -------------------------------------------------------------------------------- /iOSTester_03/iOSTester_03.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /iOSTester_03/iOSTester_03.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /iOSTester_03/iOSTester_03/Assets.xcassets/AccentColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "idiom" : "universal" 5 | } 6 | ], 7 | "info" : { 8 | "author" : "xcode", 9 | "version" : 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /iOSTester_03/iOSTester_03/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /iOSTester_03/iOSTester_03/ContentView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ContentView.swift 3 | // iOSTester_03 4 | // 5 | // Created by Shoichiro Yamanishi on 19.04.22. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct ContentView: View { 11 | 12 | @State private var running = false 13 | 14 | var body: some View { 15 | VStack(alignment: .leading) { 16 | Button("Run") { 17 | if !running { 18 | running = true 19 | let runner = TestDotObjc() 20 | runner!.run() 21 | print("finished!") 22 | } 23 | }.font(.system(size: 60)) 24 | } 25 | } 26 | } 27 | 28 | struct ContentView_Previews: PreviewProvider { 29 | static var previews: some View { 30 | ContentView() 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /iOSTester_03/iOSTester_03/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /iOSTester_03/iOSTester_03/iOSTester_03-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | // 2 | // Use this file to import your target's public headers that you would like to expose to Swift. 3 | // 4 | 5 | #import "test_dot_objc.h" 6 | -------------------------------------------------------------------------------- /iOSTester_03/iOSTester_03/iOSTester_03App.swift: -------------------------------------------------------------------------------- 1 | // 2 | // iOSTester_03App.swift 3 | // iOSTester_03 4 | // 5 | // Created by Shoichiro Yamanishi on 19.04.22. 6 | // 7 | 8 | import SwiftUI 9 | 10 | @main 11 | struct iOSTester_03App: App { 12 | var body: some Scene { 13 | WindowGroup { 14 | ContentView() 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /iOSTester_03/iOSTester_03/test_dot_objc.h: -------------------------------------------------------------------------------- 1 | // 2 | // test_dot_objc.h 3 | // iOSTester_03 4 | // 5 | // Created by Shoichiro Yamanishi on 19.04.22. 6 | // 7 | 8 | #ifndef test_dot_objc_h 9 | #define test_dot_objc_h 10 | 11 | #import 12 | #import 13 | 14 | @interface TestDotObjc: NSObject 15 | -(instancetype) init; 16 | -(void) run; 17 | @end 18 | 19 | #endif /* test_dot_objc_h */ 20 | -------------------------------------------------------------------------------- /iOSTester_03/iOSTester_03/test_dot_objc.mm: -------------------------------------------------------------------------------- 1 | // 2 | // test_dot_objc.m 3 | // iOSTester_03 4 | // 5 | // Created by Shoichiro Yamanishi on 19.04.22. 6 | // 7 | 8 | #import 9 | 10 | #import "test_dot_objc.h" 11 | 12 | int run_test(); 13 | 14 | @implementation TestDotObjc: NSObject 15 | -(instancetype) init 16 | { 17 | self = [super init]; 18 | return self; 19 | } 20 | 21 | -(void) run{ 22 | run_test(); 23 | } 24 | @end 25 | -------------------------------------------------------------------------------- /iOSTester_04/iOSTester_04.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /iOSTester_04/iOSTester_04.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /iOSTester_04/iOSTester_04/Assets.xcassets/AccentColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "idiom" : "universal" 5 | } 6 | ], 7 | "info" : { 8 | "author" : "xcode", 9 | "version" : 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /iOSTester_04/iOSTester_04/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /iOSTester_04/iOSTester_04/ContentView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ContentView.swift 3 | // iOSTester_04 4 | // 5 | // Created by Shoichiro Yamanishi on 19.04.22. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct ContentView: View { 11 | 12 | @State private var running = false 13 | 14 | var body: some View { 15 | VStack(alignment: .leading) { 16 | Button("Run") { 17 | if !running { 18 | running = true 19 | let runner = TestPrefixSumObjc() 20 | runner!.run() 21 | print("finished!") 22 | } 23 | }.font(.system(size: 60)) 24 | } 25 | } 26 | } 27 | 28 | struct ContentView_Previews: PreviewProvider { 29 | static var previews: some View { 30 | ContentView() 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /iOSTester_04/iOSTester_04/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /iOSTester_04/iOSTester_04/iOSTester_04-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | // 2 | // Use this file to import your target's public headers that you would like to expose to Swift. 3 | // 4 | 5 | #import "test_prefix_sum_objc.h" 6 | -------------------------------------------------------------------------------- /iOSTester_04/iOSTester_04/iOSTester_04App.swift: -------------------------------------------------------------------------------- 1 | // 2 | // iOSTester_04App.swift 3 | // iOSTester_04 4 | // 5 | // Created by Shoichiro Yamanishi on 19.04.22. 6 | // 7 | 8 | import SwiftUI 9 | 10 | @main 11 | struct iOSTester_04App: App { 12 | var body: some Scene { 13 | WindowGroup { 14 | ContentView() 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /iOSTester_04/iOSTester_04/test_prefix_sum_objc.h: -------------------------------------------------------------------------------- 1 | // 2 | // test_prefix_sum_objc.h 3 | // iOSTester_04 4 | // 5 | // Created by Shoichiro Yamanishi on 19.04.22. 6 | // 7 | 8 | #ifndef test_prefix_sum_objc_h 9 | #define test_prefix_sum_objc_h 10 | 11 | #import 12 | 13 | @interface TestPrefixSumObjc: NSObject 14 | -(instancetype) init; 15 | -(void) run; 16 | @end 17 | 18 | #endif /* test_prefix_sum_objc_h */ 19 | -------------------------------------------------------------------------------- /iOSTester_04/iOSTester_04/test_prefix_sum_objc.mm: -------------------------------------------------------------------------------- 1 | // 2 | // test_prefix_sum_objc.m 3 | // iOSTester_04 4 | // 5 | // Created by Shoichiro Yamanishi on 19.04.22. 6 | // 7 | 8 | #import 9 | 10 | #import "test_prefix_sum_objc.h" 11 | 12 | int run_test(); 13 | 14 | @implementation TestPrefixSumObjc: NSObject 15 | -(instancetype) init 16 | { 17 | self = [super init]; 18 | return self; 19 | } 20 | 21 | -(void) run{ 22 | run_test(); 23 | } 24 | @end 25 | -------------------------------------------------------------------------------- /iOSTester_05/iOSTester_05.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /iOSTester_05/iOSTester_05.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /iOSTester_05/iOSTester_05/Assets.xcassets/AccentColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "idiom" : "universal" 5 | } 6 | ], 7 | "info" : { 8 | "author" : "xcode", 9 | "version" : 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /iOSTester_05/iOSTester_05/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /iOSTester_05/iOSTester_05/ContentView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ContentView.swift 3 | // iOSTester_05 4 | // 5 | // Created by Shoichiro Yamanishi on 19.04.22. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct ContentView: View { 11 | @State private var running = false 12 | 13 | var body: some View { 14 | VStack(alignment: .leading) { 15 | Button("Run") { 16 | if !running { 17 | running = true 18 | let runner = TestRadixSortObjc() 19 | runner!.run() 20 | print("finished!") 21 | } 22 | }.font(.system(size: 60)) 23 | } 24 | } 25 | 26 | } 27 | 28 | struct ContentView_Previews: PreviewProvider { 29 | static var previews: some View { 30 | ContentView() 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /iOSTester_05/iOSTester_05/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /iOSTester_05/iOSTester_05/iOSTester_05-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | // 2 | // Use this file to import your target's public headers that you would like to expose to Swift. 3 | // 4 | 5 | #import "test_radix_sort_objc.h" 6 | -------------------------------------------------------------------------------- /iOSTester_05/iOSTester_05/iOSTester_05App.swift: -------------------------------------------------------------------------------- 1 | // 2 | // iOSTester_05App.swift 3 | // iOSTester_05 4 | // 5 | // Created by Shoichiro Yamanishi on 19.04.22. 6 | // 7 | 8 | import SwiftUI 9 | 10 | @main 11 | struct iOSTester_05App: App { 12 | var body: some Scene { 13 | WindowGroup { 14 | ContentView() 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /iOSTester_05/iOSTester_05/test_radix_sort_objc.h: -------------------------------------------------------------------------------- 1 | // 2 | // test_radix_sort_objc.h 3 | // iOSTester_05 4 | // 5 | // Created by Shoichiro Yamanishi on 19.04.22. 6 | // 7 | 8 | #ifndef test_radix_sort_objc_h 9 | #define test_radix_sort_objc_h 10 | 11 | #import 12 | 13 | @interface TestRadixSortObjc: NSObject 14 | -(instancetype) init; 15 | -(void) run; 16 | @end 17 | 18 | #endif /* test_radix_sort_objc_h */ 19 | -------------------------------------------------------------------------------- /iOSTester_05/iOSTester_05/test_radix_sort_objc.mm: -------------------------------------------------------------------------------- 1 | // 2 | // test_radix_sort_objc.m 3 | // iOSTester_05 4 | // 5 | // Created by Shoichiro Yamanishi on 19.04.22. 6 | // 7 | 8 | #import 9 | 10 | #import "test_radix_sort_objc.h" 11 | 12 | int run_test(); 13 | 14 | @implementation TestRadixSortObjc: NSObject 15 | -(instancetype) init 16 | { 17 | self = [super init]; 18 | return self; 19 | } 20 | 21 | -(void) run{ 22 | run_test(); 23 | } 24 | @end 25 | -------------------------------------------------------------------------------- /iOSTester_06/iOSTester_06.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /iOSTester_06/iOSTester_06.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /iOSTester_06/iOSTester_06/Assets.xcassets/AccentColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "idiom" : "universal" 5 | } 6 | ], 7 | "info" : { 8 | "author" : "xcode", 9 | "version" : 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /iOSTester_06/iOSTester_06/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /iOSTester_06/iOSTester_06/ContentView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ContentView.swift 3 | // iOSTester_06 4 | // 5 | // Created by Shoichiro Yamanishi on 19.04.22. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct ContentView: View { 11 | 12 | @State private var running = false 13 | 14 | var body: some View { 15 | VStack(alignment: .leading) { 16 | Button("Run") { 17 | if !running { 18 | running = true 19 | let runner = TestNBodyObjc() 20 | runner!.run() 21 | print("finished!") 22 | } 23 | }.font(.system(size: 60)) 24 | } 25 | } 26 | } 27 | 28 | struct ContentView_Previews: PreviewProvider { 29 | static var previews: some View { 30 | ContentView() 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /iOSTester_06/iOSTester_06/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /iOSTester_06/iOSTester_06/iOSTester_06-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | // 2 | // Use this file to import your target's public headers that you would like to expose to Swift. 3 | // 4 | 5 | #import "test_nbody_objc.h" 6 | -------------------------------------------------------------------------------- /iOSTester_06/iOSTester_06/iOSTester_06App.swift: -------------------------------------------------------------------------------- 1 | // 2 | // iOSTester_06App.swift 3 | // iOSTester_06 4 | // 5 | // Created by Shoichiro Yamanishi on 19.04.22. 6 | // 7 | 8 | import SwiftUI 9 | 10 | @main 11 | struct iOSTester_06App: App { 12 | var body: some Scene { 13 | WindowGroup { 14 | ContentView() 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /iOSTester_06/iOSTester_06/test_nbocy_objc.mm: -------------------------------------------------------------------------------- 1 | // 2 | // test_nbocy_objc.m 3 | // iOSTester_06 4 | // 5 | // Created by Shoichiro Yamanishi on 19.04.22. 6 | // 7 | #import 8 | 9 | #import "test_nbody_objc.h" 10 | 11 | int run_test(); 12 | 13 | @implementation TestNBodyObjc: NSObject 14 | -(instancetype) init 15 | { 16 | self = [super init]; 17 | return self; 18 | } 19 | 20 | -(void) run{ 21 | run_test(); 22 | } 23 | @end 24 | -------------------------------------------------------------------------------- /iOSTester_06/iOSTester_06/test_nbody_objc.h: -------------------------------------------------------------------------------- 1 | // 2 | // test_nbody_objc.h 3 | // iOSTester_06 4 | // 5 | // Created by Shoichiro Yamanishi on 19.04.22. 6 | // 7 | 8 | #ifndef test_nbody_objc_h 9 | #define test_nbody_objc_h 10 | 11 | #import 12 | 13 | @interface TestNBodyObjc: NSObject 14 | -(instancetype) init; 15 | -(void) run; 16 | @end 17 | 18 | #endif /* test_nbody_objc_h */ 19 | -------------------------------------------------------------------------------- /iOSTester_07/iOSTester_07.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /iOSTester_07/iOSTester_07.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /iOSTester_07/iOSTester_07/Assets.xcassets/AccentColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "idiom" : "universal" 5 | } 6 | ], 7 | "info" : { 8 | "author" : "xcode", 9 | "version" : 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /iOSTester_07/iOSTester_07/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /iOSTester_07/iOSTester_07/ContentView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ContentView.swift 3 | // iOSTester_07 4 | // 5 | // Created by Shoichiro Yamanishi on 20.04.22. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct ContentView: View { 11 | @State private var running = false 12 | 13 | var body: some View { 14 | VStack(alignment: .leading) { 15 | Button("Run") { 16 | if !running { 17 | running = true 18 | let runner = Test2DFilterObjc() 19 | runner!.run() 20 | print("finished!") 21 | } 22 | }.font(.system(size: 60)) 23 | } 24 | } 25 | 26 | } 27 | 28 | struct ContentView_Previews: PreviewProvider { 29 | static var previews: some View { 30 | ContentView() 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /iOSTester_07/iOSTester_07/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /iOSTester_07/iOSTester_07/iOSTester_07-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | // 2 | // Use this file to import your target's public headers that you would like to expose to Swift. 3 | // 4 | 5 | #import "test_2d_filter_objc.h" 6 | -------------------------------------------------------------------------------- /iOSTester_07/iOSTester_07/iOSTester_07App.swift: -------------------------------------------------------------------------------- 1 | // 2 | // iOSTester_07App.swift 3 | // iOSTester_07 4 | // 5 | // Created by Shoichiro Yamanishi on 20.04.22. 6 | // 7 | 8 | import SwiftUI 9 | 10 | @main 11 | struct iOSTester_07App: App { 12 | var body: some Scene { 13 | WindowGroup { 14 | ContentView() 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /iOSTester_07/iOSTester_07/test_2d_filter_objc.h: -------------------------------------------------------------------------------- 1 | // 2 | // test_2d_filter_objc.h 3 | // iOSTester_07 4 | // 5 | // Created by Shoichiro Yamanishi on 20.04.22. 6 | // 7 | 8 | #ifndef test_2d_filter_objc_h 9 | #define test_2d_filter_objc_h 10 | 11 | #import 12 | 13 | @interface Test2DFilterObjc: NSObject 14 | -(instancetype) init; 15 | -(void) run; 16 | @end 17 | 18 | #endif /* test_2d_filter_objc_h */ 19 | -------------------------------------------------------------------------------- /iOSTester_07/iOSTester_07/test_2d_filter_objc.mm: -------------------------------------------------------------------------------- 1 | // 2 | // test_2d_filter_objc.m 3 | // iOSTester_07 4 | // 5 | // Created by Shoichiro Yamanishi on 20.04.22. 6 | // 7 | 8 | #import 9 | #import "test_2d_filter_objc.h" 10 | 11 | int run_test(); 12 | 13 | @implementation Test2DFilterObjc: NSObject 14 | -(instancetype) init 15 | { 16 | self = [super init]; 17 | return self; 18 | } 19 | 20 | -(void) run{ 21 | run_test(); 22 | } 23 | @end 24 | -------------------------------------------------------------------------------- /iOSTester_08/iOSTester_08.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /iOSTester_08/iOSTester_08.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /iOSTester_08/iOSTester_08/Assets.xcassets/AccentColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "idiom" : "universal" 5 | } 6 | ], 7 | "info" : { 8 | "author" : "xcode", 9 | "version" : 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /iOSTester_08/iOSTester_08/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /iOSTester_08/iOSTester_08/ContentView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ContentView.swift 3 | // iOSTester_08 4 | // 5 | // Created by Shoichiro Yamanishi on 20.04.22. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct ContentView: View { 11 | 12 | @State private var running = false 13 | 14 | var body: some View { 15 | VStack(alignment: .leading) { 16 | Button("Run") { 17 | if !running { 18 | running = true 19 | let runner = TestSparseMatrixVectorObjc() 20 | runner!.run() 21 | print("finished!") 22 | } 23 | }.font(.system(size: 60)) 24 | } 25 | } 26 | } 27 | 28 | struct ContentView_Previews: PreviewProvider { 29 | static var previews: some View { 30 | ContentView() 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /iOSTester_08/iOSTester_08/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /iOSTester_08/iOSTester_08/iOSTester_08-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | // 2 | // Use this file to import your target's public headers that you would like to expose to Swift. 3 | // 4 | 5 | #import "test_sparse_matrix_vector_objc.h" 6 | -------------------------------------------------------------------------------- /iOSTester_08/iOSTester_08/iOSTester_08App.swift: -------------------------------------------------------------------------------- 1 | // 2 | // iOSTester_08App.swift 3 | // iOSTester_08 4 | // 5 | // Created by Shoichiro Yamanishi on 20.04.22. 6 | // 7 | 8 | import SwiftUI 9 | 10 | @main 11 | struct iOSTester_08App: App { 12 | var body: some Scene { 13 | WindowGroup { 14 | ContentView() 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /iOSTester_08/iOSTester_08/test_sparse_matrix_vector_objc.h: -------------------------------------------------------------------------------- 1 | // 2 | // test_sparse_matrix_vector_objc.h 3 | // iOSTester_08 4 | // 5 | // Created by Shoichiro Yamanishi on 20.04.22. 6 | // 7 | 8 | #ifndef test_sparse_matrix_vector_objc_h 9 | #define test_sparse_matrix_vector_objc_h 10 | 11 | #import 12 | 13 | @interface TestSparseMatrixVectorObjc: NSObject 14 | -(instancetype) init; 15 | -(void) run; 16 | @end 17 | 18 | #endif /* test_sparse_matrix_vector_objc_h */ 19 | -------------------------------------------------------------------------------- /iOSTester_08/iOSTester_08/test_sparse_matrix_vector_objc.mm: -------------------------------------------------------------------------------- 1 | // 2 | // test_sparse_matrix_vector_objc.m 3 | // iOSTester_08 4 | // 5 | // Created by Shoichiro Yamanishi on 20.04.22. 6 | // 7 | 8 | #import 9 | #import "test_sparse_matrix_vector_objc.h" 10 | 11 | int run_test(); 12 | 13 | @implementation TestSparseMatrixVectorObjc: NSObject 14 | -(instancetype) init 15 | { 16 | self = [super init]; 17 | return self; 18 | } 19 | 20 | -(void) run{ 21 | run_test(); 22 | } 23 | @end 24 | -------------------------------------------------------------------------------- /iOSTester_09/iOSTester_09.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /iOSTester_09/iOSTester_09.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /iOSTester_09/iOSTester_09/Assets.xcassets/AccentColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "idiom" : "universal" 5 | } 6 | ], 7 | "info" : { 8 | "author" : "xcode", 9 | "version" : 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /iOSTester_09/iOSTester_09/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /iOSTester_09/iOSTester_09/ContentView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ContentView.swift 3 | // iOSTester_09 4 | // 5 | // Created by Shoichiro Yamanishi on 20.04.22. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct ContentView: View { 11 | @State private var running = false 12 | 13 | var body: some View { 14 | VStack(alignment: .leading) { 15 | Button("Run") { 16 | if !running { 17 | running = true 18 | let runner = TestDenseMatrixVectorObjc() 19 | runner!.run() 20 | print("finished!") 21 | } 22 | }.font(.system(size: 60)) 23 | } 24 | } 25 | } 26 | 27 | struct ContentView_Previews: PreviewProvider { 28 | static var previews: some View { 29 | ContentView() 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /iOSTester_09/iOSTester_09/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /iOSTester_09/iOSTester_09/dense_matrix_vector_objc.mm: -------------------------------------------------------------------------------- 1 | // 2 | // dense_matrix_vector_objc.m 3 | // iOSTester_09 4 | // 5 | // Created by Shoichiro Yamanishi on 20.04.22. 6 | // 7 | 8 | #import 9 | #import "test_dense_matrix_vector_objc.h" 10 | 11 | int run_test(); 12 | 13 | @implementation TestDenseMatrixVectorObjc: NSObject 14 | -(instancetype) init 15 | { 16 | self = [super init]; 17 | return self; 18 | } 19 | 20 | -(void) run{ 21 | run_test(); 22 | } 23 | @end 24 | -------------------------------------------------------------------------------- /iOSTester_09/iOSTester_09/iOSTester_09-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | // 2 | // Use this file to import your target's public headers that you would like to expose to Swift. 3 | // 4 | 5 | #import "test_dense_matrix_vector_objc.h" 6 | -------------------------------------------------------------------------------- /iOSTester_09/iOSTester_09/iOSTester_09App.swift: -------------------------------------------------------------------------------- 1 | // 2 | // iOSTester_09App.swift 3 | // iOSTester_09 4 | // 5 | // Created by Shoichiro Yamanishi on 20.04.22. 6 | // 7 | 8 | import SwiftUI 9 | 10 | @main 11 | struct iOSTester_09App: App { 12 | var body: some Scene { 13 | WindowGroup { 14 | ContentView() 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /iOSTester_09/iOSTester_09/test_dense_matrix_vector_objc.h: -------------------------------------------------------------------------------- 1 | // 2 | // test_dense_matrix_vector_objc.h 3 | // iOSTester_09 4 | // 5 | // Created by Shoichiro Yamanishi on 20.04.22. 6 | // 7 | 8 | #ifndef test_dense_matrix_vector_objc_h 9 | #define test_dense_matrix_vector_objc_h 10 | 11 | #import 12 | 13 | @interface TestDenseMatrixVectorObjc: NSObject 14 | -(instancetype) init; 15 | -(void) run; 16 | @end 17 | 18 | #endif /* test_dense_matrix_vector_objc_h */ 19 | -------------------------------------------------------------------------------- /iOSTester_10/iOSTester_10.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /iOSTester_10/iOSTester_10.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /iOSTester_10/iOSTester_10/Assets.xcassets/AccentColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "idiom" : "universal" 5 | } 6 | ], 7 | "info" : { 8 | "author" : "xcode", 9 | "version" : 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /iOSTester_10/iOSTester_10/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /iOSTester_10/iOSTester_10/ContentView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ContentView.swift 3 | // iOSTester_10 4 | // 5 | // Created by Shoichiro Yamanishi on 20.04.22. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct ContentView: View { 11 | @State private var running = false 12 | 13 | var body: some View { 14 | VStack(alignment: .leading) { 15 | Button("Run") { 16 | if !running { 17 | running = true 18 | let runner = TestCholeskyDecompObjc() 19 | runner!.run() 20 | print("finished!") 21 | } 22 | }.font(.system(size: 60)) 23 | } 24 | } 25 | 26 | } 27 | 28 | struct ContentView_Previews: PreviewProvider { 29 | static var previews: some View { 30 | ContentView() 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /iOSTester_10/iOSTester_10/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /iOSTester_10/iOSTester_10/iOSTester_10-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | // 2 | // Use this file to import your target's public headers that you would like to expose to Swift. 3 | // 4 | 5 | #import "test_cholesky_decomp_objc.h" 6 | -------------------------------------------------------------------------------- /iOSTester_10/iOSTester_10/iOSTester_10App.swift: -------------------------------------------------------------------------------- 1 | // 2 | // iOSTester_10App.swift 3 | // iOSTester_10 4 | // 5 | // Created by Shoichiro Yamanishi on 20.04.22. 6 | // 7 | 8 | import SwiftUI 9 | 10 | @main 11 | struct iOSTester_10App: App { 12 | var body: some Scene { 13 | WindowGroup { 14 | ContentView() 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /iOSTester_10/iOSTester_10/test_cholesky_decomp_objc.h: -------------------------------------------------------------------------------- 1 | // 2 | // test_cholesky_decomp_objc.h 3 | // iOSTester_10 4 | // 5 | // Created by Shoichiro Yamanishi on 20.04.22. 6 | // 7 | 8 | #ifndef test_cholesky_decomp_objc_h 9 | #define test_cholesky_decomp_objc_h 10 | #import 11 | 12 | @interface TestCholeskyDecompObjc: NSObject 13 | -(instancetype) init; 14 | -(void) run; 15 | @end 16 | 17 | 18 | 19 | #endif /* test_cholesky_decomp_objc_h */ 20 | -------------------------------------------------------------------------------- /iOSTester_10/iOSTester_10/test_cholesky_decomp_objc.mm: -------------------------------------------------------------------------------- 1 | // 2 | // test_cholesky_decomp_objc.m 3 | // iOSTester_10 4 | // 5 | // Created by Shoichiro Yamanishi on 20.04.22. 6 | // 7 | #import 8 | #import "test_cholesky_decomp_objc.h" 9 | 10 | int run_test(); 11 | 12 | @implementation TestCholeskyDecompObjc: NSObject 13 | -(instancetype) init 14 | { 15 | self = [super init]; 16 | return self; 17 | } 18 | 19 | -(void) run{ 20 | run_test(); 21 | } 22 | @end 23 | -------------------------------------------------------------------------------- /iOSTester_11/iOSTester_11-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | // 2 | // Use this file to import your target's public headers that you would like to expose to Swift. 3 | // 4 | 5 | #import "test_jacobi_solver_objc.h" 6 | -------------------------------------------------------------------------------- /iOSTester_11/iOSTester_11.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /iOSTester_11/iOSTester_11.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /iOSTester_11/iOSTester_11/Assets.xcassets/AccentColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "idiom" : "universal" 5 | } 6 | ], 7 | "info" : { 8 | "author" : "xcode", 9 | "version" : 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /iOSTester_11/iOSTester_11/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /iOSTester_11/iOSTester_11/ContentView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ContentView.swift 3 | // iOSTester_11 4 | // 5 | // Created by Shoichiro Yamanishi on 21.04.22. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct ContentView: View { 11 | @State private var running = false 12 | 13 | var body: some View { 14 | VStack(alignment: .leading) { 15 | Button("Run") { 16 | if !running { 17 | running = true 18 | let runner = TestJacobiSolverObjc() 19 | runner!.run() 20 | print("finished!") 21 | } 22 | }.font(.system(size: 60)) 23 | } 24 | } 25 | 26 | } 27 | 28 | struct ContentView_Previews: PreviewProvider { 29 | static var previews: some View { 30 | ContentView() 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /iOSTester_11/iOSTester_11/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /iOSTester_11/iOSTester_11/iOSTester_11App.swift: -------------------------------------------------------------------------------- 1 | // 2 | // iOSTester_11App.swift 3 | // iOSTester_11 4 | // 5 | // Created by Shoichiro Yamanishi on 21.04.22. 6 | // 7 | 8 | import SwiftUI 9 | 10 | @main 11 | struct iOSTester_11App: App { 12 | var body: some Scene { 13 | WindowGroup { 14 | ContentView() 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /iOSTester_11/test_jacobi_solver_objc.h: -------------------------------------------------------------------------------- 1 | // 2 | // test_jacobi_solver_objc.h 3 | // iOSTester_11 4 | // 5 | // Created by Shoichiro Yamanishi on 21.04.22. 6 | // 7 | 8 | #ifndef test_jacobi_solver_objc_h 9 | #define test_jacobi_solver_objc_h 10 | 11 | #import 12 | 13 | @interface TestJacobiSolverObjc: NSObject 14 | -(instancetype) init; 15 | -(void) run; 16 | @end 17 | 18 | #endif /* test_jacobi_solver_objc_h */ 19 | -------------------------------------------------------------------------------- /iOSTester_11/test_jacobi_solver_objc.mm: -------------------------------------------------------------------------------- 1 | // 2 | // test_jacobi_solver_objc.m 3 | // iOSTester_11 4 | // 5 | // Created by Shoichiro Yamanishi on 21.04.22. 6 | // 7 | #import 8 | #import "test_jacobi_solver_objc.h" 9 | 10 | int run_test(); 11 | 12 | @implementation TestJacobiSolverObjc: NSObject 13 | -(instancetype) init 14 | { 15 | self = [super init]; 16 | return self; 17 | } 18 | 19 | -(void) run{ 20 | run_test(); 21 | } 22 | @end 23 | -------------------------------------------------------------------------------- /iOSTester_12/iOSTester_12-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | // 2 | // Use this file to import your target's public headers that you would like to expose to Swift. 3 | // 4 | 5 | #import "test_gauss_seidel_solver_objc.h" 6 | -------------------------------------------------------------------------------- /iOSTester_12/iOSTester_12.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /iOSTester_12/iOSTester_12.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /iOSTester_12/iOSTester_12/Assets.xcassets/AccentColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "idiom" : "universal" 5 | } 6 | ], 7 | "info" : { 8 | "author" : "xcode", 9 | "version" : 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /iOSTester_12/iOSTester_12/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /iOSTester_12/iOSTester_12/ContentView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ContentView.swift 3 | // iOSTester_12 4 | // 5 | // Created by Shoichiro Yamanishi on 21.04.22. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct ContentView: View { 11 | @State private var running = false 12 | 13 | var body: some View { 14 | VStack(alignment: .leading) { 15 | Button("Run") { 16 | if !running { 17 | running = true 18 | let runner = TestGaussSeidelSolverObjc() 19 | runner!.run() 20 | print("finished!") 21 | } 22 | }.font(.system(size: 60)) 23 | } 24 | } 25 | 26 | 27 | } 28 | 29 | struct ContentView_Previews: PreviewProvider { 30 | static var previews: some View { 31 | ContentView() 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /iOSTester_12/iOSTester_12/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /iOSTester_12/iOSTester_12/iOSTester_12App.swift: -------------------------------------------------------------------------------- 1 | // 2 | // iOSTester_12App.swift 3 | // iOSTester_12 4 | // 5 | // Created by Shoichiro Yamanishi on 21.04.22. 6 | // 7 | 8 | import SwiftUI 9 | 10 | @main 11 | struct iOSTester_12App: App { 12 | var body: some Scene { 13 | WindowGroup { 14 | ContentView() 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /iOSTester_12/iOSTester_12/test_gauss_seidel_solver_objc.h: -------------------------------------------------------------------------------- 1 | // 2 | // test_gauss_seidel_solver_objc.h 3 | // iOSTester_12 4 | // 5 | // Created by Shoichiro Yamanishi on 21.04.22. 6 | // 7 | 8 | #ifndef test_gauss_seidel_solver_objc_h 9 | #define test_gauss_seidel_solver_objc_h 10 | 11 | #import 12 | 13 | @interface TestGaussSeidelSolverObjc: NSObject 14 | -(instancetype) init; 15 | -(void) run; 16 | @end 17 | 18 | #endif /* test_gauss_seidel_solver_objc_h */ 19 | -------------------------------------------------------------------------------- /iOSTester_12/iOSTester_12/test_gauss_seldel_solver_objc.mm: -------------------------------------------------------------------------------- 1 | // 2 | // test_gauss_seldel_solver_objc.m 3 | // iOSTester_12 4 | // 5 | // Created by Shoichiro Yamanishi on 21.04.22. 6 | // 7 | 8 | #import 9 | #import "test_gauss_seidel_solver_objc.h" 10 | 11 | int run_test(); 12 | 13 | @implementation TestGaussSeidelSolverObjc: NSObject 14 | -(instancetype) init 15 | { 16 | self = [super init]; 17 | return self; 18 | } 19 | 20 | -(void) run{ 21 | run_test(); 22 | } 23 | @end 24 | -------------------------------------------------------------------------------- /iOSTester_13/iOSTester_13.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /iOSTester_13/iOSTester_13.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /iOSTester_13/iOSTester_13/Assets.xcassets/AccentColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "idiom" : "universal" 5 | } 6 | ], 7 | "info" : { 8 | "author" : "xcode", 9 | "version" : 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /iOSTester_13/iOSTester_13/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /iOSTester_13/iOSTester_13/ContentView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ContentView.swift 3 | // iOSTester_13 4 | // 5 | // Created by Shoichiro Yamanishi on 21.04.22. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct ContentView: View { 11 | @State private var running = false 12 | 13 | var body: some View { 14 | VStack(alignment: .leading) { 15 | Button("Run") { 16 | if !running { 17 | running = true 18 | let runner = TestFFTObjc() 19 | runner!.run() 20 | print("finished!") 21 | } 22 | }.font(.system(size: 60)) 23 | } 24 | } 25 | } 26 | 27 | struct ContentView_Previews: PreviewProvider { 28 | static var previews: some View { 29 | ContentView() 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /iOSTester_13/iOSTester_13/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /iOSTester_13/iOSTester_13/iOSTester_13-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | // 2 | // Use this file to import your target's public headers that you would like to expose to Swift. 3 | // 4 | 5 | #import "test_fft_objc.h" 6 | -------------------------------------------------------------------------------- /iOSTester_13/iOSTester_13/iOSTester_13App.swift: -------------------------------------------------------------------------------- 1 | // 2 | // iOSTester_13App.swift 3 | // iOSTester_13 4 | // 5 | // Created by Shoichiro Yamanishi on 21.04.22. 6 | // 7 | 8 | import SwiftUI 9 | 10 | @main 11 | struct iOSTester_13App: App { 12 | var body: some Scene { 13 | WindowGroup { 14 | ContentView() 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /iOSTester_13/iOSTester_13/test_fft_objc.h: -------------------------------------------------------------------------------- 1 | // 2 | // test_fft_objc.h 3 | // iOSTester_13 4 | // 5 | // Created by Shoichiro Yamanishi on 21.04.22. 6 | // 7 | 8 | #ifndef test_fft_objc_h 9 | #define test_fft_objc_h 10 | 11 | #import 12 | 13 | @interface TestFFTObjc: NSObject 14 | -(instancetype) init; 15 | -(void) run; 16 | @end 17 | 18 | #endif /* test_fft_objc_h */ 19 | -------------------------------------------------------------------------------- /iOSTester_13/iOSTester_13/test_fft_objc.mm: -------------------------------------------------------------------------------- 1 | // 2 | // test_fft_objc.m 3 | // iOSTester_13 4 | // 5 | // Created by Shoichiro Yamanishi on 21.04.22. 6 | // 7 | 8 | #import 9 | #import "test_fft_objc.h" 10 | 11 | int run_test(); 12 | 13 | @implementation TestFFTObjc: NSObject 14 | -(instancetype) init 15 | { 16 | self = [super init]; 17 | return self; 18 | } 19 | 20 | -(void) run{ 21 | run_test(); 22 | } 23 | @end 24 | -------------------------------------------------------------------------------- /iOSTester_14/iOSTester_14.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /iOSTester_14/iOSTester_14.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /iOSTester_14/iOSTester_14/Assets.xcassets/AccentColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "idiom" : "universal" 5 | } 6 | ], 7 | "info" : { 8 | "author" : "xcode", 9 | "version" : 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /iOSTester_14/iOSTester_14/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /iOSTester_14/iOSTester_14/ContentView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ContentView.swift 3 | // iOSTester_14 4 | // 5 | // Created by Shoichiro Yamanishi on 15.06.22. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct ContentView: View { 11 | @State private var running = false 12 | 13 | var body: some View { 14 | VStack(alignment: .leading) { 15 | Button("Run") { 16 | if !running { 17 | running = true 18 | let runner = TestLCPObjc() 19 | runner!.run() 20 | print("finished!") 21 | } 22 | }.font(.system(size: 60)) 23 | } 24 | } 25 | } 26 | 27 | struct ContentView_Previews: PreviewProvider { 28 | static var previews: some View { 29 | ContentView() 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /iOSTester_14/iOSTester_14/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /iOSTester_14/iOSTester_14/iOSTester_14-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | // 2 | // Use this file to import your target's public headers that you would like to expose to Swift. 3 | // 4 | 5 | #import "test_lcp_objc.h" 6 | -------------------------------------------------------------------------------- /iOSTester_14/iOSTester_14/iOSTester_14App.swift: -------------------------------------------------------------------------------- 1 | // 2 | // iOSTester_14App.swift 3 | // iOSTester_14 4 | // 5 | // Created by Shoichiro Yamanishi on 15.06.22. 6 | // 7 | 8 | import SwiftUI 9 | 10 | @main 11 | struct iOSTester_14App: App { 12 | var body: some Scene { 13 | WindowGroup { 14 | ContentView() 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /iOSTester_14/iOSTester_14/test_lcp_objc.h: -------------------------------------------------------------------------------- 1 | // 2 | // test_lcp_objc.h 3 | // iOSTester_14 4 | // 5 | // Created by Shoichiro Yamanishi on 15.06.22. 6 | // 7 | 8 | #ifndef test_lcp_objc_h 9 | #define test_lcp_objc_h 10 | 11 | #import 12 | 13 | @interface TestLCPObjc: NSObject 14 | -(instancetype) init; 15 | -(void) run; 16 | @end 17 | 18 | #endif /* test_lcp_objc_h */ 19 | -------------------------------------------------------------------------------- /iOSTester_14/iOSTester_14/test_lcp_objc.mm: -------------------------------------------------------------------------------- 1 | // 2 | // test_lcp_objc.m 3 | // iOSTester_14 4 | // 5 | // Created by Shoichiro Yamanishi on 15.06.22. 6 | // 7 | 8 | #import 9 | #import "test_lcp_objc.h" 10 | 11 | int run_test( const char * ); 12 | 13 | @implementation TestLCPObjc: NSObject 14 | -(instancetype) init 15 | { 16 | self = [super init]; 17 | return self; 18 | } 19 | 20 | -(void) run{ 21 | 22 | NSString * filePath = [[NSBundle mainBundle] pathForResource:@"sample_data_32_mu0.2" 23 | ofType:@"txt"]; 24 | const char* file_path_cstr = [ filePath cStringUsingEncoding:NSUTF8StringEncoding ]; 25 | 26 | run_test( file_path_cstr ); 27 | } 28 | @end 29 | -------------------------------------------------------------------------------- /iOSTester_15/iOSTester_15.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /iOSTester_15/iOSTester_15.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /iOSTester_15/iOSTester_15/Assets.xcassets/AccentColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "idiom" : "universal" 5 | } 6 | ], 7 | "info" : { 8 | "author" : "xcode", 9 | "version" : 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /iOSTester_15/iOSTester_15/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /iOSTester_15/iOSTester_15/ContentView.swift: -------------------------------------------------------------------------------- 1 | 2 | import SwiftUI 3 | 4 | struct ContentView: View { 5 | @State private var running = false 6 | 7 | var body: some View { 8 | VStack(alignment: .leading) { 9 | Button("Run") { 10 | if !running { 11 | running = true 12 | let runner = TestConjugateGradientSolverObjc() 13 | runner!.run() 14 | print("finished!") 15 | } 16 | }.font(.system(size: 60)) 17 | } 18 | } 19 | } 20 | 21 | struct ContentView_Previews: PreviewProvider { 22 | static var previews: some View { 23 | ContentView() 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /iOSTester_15/iOSTester_15/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /iOSTester_15/iOSTester_15/iOSTester_15-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | // 2 | // Use this file to import your target's public headers that you would like to expose to Swift. 3 | // 4 | 5 | #import "test_conjugate_gradient_solver_objc.h" 6 | -------------------------------------------------------------------------------- /iOSTester_15/iOSTester_15/iOSTester_15App.swift: -------------------------------------------------------------------------------- 1 | // 2 | // iOSTester_15App.swift 3 | // iOSTester_15 4 | // 5 | // Created by Shoichiro Yamanishi on 05.07.22. 6 | // 7 | 8 | import SwiftUI 9 | 10 | @main 11 | struct iOSTester_15App: App { 12 | var body: some Scene { 13 | WindowGroup { 14 | ContentView() 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /iOSTester_15/iOSTester_15/test_conjugate_gradient_solver_objc.h: -------------------------------------------------------------------------------- 1 | // 2 | // test_conjugate_gradient_solver_objc.h 3 | // iOSTester_15 4 | // 5 | // Created by Shoichiro Yamanishi on 05.07.22. 6 | // 7 | 8 | #ifndef test_conjugate_gradient_solver_objc_h 9 | #define test_conjugate_gradient_solver_objc_h 10 | 11 | #import 12 | 13 | @interface TestConjugateGradientSolverObjc: NSObject 14 | -(instancetype) init; 15 | -(void) run; 16 | @end 17 | 18 | #endif /* test_conjugate_gradient_solver_objc_h */ 19 | -------------------------------------------------------------------------------- /iOSTester_15/iOSTester_15/test_conjugate_gradient_solver_objc.mm: -------------------------------------------------------------------------------- 1 | 2 | #import 3 | #import "test_conjugate_gradient_solver_objc.h" 4 | 5 | int run_test(); 6 | 7 | @implementation TestConjugateGradientSolverObjc: NSObject 8 | -(instancetype) init 9 | { 10 | self = [super init]; 11 | return self; 12 | } 13 | 14 | -(void) run{ 15 | run_test(); 16 | } 17 | @end 18 | -------------------------------------------------------------------------------- /iOSTester_16/iOSTester_16.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /iOSTester_16/iOSTester_16.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /iOSTester_16/iOSTester_16/Assets.xcassets/AccentColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "idiom" : "universal" 5 | } 6 | ], 7 | "info" : { 8 | "author" : "xcode", 9 | "version" : 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /iOSTester_16/iOSTester_16/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /iOSTester_16/iOSTester_16/ContentView.swift: -------------------------------------------------------------------------------- 1 | 2 | import SwiftUI 3 | 4 | struct ContentView: View { 5 | @State private var running = false 6 | 7 | var body: some View { 8 | VStack(alignment: .leading) { 9 | Button("Run") { 10 | if !running { 11 | running = true 12 | let runner = TestNonsymmetricBandMatObjc() 13 | runner!.run() 14 | print("finished!") 15 | } 16 | }.font(.system(size: 60)) 17 | } 18 | } 19 | } 20 | 21 | struct ContentView_Previews: PreviewProvider { 22 | static var previews: some View { 23 | ContentView() 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /iOSTester_16/iOSTester_16/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /iOSTester_16/iOSTester_16/iOSTester_16-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | // 2 | // Use this file to import your target's public headers that you would like to expose to Swift. 3 | // 4 | 5 | #import "test_nonsymmetric_band_mat_objc.h" 6 | -------------------------------------------------------------------------------- /iOSTester_16/iOSTester_16/iOSTester_16App.swift: -------------------------------------------------------------------------------- 1 | // 2 | // iOSTester_16App.swift 3 | // iOSTester_16 4 | // 5 | // Created by Shoichiro Yamanishi on 11.08.22. 6 | // 7 | 8 | import SwiftUI 9 | 10 | @main 11 | struct iOSTester_16App: App { 12 | var body: some Scene { 13 | WindowGroup { 14 | ContentView() 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /iOSTester_16/iOSTester_16/test_nonsymmetric_band_mat_objc.h: -------------------------------------------------------------------------------- 1 | // 2 | // test_nonsymmetric_band_mat.h 3 | // iOSTester_16 4 | // 5 | // Created by Shoichiro Yamanishi on 11.08.22. 6 | // 7 | 8 | #ifndef test_nonsymmetric_band_mat_objc_h 9 | #define test_nonsymmetric_band_mat_objc_h 10 | 11 | #import 12 | 13 | @interface TestNonsymmetricBandMatObjc: NSObject 14 | -(instancetype) init; 15 | -(void) run; 16 | @end 17 | 18 | #endif /* test_nonsymmetric_band_mat_objc_h */ 19 | -------------------------------------------------------------------------------- /iOSTester_16/iOSTester_16/test_nonsymmetric_band_mat_objc.mm: -------------------------------------------------------------------------------- 1 | #import 2 | #import "test_nonsymmetric_band_mat_objc.h" 3 | 4 | int run_test(); 5 | 6 | @implementation TestNonsymmetricBandMatObjc: NSObject 7 | -(instancetype) init 8 | { 9 | self = [super init]; 10 | return self; 11 | } 12 | 13 | -(void) run{ 14 | run_test(); 15 | } 16 | @end 17 | --------------------------------------------------------------------------------