Changeset 3336 in CLRX


Ignore:
Timestamp:
Sep 7, 2017, 10:08:59 PM (16 months ago)
Author:
matszpk
Message:

CLRadeonExtender: GalliumBin?: Fixed indexing of progInfo (include various number of proginfos per kernel).
Remove reinterpret cast from access methods.

Location:
CLRadeonExtender/trunk
Files:
2 edited

Legend:

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

    r3205 r3336  
    171171    /// returns program info entries for specified kernel name
    172172    const GalliumProgInfoEntry* getProgramInfo(const char* name) const
    173     { return reinterpret_cast<GalliumProgInfoEntry*>(progInfoEntries) +
    174         getProgramInfoEntryIndex(name); }
     173    { return progInfoEntries + getProgramInfoEntryIndex(name); }
    175174   
    176175    /// returns program info entries for specified kernel name
    177176    GalliumProgInfoEntry* getProgramInfo(const char* name)
    178     { return reinterpret_cast<GalliumProgInfoEntry*>(progInfoEntries) +
    179         getProgramInfoEntryIndex(name); }
     177    { return progInfoEntries + getProgramInfoEntryIndex(name); }
    180178   
    181179    /// returns program info entries for specified kernel index
  • CLRadeonExtender/trunk/amdbin/GalliumBinaries.cpp

    r3322 r3336  
    164164const GalliumProgInfoEntry* GalliumElfBinaryBase::getProgramInfo(uint32_t index) const
    165165{
    166     return progInfoEntries + index*3U;
     166    return progInfoEntries + index*(llvm390 ? 5U : 3U);
    167167}
    168168
    169169GalliumProgInfoEntry* GalliumElfBinaryBase::getProgramInfo(uint32_t index)
    170170{
    171     return progInfoEntries + index*3U;
     171    return progInfoEntries + index*(llvm390 ? 5U : 3U);
    172172}
    173173
Note: See TracChangeset for help on using the changeset viewer.