1 #ifndef WEIGHTSFILEIO_HPP_ 2 #define WEIGHTSFILEIO_HPP_ 4 #include "components/Weights.hpp" 5 #include "io/FileStream.hpp" 6 #include "structures/MPIBlock.hpp" 7 #include "utils/BufferUtilsPvp.hpp" 23 double readWeights(
int frameNumber);
25 void writeWeights(
double timestamp,
bool compress);
46 void writeSharedWeights(
double timestamp,
bool compress);
48 void writeNonsharedWeights(
double timestamp,
bool compress);
75 void calcPatchBox(
int &startPatchX,
int &endPatchX,
int &startPatchY,
int &endPatchY);
86 int calcNeededBorder(
int nPre,
int nPost,
int patchSize);
88 void loadWeightsFromBuffer(
89 std::vector<unsigned char>
const &dataFromFile,
96 unsigned char const *dataFromFile,
102 void storeSharedPatches(
103 std::vector<unsigned char> &dataFromFile,
109 void storeNonsharedPatches(
110 std::vector<unsigned char> &dataFromFile,
117 unsigned char *dataForFile,
118 float const *sourceWeights,
130 void writePatch(
unsigned char const *patchBuffer,
bool compressed);
135 MPIBlock const *mMPIBlock =
nullptr;
138 int const mRootProcess = 0;
139 int const tagbase = 500;
144 #endif // WEIGHTSFILEIO_HPP_
long calcArborSizeFile(bool compressed)
long calcArborSizeLocal(bool compressed)
void writePatch(unsigned char const *patchBuffer, bool compressed)
static void moveToFrame(BufferUtils::WeightHeader &header, FileStream &fileStream, int frameNumber)