Skip to content

Commit

Permalink
correction on the mdarrays example
Browse files Browse the repository at this point in the history
  • Loading branch information
fernandezdlg committed Aug 7, 2024
1 parent a6bbf78 commit 3248471
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
Binary file removed include/mdarrays/main
Binary file not shown.
5 changes: 5 additions & 0 deletions include/mdarrays/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ int main() {
std::cout << "arr[1][2][1][0]: " << arr[1][2][1][0] << std::endl;
std::cout << "arr[4][3][2][1]: " << arr[4][3][2][1] << std::endl;

// TODO: Maybe add a size() method to the mdarray type such that the following works:
// auto size = arr.size(0);
// auto size = arr.size(1);
// auto size = arr.size(2);
// auto size = arr.size(3);
std::cout << "Size 0 of arr: " << arr.size() << std::endl;
std::cout << "Size 1 of arr: " << arr[0].size() << std::endl;
std::cout << "Size 2 of arr: " << arr[0][0].size() << std::endl;
Expand Down

0 comments on commit 3248471

Please sign in to comment.