Draft: adding cpp version of codes
What is the new feature
Creating the C++ version of existing code
The people involved in porting the existing codes to C++ are @b382190, @b382899, @m301159, @k202204, @k202194, @k202174 and @k202170
Mandatory steps before review
-
Gitlab CI passes (Hint: use make format
for linting) -
New feature is covered by additional unit tests -
Mark the merge request as ready by removing Draft:
Mandatory steps before merge
-
Reviewed by a maintainer -
Incorporate review suggestions -
Remember to edit the commit message and select the proper changelog category (feature/bugfix/other) -
Prior to merging, please remove any boilerplate from the MR description, retaining only the Please describe your feature in a couple of words and describe important implementation details of the feature section to maintain
You are not supposed to merge this request by yourself, the maintainers of libiconmath take care of this action!
Edited by Pradipta Samanta
Merge request reports
Activity
assigned to @k202170
- src/support/mo_math_utilities.cpp 0 → 100644
12 #include <vector> 13 #include <iostream> 14 #include <chrono> // For timing 15 16 extern "C" { 17 18 void tdma_solver_vec(double *a, double *b, double *c, double *d, 19 int slev, int elev, int startidx, int endidx, 20 int nrows, int ncols, double *varout, int opt_acc_queue = -1) { 21 22 // Start timing 23 auto start_time = std::chrono::high_resolution_clock::now(); 24 25 int acc_queue = (opt_acc_queue == -1) ? 1 : opt_acc_queue; // Use 1 as the default if opt_acc_queue is not provided 26 27 double* cp = new double[nrows * ncols]; I initially did that, but then it made the code significantly slower. This is one of the steps that I had to take to optimize the code !22 (631dd43c)
changed this line in version 4 of the diff
added 26 commits
-
8af58aac...9d97ae9a - 8 commits from branch
main
- 9d97ae9a...e219c7cc - 8 earlier commits
- 685e5322 - added the test for the cpp binding of tdma_solver_vec
- 6c31135c - changed the way local arrays are defined, it improves the performance
- 95bdcf9b - replaced the lambda function for calculating combined index with a macro function
- 13400524 - change the place of start the timer
- baceb843 - added nrows and ncols as arguments to the cpp routine of tdma_solver_vec
- 39f65fa4 - added an additional test for tdma_solver_vec
- d2cedc73 - updated the extension of test_math_utilities
- e0104036 - fixed a style formatting issue
- 2ff80ff4 - fixed further style formatting issues
- baa58ea9 - added licences to the new cpp files
Toggle commit list-
8af58aac...9d97ae9a - 8 commits from branch
added 16 commits
- baa58ea9...05c6250c - 6 earlier commits
- f7c5ca08 - added the test for the cpp binding of tdma_solver_vec
- 6ba9f980 - changed the way local arrays are defined, it improves the performance
- 102083bb - replaced the lambda function for calculating combined index with a macro function
- 614089d7 - change the place of start the timer
- 36d02549 - added nrows and ncols as arguments to the cpp routine of tdma_solver_vec
- 72af58c3 - added an additional test for tdma_solver_vec
- 5db48183 - updated the extension of test_math_utilities
- 93ec9233 - fixed a style formatting issue
- 2f3a88fa - fixed further style formatting issues
- b0e235df - added licences to the new cpp files
Toggle commit listadded 2 commits
added 2 commits
added 1 commit
- 03f46b10 - modified CMakeLists.txt of horizontal to enable compilation of C++ code that uses Kokkos
added 1 commit
- cfa0986a - configure compilation for kokkos + nvidia (!31 (merged))
added 35 commits
-
f0d63c2e - 1 commit from branch
main
- f0d63c2e...d026fe44 - 24 earlier commits
- fbae7837 - updated the gitignore file
- f0101089 - made the cpp function a templated one
- e46960c7 - added unit-tests for c++ codes using googletest
- 1b8c2abb - added c++ code for mo_lib_interpolation_vector
- e2411d5d - added license to the new files
- dab58c81 - fixed a bug in cmake style
- 29625285 - added test for interpolation_vector
- 17c9c507 - added licence to the new test file
- b9b268ef - modified CMakeLists.txt of horizontal to enable compilation of C++ code that uses Kokkos
- 01cbeda7 - configure compilation for kokkos + nvidia (!31 (merged))
Toggle commit list-
f0d63c2e - 1 commit from branch
added 1 commit
- 96438e83 - added openacc_fortran_options only for the compilation of Fortran codes
added 1 commit
- 206b801b - added openacc_fortran_options only for the compilation of Fortran codes
added 1 commit
- c61fe00d - added openacc_fortran_options only for the compilation of Fortran codes
added 1 commit
- e4efb896 - Added a new argument to the functions of `mo_lib_loopindices.cpp` to fix a bug...
Please register or sign in to reply