notifications
Intel Announces Agreement to Acquire Codeplay Software; Expanding our Open Standards Vision. Learn more here.
highlight_off
arrow_back_ios Back to List

__attribute__((no_dup))

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.

This attribute is used to force Offload™ not to duplicate the given method for SPU.

static int foo() __attribute__((no_dup));

static void func()
{
	offloadThread_t handle = __offload()
	{
		int bar = foo(); // will fail at compile time, as foo is no allowed to be duplicated
	};
}

It is useful to ban methods that you do not want any programmers to ever call from the SPU.