Ignore:
Timestamp:
Feb 2, 2018, 2:04:54 PM (23 months ago)
Author:
matszpk
Message:

CLRadeonExtender: ROCmMetadata: Replace ROCm metadata object constructor by initialize method. Add ROCmMetadata testsuite.

File:
1 edited

Legend:

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

    r3696 r3698  
    4040 */
    4141
    42 ROCmKernelMetadata::ROCmKernelMetadata() :
    43     langVersion{ BINGEN_NOTSUPPLIED, BINGEN_NOTSUPPLIED },
    44     reqdWorkGroupSize{ BINGEN_NOTSUPPLIED, BINGEN_NOTSUPPLIED, BINGEN_NOTSUPPLIED },
    45     workGroupSizeHint{ BINGEN_NOTSUPPLIED, BINGEN_NOTSUPPLIED, BINGEN_NOTSUPPLIED },
    46     kernargSegmentSize(BINGEN64_NOTSUPPLIED),
    47     groupSegmentFixedSize(BINGEN64_NOTSUPPLIED),
    48     privateSegmentFixedSize(BINGEN64_NOTSUPPLIED),
    49     kernargSegmentAlign(BINGEN64_NOTSUPPLIED),
    50     wavefrontSize(BINGEN_NOTSUPPLIED),
    51     sgprsNum(BINGEN_NOTSUPPLIED), vgprsNum(BINGEN_NOTSUPPLIED),
    52     maxFlatWorkGroupSize(BINGEN64_NOTSUPPLIED),
    53     fixedWorkGroupSize{ BINGEN_NOTSUPPLIED, BINGEN_NOTSUPPLIED, BINGEN_NOTSUPPLIED },
    54     spilledSgprs(BINGEN_NOTSUPPLIED),
    55     spilledVgprs(BINGEN_NOTSUPPLIED)
    56 { }
    57 
    58 ROCmMetadata::ROCmMetadata() : version{ 0, 0 }
    59 { }
     42void ROCmKernelMetadata::initialize()
     43{
     44    langVersion[0] = langVersion[1] = BINGEN_NOTSUPPLIED;
     45    reqdWorkGroupSize[0] = reqdWorkGroupSize[1] =
     46            reqdWorkGroupSize[2] = BINGEN_NOTSUPPLIED;
     47    workGroupSizeHint[0] = workGroupSizeHint[1] =
     48            workGroupSizeHint[2] = BINGEN_NOTSUPPLIED;
     49    kernargSegmentSize = BINGEN64_NOTSUPPLIED;
     50    groupSegmentFixedSize = BINGEN64_NOTSUPPLIED;
     51    privateSegmentFixedSize = BINGEN64_NOTSUPPLIED;
     52    kernargSegmentAlign = BINGEN64_NOTSUPPLIED;
     53    wavefrontSize = BINGEN_NOTSUPPLIED;
     54    sgprsNum = BINGEN_NOTSUPPLIED;
     55    vgprsNum = BINGEN_NOTSUPPLIED;
     56    maxFlatWorkGroupSize = BINGEN64_NOTSUPPLIED;
     57    fixedWorkGroupSize[0] = fixedWorkGroupSize[1] =
     58            fixedWorkGroupSize[2] = BINGEN_NOTSUPPLIED;
     59    spilledSgprs = BINGEN_NOTSUPPLIED;
     60    spilledVgprs = BINGEN_NOTSUPPLIED;
     61}
     62
     63void ROCmMetadata::initialize ()
     64{
     65    version[0] = version[1] = 0;
     66}
    6067
    6168// return trailing spaces
     
    932939           
    933940            kernels.push_back(ROCmKernelMetadata());
     941            kernels.back().initialize();
    934942        }
    935943       
Note: See TracChangeset for help on using the changeset viewer.