/usr/include/TH/THFilePrivate.h is in libtorch-th-dev 0~20170926-g89ede3b-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | #include "THGeneral.h"
#include "THHalf.h"
struct THFile__
{
struct THFileVTable *vtable;
int isQuiet;
int isReadable;
int isWritable;
int isBinary;
int isAutoSpacing;
int hasError;
};
/* virtual table definition */
struct THFileVTable
{
int (*isOpened)(THFile *self);
size_t (*readByte)(THFile *self, unsigned char *data, size_t n);
size_t (*readChar)(THFile *self, char *data, size_t n);
size_t (*readShort)(THFile *self, short *data, size_t n);
size_t (*readInt)(THFile *self, int *data, size_t n);
size_t (*readLong)(THFile *self, long *data, size_t n);
size_t (*readFloat)(THFile *self, float *data, size_t n);
size_t (*readDouble)(THFile *self, double *data, size_t n);
size_t (*readHalf)(THFile *self, THHalf *data, size_t n);
size_t (*readString)(THFile *self, const char *format, char **str_);
size_t (*writeByte)(THFile *self, unsigned char *data, size_t n);
size_t (*writeChar)(THFile *self, char *data, size_t n);
size_t (*writeShort)(THFile *self, short *data, size_t n);
size_t (*writeInt)(THFile *self, int *data, size_t n);
size_t (*writeLong)(THFile *self, long *data, size_t n);
size_t (*writeFloat)(THFile *self, float *data, size_t n);
size_t (*writeDouble)(THFile *self, double *data, size_t n);
size_t (*writeHalf)(THFile *self, THHalf *data, size_t n);
size_t (*writeString)(THFile *self, const char *str, size_t size);
void (*synchronize)(THFile *self);
void (*seek)(THFile *self, size_t position);
void (*seekEnd)(THFile *self);
size_t (*position)(THFile *self);
void (*close)(THFile *self);
void (*free)(THFile *self);
};
|