diff options
author | Jerry Ge <jerry.ge@arm.com> | 2023-05-18 21:16:22 +0000 |
---|---|---|
committer | Eric Kunze <eric.kunze@arm.com> | 2023-05-19 00:25:14 +0000 |
commit | c93cb4a1ab192f920022f0cd092b9323fd1812e4 (patch) | |
tree | 82ec66348911c60e4b2fbbb3882d614b0534714e /include | |
parent | f08956b10af531e382e1adf726f2196157f4caab (diff) | |
download | serialization_lib-c93cb4a1ab192f920022f0cd092b9323fd1812e4.tar.gz |
Support int16, uint16, int8, uint8 types numpy reader/writer for serialization_lib
Signed-off-by: Jerry Ge <jerry.ge@arm.com>
Change-Id: I287fcda4e895ecfc35083d6cb02140a251c0deb5
Diffstat (limited to 'include')
-rw-r--r-- | include/numpy_utils.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/include/numpy_utils.h b/include/numpy_utils.h index 8c2ed71..29d7e11 100644 --- a/include/numpy_utils.h +++ b/include/numpy_utils.h @@ -45,6 +45,14 @@ public: static NPError readFromNpyFile(const char* filename, const uint32_t elems, half_float::half* databuf); + static NPError readFromNpyFile(const char* filename, const uint32_t elems, uint8_t* databuf); + + static NPError readFromNpyFile(const char* filename, const uint32_t elems, int8_t* databuf); + + static NPError readFromNpyFile(const char* filename, const uint32_t elems, uint16_t* databuf); + + static NPError readFromNpyFile(const char* filename, const uint32_t elems, int16_t* databuf); + static NPError readFromNpyFile(const char* filename, const uint32_t elems, int32_t* databuf); static NPError readFromNpyFile(const char* filename, const uint32_t elems, int64_t* databuf); @@ -58,6 +66,22 @@ public: static NPError writeToNpyFile(const char* filename, const std::vector<int32_t>& shape, const half_float::half* databuf); + static NPError writeToNpyFile(const char* filename, const std::vector<int32_t>& shape, const uint8_t* databuf); + + static NPError writeToNpyFile(const char* filename, const uint32_t elems, const uint8_t* databuf); + + static NPError writeToNpyFile(const char* filename, const std::vector<int32_t>& shape, const int8_t* databuf); + + static NPError writeToNpyFile(const char* filename, const uint32_t elems, const int8_t* databuf); + + static NPError writeToNpyFile(const char* filename, const std::vector<int32_t>& shape, const uint16_t* databuf); + + static NPError writeToNpyFile(const char* filename, const uint32_t elems, const uint16_t* databuf); + + static NPError writeToNpyFile(const char* filename, const std::vector<int32_t>& shape, const int16_t* databuf); + + static NPError writeToNpyFile(const char* filename, const uint32_t elems, const int16_t* databuf); + static NPError writeToNpyFile(const char* filename, const std::vector<int32_t>& shape, const int32_t* databuf); static NPError writeToNpyFile(const char* filename, const uint32_t elems, const int32_t* databuf); |