Skip to content

Commit

Permalink
Merge branch 'remove-uses-of-arrow-op' into 'master'
Browse files Browse the repository at this point in the history
remove uses of arrow op

See merge request npneq/inq!1113
  • Loading branch information
correaa committed Jul 18, 2024
2 parents d69dccf + c0fc649 commit 033f5e7
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
10 changes: 5 additions & 5 deletions src/parallel/array_iterator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class array_iterator {
public:

array_iterator(PartitionType part, parallel::cartesian_communicator<1> comm, ArrayType const & arr):
bit_(1, part, comm, arr.partitioned(1)){
bit_(1, part, comm, arr.partitioned(1)){
}

template <typename EndType>
Expand Down Expand Up @@ -84,9 +84,9 @@ TEST_CASE(INQ_TEST_FILE, INQ_TEST_TAG) {
for(parallel::array_iterator pai(part, comm, arr); pai != pai.end(); ++pai){

CHECK(ipart == pai.ipart());
CHECK(pai->size() == part.local_size(ipart));
CHECK((*pai).size() == part.local_size(ipart));

for(int ii = 0; ii < pai->size(); ii++){
for(int ii = 0; ii < (*pai).size(); ii++){
CHECK((*pai)[ii] == ipart + 1.0);
}

Expand All @@ -104,9 +104,9 @@ TEST_CASE(INQ_TEST_FILE, INQ_TEST_TAG) {
for(parallel::array_iterator pai(part, comm, arr); pai != pai.end(); ++pai){

CHECK(ipart == pai.ipart());
CHECK(pai->size() == part.local_size(ipart));
CHECK((*pai).size() == part.local_size(ipart));

for(int ii = 0; ii < pai->size(); ii++){
for(int ii = 0; ii < (*pai).size(); ii++){
CHECK((*pai)[ii][0] == ipart + 1.0);
CHECK((*pai)[ii][1] == ipart*2.0);
CHECK((*pai)[ii][2] == ipart - 5.0);
Expand Down
4 changes: 2 additions & 2 deletions src/parallel/array_iterator_2d.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,8 @@ TEST_CASE(INQ_TEST_FILE, INQ_TEST_TAG) {
int itcount = 0;
for(parallel::array_iterator_2d pai(partx, party, comm, arr); pai != pai.end(); ++pai){

CHECK(pai->size() == partx.local_size(pai.xpart()));
CHECK(pai->rotated().size() == party.local_size(pai.ypart()));
CHECK((*pai).size() == partx.local_size(pai.xpart()));
CHECK((*pai).rotated().size() == party.local_size(pai.ypart()));

for(long ix = 0; ix < partx.local_size(pai.xpart()); ix++){
for(long iy = 0; iy < party.local_size(pai.ypart()); iy++){
Expand Down
14 changes: 7 additions & 7 deletions src/parallel/block_array_iterator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class block_array_iterator {
comm_(std::move(comm)),
arr_({block_size, part.max_local_size()}),
istep_(0),
bsize_(block_size)
bsize_(block_size)
{
assert(arr.size() == block_size);
assert(arr.rotated().size() == part_.local_size());
Expand Down Expand Up @@ -125,10 +125,10 @@ TEST_CASE(INQ_TEST_FILE, INQ_TEST_TAG) {
for(parallel::block_array_iterator pai(bsize, part, comm, arr); pai != pai.end(); ++pai){

CHECK(ipart == pai.ipart());
CHECK(pai->size() == bsize);
CHECK(pai->rotated().size() == part.local_size(ipart));
CHECK((*pai).size() == bsize);
CHECK((*pai).rotated().size() == part.local_size(ipart));

for(int ii = 0; ii < pai->size(); ii++){
for(int ii = 0; ii < (*pai).size(); ii++){
for(int jj = 0; jj < bsize; jj++) CHECK((*pai)[jj][ii] == ipart + 1.0);
}

Expand All @@ -146,10 +146,10 @@ TEST_CASE(INQ_TEST_FILE, INQ_TEST_TAG) {
for(parallel::block_array_iterator pai(bsize, part, comm, arr); pai != pai.end(); ++pai){

CHECK(ipart == pai.ipart());
CHECK(pai->size() == bsize);
CHECK(pai->rotated().size() == part.local_size(ipart));
CHECK( (*pai).size() == bsize);
CHECK( (*pai).rotated().size() == part.local_size(ipart));

for(int ii = 0; ii < pai->size(); ii++){
for(int ii = 0; ii < (*pai).size(); ii++){
for(int jj = 0; jj < bsize; jj++) {
CHECK((*pai)[jj][ii][0] == ipart + 1.0);
CHECK((*pai)[jj][ii][1] == ipart*2.0);
Expand Down

0 comments on commit 033f5e7

Please sign in to comment.