Skip to content

Commit

Permalink
Update headers; Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
cscjlan committed Aug 27, 2024
1 parent 2d65956 commit cff94f9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
3 changes: 1 addition & 2 deletions src/tools.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,9 @@
*/
#include <algorithm>
#include <array>
#include <iostream>
#include <limits>
#include <stdexcept>
#include <stdint.h>
#include <vector>

namespace FsGridTools {
// Size type for global array indices
Expand Down
7 changes: 7 additions & 0 deletions tests/unit_tests/tools_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -223,3 +223,10 @@ TEST(FsGridToolsTests, size_64_256_1024_nprocs_64) {
ASSERT_EQ(y, 1);
ASSERT_EQ(z, 64);
}

TEST(FsGridToolsTests, size_65_17_100_nprocs_11) {
const auto [x, y, z] = computeDecomposition(SystemSize{65, 17, 100}, 11);
ASSERT_EQ(x, 1);
ASSERT_EQ(y, 1);
ASSERT_EQ(z, 11);
}

0 comments on commit cff94f9

Please sign in to comment.