Skip to content

Commit

Permalink
Merge pull request #96 from lanl/Get_name
Browse files Browse the repository at this point in the history
ENH: Add get_name functionality to kokkos types
  • Loading branch information
jacob-moore22 authored Sep 10, 2024
2 parents 93923f4 + dc2c037 commit c535c02
Show file tree
Hide file tree
Showing 3 changed files with 246 additions and 5 deletions.
8 changes: 6 additions & 2 deletions examples/mtr-kokkos-simple.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,12 @@ int main(int argc, char *argv[]) {

// Matrix examples following the Fortran index convention,
// indicies go from 1 to N, first index varies the fastest
FMatrixDevice <real_t> matrix1D(10); // declare and allocate a 1D matrix of size 10
FMatrixDevice <real_t> matrix2D(10,10); // declare and allocate a 2D matrix with sizes of 10 x 10
FMatrixDevice <real_t> matrix1D(10, "1D_FMatrix"); // declare and allocate a 1D matrix of size 10
FMatrixDevice <real_t> matrix2D(10,10, "2D_FMatrix"); // declare and allocate a 2D matrix with sizes of 10 x 10

std::cout<< "Name of 1D Matrix = "<<matrix1D.get_name()<<std::endl;
std::cout<< "Name of 2D Matrix = "<<matrix2D.get_name()<<std::endl;


FMatrixDevice <real_t> matrix3D; // declare variable and allocate sizes and dimensions later
matrix3D = FMatrixDevice <real_t> (10,10,10); // allocate dimensions and sizes
Expand Down
Loading

0 comments on commit c535c02

Please sign in to comment.