A special case: The 2D register might have multiplexed data on the backend side (backend specific implementation of the TwoDRegisterAccessor).
#include <ChimeraTK/Device.h>
#include <ChimeraTK/Utilities.h>
#include <iostream>
int counter = 0;
for(auto& dataWord : dataRegion) {
dataWord = counter++;
}
dataRegion.write();
twoDAccessor.read();
std::cout << "Channel " << i << ":";
std::vector<double>& channel = twoDAccessor[i];
for(double sample : channel) {
std::cout << " " << sample;
}
std::cout << std::endl;
}
return 0;
}