-
Notifications
You must be signed in to change notification settings - Fork 9.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add experimental support for big endian hosts (read part only) #703
Conversation
@@ -69,6 +72,19 @@ class TFile { | |||
char* FGets(char* buffer, int buffer_size); | |||
// Replicates fread, returning the number of items read. | |||
int FRead(void* buffer, int size, int count); | |||
int FRead(char* buffer, unsigned count); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to implement this using templates?
} | ||
#else | ||
|
||
bool fread(uint8_t* data, FILE* f, size_t n = 1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
templates?
Yes, I think it would be possible to use templates in both cases. I did not do that because I wanted to see which cases occur in practice. Some of those cases are problematic, because they don't use portable data types: the current code reads and writes |
Signed-off-by: Stefan Weil <sw@weilnetz.de>
This commit adds hacks to enforce more debug messages. Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: root <root@bib.uni-mannheim.de>
Signed-off-by: Stefan Weil <sw@weilnetz.de>
This PR is not ready for getting pulled. I put it here only for further discussion. See also issue #518.
Writing training data on big endian machines is currently not addressed.