Skip to content
Snippets Groups Projects

Draft: adding cpp version of codes

Open Pradipta Samanta requested to merge feature-add-cpp-codes into main

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

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
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];
  • Pradipta Samanta added 26 commits

    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

    Compare with previous version

  • Pradipta Samanta added 16 commits

    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

    Compare with previous version

  • Pradipta Samanta added 2 commits

    added 2 commits

    • 02a910a5 - enabled compilation using Kokkos
    • df6ed897 - converted the c++ code in mo_math_utilities to Kokkos

    Compare with previous version

  • Pradipta Samanta added 2 commits

    added 2 commits

    • 19ff2d18 - build kokkos internally along with the package
    • e87f0cff - changed cmake format

    Compare with previous version

  • Pradipta Samanta added 2 commits

    added 2 commits

    • ae0c993e - fixed an error in cmake styling
    • 74b59136 - updated the gitignore file

    Compare with previous version

  • Pradipta Samanta added 3 commits

    added 3 commits

    • 93cc2a1f - made the cpp function a templated one
    • 3140df71 - added unit-tests for c++ codes using googletest
    • e67bb718 - added c++ code for mo_lib_interpolation_vector

    Compare with previous version

  • added 1 commit

    • 2aca0b68 - added license to the new files

    Compare with previous version

  • added 1 commit

    Compare with previous version

  • added 1 commit

    • 9065027d - added test for interpolation_vector

    Compare with previous version

  • added 1 commit

    • e867abe2 - added licence to the new test file

    Compare with previous version

  • added 1 commit

    • 03f46b10 - modified CMakeLists.txt of horizontal to enable compilation of C++ code that uses Kokkos

    Compare with previous version

  • added 1 commit

    Compare with previous version

  • Pradipta Samanta added 35 commits

    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))

    Compare with previous version

  • added 1 commit

    • 96438e83 - added openacc_fortran_options only for the compilation of Fortran codes

    Compare with previous version

  • added 1 commit

    Compare with previous version

  • added 1 commit

    • 206b801b - added openacc_fortran_options only for the compilation of Fortran codes

    Compare with previous version

  • added 1 commit

    • c61fe00d - added openacc_fortran_options only for the compilation of Fortran codes

    Compare with previous version

  • added 1 commit

    • e4efb896 - Added a new argument to the functions of `mo_lib_loopindices.cpp` to fix a bug...

    Compare with previous version

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading