You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the << operator to output to oRSF class, an int array will be bitwise copied into the float buffer turning a 1 into 1.401e-45 in the output file.
To Reproduce
Steps to reproduce the behavior:
create oRSF object e.g. "oRSF outmask("mask.rsf");"
have int type array filled with int values like 1s and 0s e.g. "std::vector<int> mMask(myNk);"
send int type array to oRSF object using operator << e.g. "outmask << (kernel->mMask);"
See error in output file where 1s (and probably all other values are incorrect), e.g. sfdisfil < mask.rsf
Expected behavior
output should be 0s and 1s for mask
Additional context
Most likely cause is just an template that takes any class as input and uses a bitwise memcpy for output in the oRSF class, most likely needs an overload operator that uses proper type conversion rather than bitwise copy.
The text was updated successfully, but these errors were encountered:
🐛 Bug report
Description of the bug
When using the << operator to output to oRSF class, an int array will be bitwise copied into the float buffer turning a 1 into 1.401e-45 in the output file.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
output should be 0s and 1s for mask
Additional context
Most likely cause is just an template that takes any class as input and uses a bitwise memcpy for output in the oRSF class, most likely needs an overload operator that uses proper type conversion rather than bitwise copy.
The text was updated successfully, but these errors were encountered: