arrow_back_ios
Back to List
__force_overlay
Offload KB - offload-library
Old Content Alert
Please note that this is a old document archive and the will most likely be out-dated or superseded by various other products and is purely here for historical purposes.
Code to force Offload™ to overlay onto SPU.
#include <liboffload>
__offload vector float b func(vector float f, vector float k)
{
__force_overlay;
return spu_add(f,k);
}
The function func will be stored in PPU memory and trasferred to SPU upon invocation. This allows you to save SPU memory when you have many subsets of functions that can be compiled for use within an offload block, but not all used at once.
__force_overlay is defined to __hint__(overlays) within the liboffload header.