Changeset 4953 in CLRX


Ignore:
Timestamp:
Sep 11, 2019, 3:33:13 PM (2 months ago)
Author:
matszpk
Message:

CLRadeonExtender: ROCmBin: Add MsgPackWriters? classes to ROCmBinaries. Add ROCmMsgPackWrite (still empty) testsuite.

Location:
CLRadeonExtender/trunk
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • CLRadeonExtender/trunk/CLRX/amdbin/ROCmBinaries.h

    r4950 r4953  
    612612};
    613613
     614class MsgPackMapWriter;
     615
     616class MsgPackArrayWriter
     617{
     618private:
     619    std::vector<cxbyte>& output;
     620    size_t elemsNum;
     621    size_t count;
     622public:
     623    MsgPackArrayWriter(size_t elemsNum, std::vector<cxbyte>& output);
     624   
     625    void putBool(bool b);
     626    void putString(const char* str);
     627    void putUInt(uint64_t v);
     628    MsgPackArrayWriter putArray(size_t aelemsNum);
     629    MsgPackMapWriter putMap(size_t melemsNum);
     630};
     631
     632class MsgPackMapWriter
     633{
     634private:
     635    std::vector<cxbyte>& output;
     636    size_t elemsNum;
     637    size_t count;
     638    bool inKey;
     639public:
     640    MsgPackMapWriter(size_t elemsNum, std::vector<cxbyte>& output);
     641    void putKeyString(const char* str);
     642    void putValueBool(bool b);
     643    void putValueString(const char* str);
     644    void putValueUInt(uint64_t v);
     645    MsgPackArrayWriter putValueArray(size_t aelemsNum);
     646    MsgPackMapWriter putValueMap(size_t melemsNum);
     647    std::vector<cxbyte>& putValueElement();
     648};
     649
    614650};
    615651
  • CLRadeonExtender/trunk/amdbin/ROCmMetadataMP.cpp

    r4952 r4953  
    10651065}
    10661066
    1067 class CLRX_INTERNAL MsgPackMapWriter;
    1068 
    1069 class CLRX_INTERNAL MsgPackArrayWriter
    1070 {
    1071 private:
    1072     std::vector<cxbyte>& output;
    1073     size_t elemsNum;
    1074     size_t count;
    1075 public:
    1076     MsgPackArrayWriter(size_t elemsNum, std::vector<cxbyte>& output);
    1077    
    1078     void putBool(bool b);
    1079     void putString(const char* str);
    1080     void putUInt(uint64_t v);
    1081     MsgPackArrayWriter putArray(size_t aelemsNum);
    1082     MsgPackMapWriter putMap(size_t melemsNum);
    1083 };
    1084 
    1085 class CLRX_INTERNAL MsgPackMapWriter
    1086 {
    1087 private:
    1088     std::vector<cxbyte>& output;
    1089     size_t elemsNum;
    1090     size_t count;
    1091     bool inKey;
    1092 public:
    1093     MsgPackMapWriter(size_t elemsNum, std::vector<cxbyte>& output);
    1094     void putKeyString(const char* str);
    1095     void putValueBool(bool b);
    1096     void putValueString(const char* str);
    1097     void putValueUInt(uint64_t v);
    1098     MsgPackArrayWriter putValueArray(size_t aelemsNum);
    1099     MsgPackMapWriter putValueMap(size_t melemsNum);
    1100     std::vector<cxbyte>& putValueElement();
    1101 };
    1102 
    11031067MsgPackArrayWriter::MsgPackArrayWriter(size_t _elemsNum,
    11041068            std::vector<cxbyte>& _output) : output(_output), elemsNum(_elemsNum), count(0)
  • CLRadeonExtender/trunk/tests/amdbin/CMakeLists.txt

    r4897 r4953  
    4747TEST_LINK_LIBRARIES(ROCmMsgPack CLRXAmdBin CLRXUtils)
    4848ADD_TEST(ROCmMsgPack ROCmMsgPack)
     49
     50ADD_EXECUTABLE(ROCmMsgPackWrite ROCmMsgPackWrite.cpp)
     51TEST_LINK_LIBRARIES(ROCmMsgPackWrite CLRXAmdBin CLRXUtils)
     52ADD_TEST(ROCmMsgPackWrite ROCmMsgPackWrite)
Note: See TracChangeset for help on using the changeset viewer.