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.
Non-static member methods (more precisely the SPU version the Offload compiler generates) called inside offload blocks on outer values will have an __outer this pointers. If that called method heavily processes data off the this pointer it will impact the performance of the offloaded code.
The -warnouterthiscalls option is useful to spot the "root" call so that it can be replaced with a call on a SPU-locally cached object instead. For example on the source code in /kb/147.html the compiler prints these warnings:
*** WARNING: Outer this pointer passed to functions call: cross . --- In file: cross.cpp, at line: 18, column: 9 va$r = global.cross(global); *** WARNING: Outer this pointer passed to functions call: operator= . --- In file: cross.cpp, at line: 18, column: 9 va$r = global.cross(global);
The first warning is generated for calling vec3::cross on the PPU variable global, and the second warning come from the assignment to the PPU variable var which calls the compiler-generated assignment operator.