X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=code%2Fstage1%2Fsrc%2FUtil%2Futils.h;h=3cb5cd14aa232216fc6e8c8e4b5be895750c0585;hb=73d68777d709e054cf74e806e23b0bdefda9462a;hp=2ed68aa361545f4eb1f38338a454a027f8d0b88f;hpb=f9f51b6ab4c7280dd521da675353252d7b078984;p=epclust.git diff --git a/code/stage1/src/Util/utils.h b/code/stage1/src/Util/utils.h index 2ed68aa..3cb5cd1 100644 --- a/code/stage1/src/Util/utils.h +++ b/code/stage1/src/Util/utils.h @@ -13,13 +13,17 @@ void free_result(Result_t* result); char readInt(FILE* stream, int64_t* integer); -char readReal(FILE* stream, Real* real); +char readReal(FILE* stream, float* real); // convert n-bytes binary integers to uint32_t -uint32_t bInt_to_uint(Byte* pInteger, size_t bytesCount); +uint32_t bInt_to_uint(Byte* pInteger); // serialize integers with a portable bytes order -void write_int(uint32_t integer, size_t bytesCount, Byte* buffer); +void write_int(uint32_t integer, Byte* buffer); + +float bReal_to_float(Byte* pFloat); + +void write_real(float x, Byte* buffer); // Expected size of a Work message in bytes: uint32_t get_packedWork_length(uint32_t nbSeriesInChunk);