We found that the case where we have a ReadIOp and the next is a BatchRead IOp that contains a batch of IncompleteReadBack Operations, the initializiation of Operation data fails because it is trying to copy an entire static array.
Simply, add the OperationData constructor that copies element by element:
template <typename Operation>
struct OperationData<Operation, std::enable_if_t<one_of_v<typename Operation::InstanceType, ParamsTypes>>> {
FK_HOST_DEVICE_CNST OperationData() {};
FK_HOST_DEVICE_CNST OperationData(const typename Operation::ParamsType& params_)
requires(hasParamsNoArray<Operation>)
: params(params_) {}
FK_HOST_DEVICE_CNST OperationData(const typename Operation::ParamsType& params_)
requires(hasParamsArray<Operation>)
: params{} {
for (size_t i = 0; i < std::extent_v<typename Operation::ParamsType>; ++i) {
params[i] = params_[i];
}
}
typename Operation::ParamsType params{};
};
We can use the occasion to migrate OperationData to C++20 style metaprogramming, and remove the Enabler template parameter.
Also, add some fussion tests that test the combination of different cases Single -> Batch, Batch -> Batch, Batch -> Single
We found that the case where we have a ReadIOp and the next is a BatchRead IOp that contains a batch of IncompleteReadBack Operations, the initializiation of Operation data fails because it is trying to copy an entire static array.
Simply, add the OperationData constructor that copies element by element:
We can use the occasion to migrate OperationData to C++20 style metaprogramming, and remove the Enabler template parameter.
Also, add some fussion tests that test the combination of different cases Single -> Batch, Batch -> Batch, Batch -> Single