Interest expressed from Exascale Computing Project on 4D pack/unpack kernels. Need to create something substantially similar to https://github.com/cwpearson/tempi/blob/master/src/internal/packer_3d.cu. Furthermore, changes to make this function aware of the new packer:
|
std::unique_ptr<Packer> plan_pack(const StridedBlock &sb) { |
|
|
|
if (sb != StridedBlock()) { |
|
if (1 == sb.ndims()) { |
|
LOG_SPEW("select Packer1D for " << sb.str()); |
|
std::unique_ptr<Packer> packer = |
|
std::make_unique<Packer1D>(sb.start_, sb.counts[0]); |
|
return packer; |
|
} else if (2 == sb.ndims()) { |
|
LOG_SPEW("select Packer2D for " << sb.str()); |
|
std::unique_ptr<Packer> packer = std::make_unique<Packer2D>( |
|
sb.start_, sb.counts[0], sb.counts[1], sb.strides[1], sb.extent_); |
|
return packer; |
|
} else if (3 == sb.ndims()) { |
|
LOG_SPEW("select Packer3D for " << sb.str()); |
|
std::unique_ptr<Packer> packer = std::make_unique<Packer3D>( |
|
sb.start_, sb.counts[0], sb.counts[1], sb.strides[1], sb.counts[2], |
|
sb.strides[2], sb.extent_); |
|
return packer; |
|
} else { |
|
LOG_SPEW("no packer for " << sb.str()); |
|
return nullptr; |
|
} |
|
} else { |
|
LOG_WARN("couldn't plan_pack strategy for unknown type"); |
|
return nullptr; |
|
} |
|
} |
Interest expressed from Exascale Computing Project on 4D pack/unpack kernels. Need to create something substantially similar to https://github.com/cwpearson/tempi/blob/master/src/internal/packer_3d.cu. Furthermore, changes to make this function aware of the new packer:
tempi/src/internal/types.cpp
Lines 609 to 636 in fe16ae7