support SetMemorySelection on read in BP3
Created by: germasch
Currently, SetMemorySelection
is entirely ignored on Read/Get. This PR adds support into BP3,
so formats based on BP3 gain the ability to use it. This PR, however, does not try to handle the case of mixed endianness, that is, when m_ReverseDimensions
is set. ETA: If one tries to use SetMemorySelection
with mixed endianness, the code will catch that case and throw an exception.
Other than added tests, there is only one change to core code, ie., to BP3Deserializer.tcc
. It should be easy to verify that this change does not break existing code, because in the case where the memory selection is empty (the only currently supported case), the code still calls ClipContiguousMemory
exactly as before. Behavior is only different in the case where a memory selection has been set, in which case it will use helper::NdCopy
to handle the copy correctly, as hopefully proven by the bunch of tests that I added.