spe_program_load - Load an SPE main program.
#include <libspe2.h>
int spe_program_load (spe_context_ptr_t spe, spe_program_handle_t *program)
Parameters | |
spe | A valid pointer to the SPE context for which an SPE program should be loaded. |
program | A valid address of a mapped SPE program. |
Load an SPE main program that has been mapped to memory at the address pointed to by program into the local store of the SPE identified by the SPE context spe. This is mandatory before running the SPE context with spe_context_run.
On success, 0 (zero) is returned.
On error, -1 is returned and errno is set to indicate the error.
Possible errors include:
ESRCH | The specified SPE context is not valid. |
EINVAL | The specified address of the SPE program is not valid. |
ENOEXEC | The program image is not correctly formatted. |