Skip to content

Commit

Permalink
1) enable test_spec_layout_rev only for GridTools; 2) host does not n…
Browse files Browse the repository at this point in the history
…eed update upon creation
  • Loading branch information
sbrdar committed Mar 10, 2024
1 parent 4dc6ab5 commit 400554e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/atlas/array/native/NativeDataStore.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ class DataStore : public ArrayDataStore {
alloc_aligned(data_store_, size_);
initialise(data_store_, size_);
device_allocated_ = false;
setHostNeedsUpdate(false);
setDeviceNeedsUpdate(true);
}

Expand Down
2 changes: 2 additions & 0 deletions src/tests/array/test_array.cc
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ CASE("test_spec_layout") {
delete ds;
}

#if ATLAS_HAVE_GRIDTOOLS_STORAGE
CASE("test_spec_layout_rev") {
Array* ds = Array::create<double>(make_shape(4, 5, 6), make_layout(2, 1, 0));
EXPECT(ds->spec().rank() == 3);
Expand All @@ -201,6 +202,7 @@ CASE("test_spec_layout_rev") {

EXPECT_THROWS_AS(Array::create<double>(make_shape(4, 5, 6, 2), make_layout(0, 1, 3, 2)), eckit::Exception);
}
#endif

CASE("test_resize_throw") {
Array* ds = Array::create<double>(32, 5, 33);
Expand Down

0 comments on commit 400554e

Please sign in to comment.