This section summarizes the specified symbolic constants the libspe API relies on. These symbols are defined in the <libspe2.h> header file. Any libspe application should include this header file.
SPE_EVENTS_ENABLE | Event handling is enabled on this SPE context. |
SPE_CFG_SIGNOTIFY1_OR | Configure the SPU Signal Notification 1 Register to be in "logical OR" mode instead of the default "Overwrite" mode. |
SPE_CFG_SIGNOTIFY2_OR | Configure the SPU Signal Notification 2 Register to be in "logical OR" mode instead of the default "Overwrite" mode. |
SPE_MAP_PS | Request permission for memory-mapped access to the SPE's problem state area(s). |
SPE_ISOLATED | This context runs on an SPU in the isolation mode. Programs loaded into contexts flagged with SPE_ISOLATED must be be correctly formatted for isolated execution. |
SPE_ISOLATED_EMULATE | Run this context on an SPU in
an emulated isolation mode. This mode provides emulation of an isolated SPU
without truly being isolated as is intended for use by developers who need
access to debug tools during the development of their isolated applications.
Programs loaded into contexts flagged with SPE_ISOLATED_EMULATE must be correctly
formatted for isolated emulation execution. Note: (Linux) Proper operation
of a PPE assisted function call assumes the use of the ISOLATED version of
the SPE library functions.
|
spe_gang_context_create
<none> | <none defined> |
spe_context_run
SPE_RUN_USER_REGS | Specifies that the SPE setup registers r3, r4, and r5 are initialized with the 48 bytes pointed to by argp. |
SPE_NO_CALLBACKS | Specifies that registered SPE library calls ("callbacks" from this library's view) should not be automatically executed. If a callback is encountered, spe_context_run returns as if the SPU would have issues a regular stop and signal instruction. Details can then be found in stopinfo. |
spe_context_run; spe_stop_info_read
SPE_EXIT | SPE program terminated calling exit(code) with code in the range 0..255. The code will be saved in spe_exit_code. |
SPE_STOP_AND_SIGNAL | SPE program stopped because SPU executed a stop and signal instruction. Further information in spe_signal. |
SPE_RUNTIME_ERROR | SPE program stopped because of one of the
reasons found in spe_runtime_error. Note: (Linux) The
error SPE_SPU_INVALID_INSTR is reported as a Linux signal SIGILL if the SPE
context was created without the flag SPE_EVENTS_ENABLE.
|
SPE_RUNTIME_EXCEPTION | SPE program stopped asynchronously because
of a runtime exception (event) described in spe_runtime_exception.
In this case, spe_status would be meaningless and is therefore set
to -1. Note: (Linux®) This error situation can only be caught
and reported by spe_context_run if the SPE context was created with the flag
SPE_EVENTS_ENABLE indicating that event support is requested. Otherwise the Linux kernel
generates a signal to indicate the runtime error.
|
SPE_RUNTIME_FATAL | SPE program stopped for other reasons, usually
fatal operating system errors such as insufficient resources. Further information
in spe_runtime_fatal In this case, spe_status would be meaningless and is therefore set to -1. |
SPE_CALLBACK_ERROR | An SPE program tried to use unregistered library callback, or a library callback returned a non-zero exit value, which is provided in spe_callback_error. |
SPE_ISOLATION_ERROR | The SPE isolation system mechanism has detected an error when attempting to load the isolated SPE program. |
SPE_DMA_ALIGNMENT | A DMA alignment error occurred. |
SPE_DMA_SEGMENTATION | A DMA segmentation error occurred. |
SPE_DMA_STORAGE | A DMA storage error occurred. |
SPE_INVALID_DMA | An invalid DMA error. |
SPE_SPU_HALT | SPU was stopped by halt |
SPE_SPU_SINGLE_STEP | SPU is in single-step mode |
SPE_SPU_INVALID_INSTR | SPU has tried to run an invalid instruction |
SPE_SPU_INVALID_CHANNEL | SPU has tried to access an invalid channel |
SPE_EVENT_OUT_INTR_MBOX | Data available to be read from the SPU outbound interrupting mailbox. This event will be generated, if the SPU has written at least one entry to the SPU outbound interrupting mailbox (see spe_out_intr_mbox_read). |
SPE_EVENT_IN_MBOX | Data can now be written to the SPU inbound mailbox. This event will be generated, if the SPU inbound mailbox had been full and the SPU read at least on entry, so that now it can be written to the SPU inbound mailbox again (see spe_in_mbox write). |
SPE_EVENT_TAG_GROUP | An SPU event tag group signaled completion (see spe_tag_group_read). |
SPE_EVENT_SPE_STOPPED | Program execution on the SPE has stopped (see spe_stop_info_read). |
SPE_EVENT_ALL_EVENTS | Interest in all defined SPE events. This corresponds to a bit-wise OR of all flags above. |
SPE_TAG_ALL | The function suspends execution until all DMA commands in the tag groups enabled by the mask parameter have no outstanding DMAs in the proxy command queue of the SPE context specified by spe. The masked tag status is returned. |
SPE_TAG_ANY | The function suspends execution until any DMA commands in the tag groups enabled by the mask parameter have no outstanding DMAs in the proxy command queue of the SPE context specified by spe. The masked tag status is returned. |
SPE_TAG_IMMEDIATE | The function returns the tag status for the tag groups specified by the mask parameter for the proxy command queue of the SPE context specified by the spe. |
SPE_MBOX_ALL_BLOCKING | The call blocks until all count mailbox messages have been read. |
SPE_MBOX_ANY_BLOCKING | The call blocks until at least one mailbox message has been read. |
SPE_MBOX_ANY_NONBLOCKING | The call reads as many mailbox messages as possible up to a maximum of count without blocking. |
SPE_MSSYNC_AREA | MFC multisource synchronization register problem state area. |
SPE_MFC_COMMAND_AREA | MFC command parameter and command queue control area. |
SPE_CONTROL_AREA | SPE control area. |
SPE_SIG_NOTIFY_1_AREA | SPE signal notification area 1. |
SPE_SIG_NOTIFY_2_AREA | SPE signal notification area 2. |
SPE_COUNT_PHYSICAL_CPU_NODES | Requests the number of physical CPU nodes of the system. |
SPE_COUNT_PHYSICAL_SPES | Requests the total number of physical SPEs available either on the whole system or on a specified node. |
SPE_COUNT_USABLE_SPES | Requests the number of SPEs that can actually be used by the application at this point in time. |
SPE_CPU_IS_CELLBE | Identifies the CPU as a Cell BE CPU. |
SPE_CPU_IS_CELLEDP | Identifies the CPU as a CelleDP CPU with enhanced SPU double precision capabilities. |
SPE_CALLBACK_NEW | Register a new callback handler. |
SPE_CALLBACK_UPDATE | Update registration of an existing callback handler. |