Ignore:
Timestamp:
Feb 1, 2018, 8:41:57 PM (23 months ago)
Author:
matszpk
Message:

CLRadeonExtender: ROCmMetadata: Small changes. Commeting code.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • CLRadeonExtender/trunk/amdbin/ROCmBinaries.cpp

    r3695 r3696  
    107107}
    108108
     109// parse YAML key (keywords - recognized keys)
    109110static size_t parseYAMLKey(const char*& ptr, const char* end, size_t lineNo,
    110111            size_t keywordsNum, const char** keywords)
     
    115116        throw ParseException(lineNo, "Expected key name");
    116117    const char* keyEnd = ptr;
    117     while (ptr != end && *ptr!='\n' && isSpace(*ptr)) ptr++;
     118    skipSpacesToLineEnd(ptr, end);
    118119    if (ptr == end || *ptr!=':')
    119120        throw ParseException(lineNo, "Expected colon");
     
    130131}
    131132
     133// parse YAML integer value
    132134template<typename T>
    133135static T parseYAMLIntValue(const char*& ptr, const char* end, size_t& lineNo,
     
    148150}
    149151
     152// parse YAML boolean value
    150153static bool parseYAMLBoolValue(const char*& ptr, const char* end, size_t& lineNo,
    151154        bool singleValue = false)
     
    184187}
    185188
     189// trim spaces (remove spaces from start and end)
    186190static std::string trimStrSpaces(const std::string& str)
    187191{
     
    416420}
    417421
     422/// element consumer class
    418423class CLRX_INTERNAL YAMLElemConsumer
    419424{
     
    432437    if (*ptr == '[')
    433438    {
     439        // parse array []
    434440        ptr++;
    435441        skipSpacesAndComments(ptr, end, lineNo);
     
    455461        return;
    456462    }
    457     // sequence
     463    // parse sequence
    458464    size_t oldLineNo = lineNo;
    459465    size_t indent0 = skipSpacesAndComments(ptr, end, lineNo);
     
    464470        throw ParseException(lineNo, "Unindented sequence of objects");
    465471   
     472    // main loop to parse sequence
    466473    while (ptr != end)
    467474    {
     
    487494}
    488495
     496// integer element consumer
    489497template<typename T>
    490498class CLRX_INTERNAL YAMLIntArrayConsumer: public YAMLElemConsumer
     
    516524
    517525// printf info string consumer
    518 
    519526class CLRX_INTERNAL YAMLPrintfVectorConsumer: public YAMLElemConsumer
    520527{
     
    572579};
    573580
     581// skip YAML value after key
    574582static void skipYAMLValue(const char*& ptr, const char* end, size_t& lineNo,
    575583                cxuint prevIndent, bool singleValue = true)
     
    611619            // parse in line
    612620            if (ptr!=end && (*ptr=='\'' || *ptr=='"'))
     621                // skip YAML string
    613622                skipYAMLValue(ptr, end, lineNo, 0, false);
    614623            else
     
    942951                    inKernelAttrs = true;
    943952                    canToNextLevel = true;
     953                    // initialize kernel attributes values
    944954                    kernel.reqdWorkGroupSize[0] = BINGEN_NOTSUPPLIED;
    945955                    kernel.reqdWorkGroupSize[1] = BINGEN_NOTSUPPLIED;
     
    952962                    break;
    953963                case ROCMMT_KERNEL_CODEPROPS:
     964                    // initialize CodeProps values
    954965                    kernel.kernargSegmentSize = BINGEN64_DEFAULT;
    955966                    kernel.groupSegmentFixedSize = BINGEN64_DEFAULT;
Note: See TracChangeset for help on using the changeset viewer.