Changeset 3829 in CLRX


Ignore:
Timestamp:
Feb 20, 2018, 10:04:06 PM (14 months ago)
Author:
matszpk
Message:

CLRadeonExtender: AsmROCm: Add shortcuts to access qualifiers (rdonly, wronly, rdwr).

Location:
CLRadeonExtender/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • CLRadeonExtender/trunk/amdasm/AsmROCmFormat.cpp

    r3824 r3829  
    892892{
    893893    { "default", cxuint(ROCmAccessQual::DEFAULT) },
     894    { "rdonly", cxuint(ROCmAccessQual::READ_ONLY) },
     895    { "rdwr", cxuint(ROCmAccessQual::READ_WRITE) },
    894896    { "read_only", cxuint(ROCmAccessQual::READ_ONLY) },
    895897    { "read_write", cxuint(ROCmAccessQual::READ_WRITE) },
    896     { "write_only", cxuint(ROCmAccessQual::WRITE_ONLY) }
     898    { "write_only", cxuint(ROCmAccessQual::WRITE_ONLY) },
     899    { "wronly", cxuint(ROCmAccessQual::WRITE_ONLY) }
    897900};
     901
     902static const size_t rocmAccessQualNamesTblSize =
     903        sizeof(rocmAccessQualNamesTbl) / sizeof(std::pair<const char*, cxuint>);
    898904
    899905// add kernel argument (to metadata)
     
    10181024        if (haveComma)
    10191025            good &= getEnumeration(asmr, linePtr, "access qualifier",
    1020                         4, rocmAccessQualNamesTbl, accessQualVal, nullptr);
     1026                    rocmAccessQualNamesTblSize, rocmAccessQualNamesTbl,
     1027                    accessQualVal, nullptr);
    10211028    }
    10221029    cxuint actualAccessQualVal = 0;
     
    10301037        if (haveComma)
    10311038            good &= getEnumeration(asmr, linePtr, "access qualifier",
    1032                     4, rocmAccessQualNamesTbl, actualAccessQualVal, nullptr);
     1039                    rocmAccessQualNamesTblSize, rocmAccessQualNamesTbl,
     1040                    actualAccessQualVal, nullptr);
    10331041    }
    10341042   
  • CLRadeonExtender/trunk/doc/ClrxAsmRocm.md

    r3800 r3829  
    122122
    123123* default - default access qualifier
    124 * read_only - read only
    125 * read_write - read and write
    126 * write_only - write only
     124* read_only, rdonly - read only
     125* read_write, rdwr - read and write
     126* write_only, wronly - write only
    127127
    128128This list of flags:
  • CLRadeonExtender/trunk/tests/amdasm/AsmROCmFormat.cpp

    r3812 r3829  
    848848        .arg bbuf2, "float*", 8, 8, globalbuf, f32, global, write_only
    849849        .arg bbuf3, "float*", 8, 8, globalbuf, f32, global, read_write
    850         .arg img1, "image1d_t", 8, 8, image, struct, read_only, default
    851         .arg img2, "image1d_t", 8, 8, image, struct, write_only, default
    852         .arg img3, "image1d_t", 8, 8, image, struct, read_write, default
     850        .arg img1, "image1d_t", 8, 8, image, struct, rdonly, default
     851        .arg img2, "image1d_t", 8, 8, image, struct, wronly, default
     852        .arg img3, "image1d_t", 8, 8, image, struct, rdwr, default
    853853        .arg , "", 8, 8, gox, i64
    854854        .arg , "", 8, 8, goy, i64
Note: See TracChangeset for help on using the changeset viewer.