src/core/WorkItemBuiltins.cpp
//////////////////////////////////////////
// Vector Data Load and Store Functions //
//////////////////////////////////////////
Vector Data Load and Store Functions
Vector Data Load and Store Functions
DEFINE_BUILTIN(vload)
  {
    size_t base = PARG(1);
    unsigned int addressSpace = ARG(1)->getType()->getPointerAddressSpace();
    uint64_t offset = UARG(0);
    size_t address = base + offset * result.size * result.num;
    size_t size = result.size * result.num;
    workItem->getMemory(addressSpace)->load(result.data, address, size);
  }
DEFINE_BUILTIN ( vload ) { size_t base = PARG ( 1 ) ; unsigned int addressSpace = ARG ( 1 ) -> getType ( ) -> getPointerAddressSpace ( ) ; uint64_t offset = UARG ( 0 ) ; size_t address = base + offset * result . size * result . num ; size_t size = result . size * result . num ; workItem -> getMemory ( addressSpace ) -> load ( result . data , address , size ) ; }
Vector Data Load and Store Functions
Vector Data Load and Store Functions