Changeset 9ee2ce3 for thirdparty/SZ/sz/src/ByteToolkit.c
- Timestamp:
- 09/28/18 16:32:55 (6 years ago)
- Branches:
- master, pympi
- Children:
- e6aa0eb
- Parents:
- abca157
- git-author:
- Hal Finkel <hfinkel@…> (09/28/18 16:32:55)
- git-committer:
- Hal Finkel <hfinkel@…> (09/28/18 16:32:55)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
thirdparty/SZ/sz/src/ByteToolkit.c
r2c47b73 r9ee2ce3 431 431 432 432 //the byte to input is in the big-endian format 433 float bytesToFloat(unsigned char* bytes)433 inline float bytesToFloat(unsigned char* bytes) 434 434 { 435 435 lfloat buf; … … 440 440 } 441 441 442 void floatToBytes(unsigned char *b, float num)442 inline void floatToBytes(unsigned char *b, float num) 443 443 { 444 444 lfloat buf; … … 450 450 451 451 //the byte to input is in the big-endian format 452 double bytesToDouble(unsigned char* bytes)452 inline double bytesToDouble(unsigned char* bytes) 453 453 { 454 454 ldouble buf; … … 459 459 } 460 460 461 void doubleToBytes(unsigned char *b, double num)461 inline void doubleToBytes(unsigned char *b, double num) 462 462 { 463 463 ldouble buf; … … 508 508 } 509 509 510 in t getMaskRightCode(int m) {510 inline int getMaskRightCode(int m) { 511 511 switch (m) { 512 512 case 1: … … 531 531 } 532 532 533 in t getLeftMovingCode(int kMod8)533 inline int getLeftMovingCode(int kMod8) 534 534 { 535 535 return getMaskRightCode(8 - kMod8); 536 536 } 537 537 538 in t getRightMovingSteps(int kMod8, int resiBitLength) {538 inline int getRightMovingSteps(int kMod8, int resiBitLength) { 539 539 return 8 - kMod8 - resiBitLength; 540 540 } 541 541 542 in t getRightMovingCode(int kMod8, int resiBitLength)542 inline int getRightMovingCode(int kMod8, int resiBitLength) 543 543 { 544 544 int rightMovingSteps = 8 - kMod8 - resiBitLength; … … 815 815 816 816 817 size_t bytesToSize(unsigned char* bytes)817 inline size_t bytesToSize(unsigned char* bytes) 818 818 { 819 819 size_t result = 0; … … 825 825 } 826 826 827 void sizeToBytes(unsigned char* outBytes, size_t size)827 inline void sizeToBytes(unsigned char* outBytes, size_t size) 828 828 { 829 829 if(exe_params->SZ_SIZE_TYPE==4)
Note: See TracChangeset
for help on using the changeset viewer.