gem5 v24.0.0.0
|
Classes | |
struct | hsa_signal_s |
Signal handle. More... | |
struct | hsa_signal_group_s |
Group of signals. More... | |
Typedefs | |
typedef struct hsa_signal_s | hsa_signal_t |
Signal handle. | |
typedef int32_t | hsa_signal_value_t |
Signal value. | |
typedef struct hsa_signal_group_s | hsa_signal_group_t |
Group of signals. | |
Enumerations | |
enum | hsa_signal_condition_t { HSA_SIGNAL_CONDITION_EQ = 0 , HSA_SIGNAL_CONDITION_NE = 1 , HSA_SIGNAL_CONDITION_LT = 2 , HSA_SIGNAL_CONDITION_GTE = 3 } |
Wait condition operator. More... | |
enum | hsa_wait_state_t { HSA_WAIT_STATE_BLOCKED = 0 , HSA_WAIT_STATE_ACTIVE = 1 } |
State of the application thread during a signal wait. More... | |
typedef struct hsa_signal_group_s hsa_signal_group_t |
Group of signals.
typedef struct hsa_signal_s hsa_signal_t |
Signal handle.
typedef int32_t hsa_signal_value_t |
Wait condition operator.
enum hsa_wait_state_t |
void HSA_API HSA_DEPRECATED hsa_signal_add_acq_rel | ( | hsa_signal_t | signal, |
hsa_signal_value_t | value ) |
Atomically increment the value of a signal by a given amount.
If the value of the signal is changed, all the agents waiting on signal
for which value
satisfies their wait condition are awakened.
[in] | signal | Signal. If signal is a queue doorbell signal, the behavior is undefined. |
[in] | value | Value to add to the value of the signal. |
void HSA_API HSA_DEPRECATED hsa_signal_add_acquire | ( | hsa_signal_t | signal, |
hsa_signal_value_t | value ) |
Atomically increment the value of a signal by a given amount.
If the value of the signal is changed, all the agents waiting on signal
for which value
satisfies their wait condition are awakened.
[in] | signal | Signal. If signal is a queue doorbell signal, the behavior is undefined. |
[in] | value | Value to add to the value of the signal. |
void HSA_API hsa_signal_add_relaxed | ( | hsa_signal_t | signal, |
hsa_signal_value_t | value ) |
Atomically increment the value of a signal by a given amount.
If the value of the signal is changed, all the agents waiting on signal
for which value
satisfies their wait condition are awakened.
[in] | signal | Signal. If signal is a queue doorbell signal, the behavior is undefined. |
[in] | value | Value to add to the value of the signal. |
void HSA_API HSA_DEPRECATED hsa_signal_add_release | ( | hsa_signal_t | signal, |
hsa_signal_value_t | value ) |
Atomically increment the value of a signal by a given amount.
If the value of the signal is changed, all the agents waiting on signal
for which value
satisfies their wait condition are awakened.
[in] | signal | Signal. If signal is a queue doorbell signal, the behavior is undefined. |
[in] | value | Value to add to the value of the signal. |
void HSA_API hsa_signal_add_scacq_screl | ( | hsa_signal_t | signal, |
hsa_signal_value_t | value ) |
Atomically increment the value of a signal by a given amount.
If the value of the signal is changed, all the agents waiting on signal
for which value
satisfies their wait condition are awakened.
[in] | signal | Signal. If signal is a queue doorbell signal, the behavior is undefined. |
[in] | value | Value to add to the value of the signal. |
void HSA_API hsa_signal_add_scacquire | ( | hsa_signal_t | signal, |
hsa_signal_value_t | value ) |
Atomically increment the value of a signal by a given amount.
If the value of the signal is changed, all the agents waiting on signal
for which value
satisfies their wait condition are awakened.
[in] | signal | Signal. If signal is a queue doorbell signal, the behavior is undefined. |
[in] | value | Value to add to the value of the signal. |
void HSA_API hsa_signal_add_screlease | ( | hsa_signal_t | signal, |
hsa_signal_value_t | value ) |
Atomically increment the value of a signal by a given amount.
If the value of the signal is changed, all the agents waiting on signal
for which value
satisfies their wait condition are awakened.
[in] | signal | Signal. If signal is a queue doorbell signal, the behavior is undefined. |
[in] | value | Value to add to the value of the signal. |
void HSA_API HSA_DEPRECATED hsa_signal_and_acq_rel | ( | hsa_signal_t | signal, |
hsa_signal_value_t | value ) |
Atomically perform a bitwise AND operation between the value of a signal and a given value.
If the value of the signal is changed, all the agents waiting on signal
for which value
satisfies their wait condition are awakened.
[in] | signal | Signal. If signal is a queue doorbell signal, the behavior is undefined. |
[in] | value | Value to AND with the value of the signal. |
void HSA_API HSA_DEPRECATED hsa_signal_and_acquire | ( | hsa_signal_t | signal, |
hsa_signal_value_t | value ) |
Atomically perform a bitwise AND operation between the value of a signal and a given value.
If the value of the signal is changed, all the agents waiting on signal
for which value
satisfies their wait condition are awakened.
[in] | signal | Signal. If signal is a queue doorbell signal, the behavior is undefined. |
[in] | value | Value to AND with the value of the signal. |
void HSA_API hsa_signal_and_relaxed | ( | hsa_signal_t | signal, |
hsa_signal_value_t | value ) |
Atomically perform a bitwise AND operation between the value of a signal and a given value.
If the value of the signal is changed, all the agents waiting on signal
for which value
satisfies their wait condition are awakened.
[in] | signal | Signal. If signal is a queue doorbell signal, the behavior is undefined. |
[in] | value | Value to AND with the value of the signal. |
void HSA_API HSA_DEPRECATED hsa_signal_and_release | ( | hsa_signal_t | signal, |
hsa_signal_value_t | value ) |
Atomically perform a bitwise AND operation between the value of a signal and a given value.
If the value of the signal is changed, all the agents waiting on signal
for which value
satisfies their wait condition are awakened.
[in] | signal | Signal. If signal is a queue doorbell signal, the behavior is undefined. |
[in] | value | Value to AND with the value of the signal. |
void HSA_API hsa_signal_and_scacq_screl | ( | hsa_signal_t | signal, |
hsa_signal_value_t | value ) |
Atomically perform a bitwise AND operation between the value of a signal and a given value.
If the value of the signal is changed, all the agents waiting on signal
for which value
satisfies their wait condition are awakened.
[in] | signal | Signal. If signal is a queue doorbell signal, the behavior is undefined. |
[in] | value | Value to AND with the value of the signal. |
void HSA_API hsa_signal_and_scacquire | ( | hsa_signal_t | signal, |
hsa_signal_value_t | value ) |
Atomically perform a bitwise AND operation between the value of a signal and a given value.
If the value of the signal is changed, all the agents waiting on signal
for which value
satisfies their wait condition are awakened.
[in] | signal | Signal. If signal is a queue doorbell signal, the behavior is undefined. |
[in] | value | Value to AND with the value of the signal. |
void HSA_API hsa_signal_and_screlease | ( | hsa_signal_t | signal, |
hsa_signal_value_t | value ) |
Atomically perform a bitwise AND operation between the value of a signal and a given value.
If the value of the signal is changed, all the agents waiting on signal
for which value
satisfies their wait condition are awakened.
[in] | signal | Signal. If signal is a queue doorbell signal, the behavior is undefined. |
[in] | value | Value to AND with the value of the signal. |
hsa_signal_value_t HSA_API HSA_DEPRECATED hsa_signal_cas_acq_rel | ( | hsa_signal_t | signal, |
hsa_signal_value_t | expected, | ||
hsa_signal_value_t | value ) |
Atomically set the value of a signal if the observed value is equal to the expected value.
The observed value is returned regardless of whether the replacement was done.
If the value of the signal is changed, all the agents waiting on signal
for which value
satisfies their wait condition are awakened.
[in] | signal | Signal. If signal is a queue doorbell signal, the behavior is undefined. |
[in] | expected | Value to compare with. |
[in] | value | New value. |
hsa_signal_value_t HSA_API HSA_DEPRECATED hsa_signal_cas_acquire | ( | hsa_signal_t | signal, |
hsa_signal_value_t | expected, | ||
hsa_signal_value_t | value ) |
Atomically set the value of a signal if the observed value is equal to the expected value.
The observed value is returned regardless of whether the replacement was done.
If the value of the signal is changed, all the agents waiting on signal
for which value
satisfies their wait condition are awakened.
[in] | signal | Signal. If signal is a queue doorbell signal, the behavior is undefined. |
[in] | expected | Value to compare with. |
[in] | value | New value. |
hsa_signal_value_t HSA_API hsa_signal_cas_relaxed | ( | hsa_signal_t | signal, |
hsa_signal_value_t | expected, | ||
hsa_signal_value_t | value ) |
Atomically set the value of a signal if the observed value is equal to the expected value.
The observed value is returned regardless of whether the replacement was done.
If the value of the signal is changed, all the agents waiting on signal
for which value
satisfies their wait condition are awakened.
[in] | signal | Signal. If signal is a queue doorbell signal, the behavior is undefined. |
[in] | expected | Value to compare with. |
[in] | value | New value. |
hsa_signal_value_t HSA_API HSA_DEPRECATED hsa_signal_cas_release | ( | hsa_signal_t | signal, |
hsa_signal_value_t | expected, | ||
hsa_signal_value_t | value ) |
Atomically set the value of a signal if the observed value is equal to the expected value.
The observed value is returned regardless of whether the replacement was done.
If the value of the signal is changed, all the agents waiting on signal
for which value
satisfies their wait condition are awakened.
[in] | signal | Signal. If signal is a queue doorbell signal, the behavior is undefined. |
[in] | expected | Value to compare with. |
[in] | value | New value. |
hsa_signal_value_t HSA_API hsa_signal_cas_scacq_screl | ( | hsa_signal_t | signal, |
hsa_signal_value_t | expected, | ||
hsa_signal_value_t | value ) |
Atomically set the value of a signal if the observed value is equal to the expected value.
The observed value is returned regardless of whether the replacement was done.
If the value of the signal is changed, all the agents waiting on signal
for which value
satisfies their wait condition are awakened.
[in] | signal | Signal. If signal is a queue doorbell signal, the behavior is undefined. |
[in] | expected | Value to compare with. |
[in] | value | New value. |
hsa_signal_value_t HSA_API hsa_signal_cas_scacquire | ( | hsa_signal_t | signal, |
hsa_signal_value_t | expected, | ||
hsa_signal_value_t | value ) |
Atomically set the value of a signal if the observed value is equal to the expected value.
The observed value is returned regardless of whether the replacement was done.
If the value of the signal is changed, all the agents waiting on signal
for which value
satisfies their wait condition are awakened.
[in] | signal | Signal. If signal is a queue doorbell signal, the behavior is undefined. |
[in] | expected | Value to compare with. |
[in] | value | New value. |
hsa_signal_value_t HSA_API hsa_signal_cas_screlease | ( | hsa_signal_t | signal, |
hsa_signal_value_t | expected, | ||
hsa_signal_value_t | value ) |
Atomically set the value of a signal if the observed value is equal to the expected value.
The observed value is returned regardless of whether the replacement was done.
If the value of the signal is changed, all the agents waiting on signal
for which value
satisfies their wait condition are awakened.
[in] | signal | Signal. If signal is a queue doorbell signal, the behavior is undefined. |
[in] | expected | Value to compare with. |
[in] | value | New value. |
hsa_status_t HSA_API hsa_signal_create | ( | hsa_signal_value_t | initial_value, |
uint32_t | num_consumers, | ||
const hsa_agent_t * | consumers, | ||
hsa_signal_t * | signal ) |
Create a signal.
[in] | initial_value | Initial value of the signal. |
[in] | num_consumers | Size of consumers . A value of 0 indicates that any agent might wait on the signal. |
[in] | consumers | List of agents that might consume (wait on) the signal. If num_consumers is 0, this argument is ignored; otherwise, the HSA runtime might use the list to optimize the handling of the signal object. If an agent not listed in consumers waits on the returned signal, the behavior is undefined. The memory associated with consumers can be reused or freed after the function returns. |
[out] | signal | Pointer to a memory location where the HSA runtime will store the newly created signal handle. Must not be NULL. |
HSA_STATUS_SUCCESS | The function has been executed successfully. |
HSA_STATUS_ERROR_NOT_INITIALIZED | The HSA runtime has not been initialized. |
HSA_STATUS_ERROR_OUT_OF_RESOURCES | The HSA runtime failed to allocate the required resources. |
HSA_STATUS_ERROR_INVALID_ARGUMENT | signal is NULL, num_consumers is greater than 0 but consumers is NULL, or consumers contains duplicates. |
hsa_status_t HSA_API hsa_signal_destroy | ( | hsa_signal_t | signal | ) |
Destroy a signal previous created by hsa_signal_create.
[in] | signal | Signal. |
HSA_STATUS_SUCCESS | The function has been executed successfully. |
HSA_STATUS_ERROR_NOT_INITIALIZED | The HSA runtime has not been initialized. |
HSA_STATUS_ERROR_INVALID_SIGNAL | signal is invalid. |
HSA_STATUS_ERROR_INVALID_ARGUMENT | The handle in signal is 0. |
hsa_signal_value_t HSA_API HSA_DEPRECATED hsa_signal_exchange_acq_rel | ( | hsa_signal_t | signal, |
hsa_signal_value_t | value ) |
Atomically set the value of a signal and return its previous value.
If the value of the signal is changed, all the agents waiting on signal
for which value
satisfies their wait condition are awakened.
[in] | signal | Signal. If signal is a queue doorbell signal, the behavior is undefined. |
[in] | value | New value. |
hsa_signal_value_t HSA_API HSA_DEPRECATED hsa_signal_exchange_acquire | ( | hsa_signal_t | signal, |
hsa_signal_value_t | value ) |
Atomically set the value of a signal and return its previous value.
If the value of the signal is changed, all the agents waiting on signal
for which value
satisfies their wait condition are awakened.
[in] | signal | Signal. If signal is a queue doorbell signal, the behavior is undefined. |
[in] | value | New value. |
hsa_signal_value_t HSA_API hsa_signal_exchange_relaxed | ( | hsa_signal_t | signal, |
hsa_signal_value_t | value ) |
Atomically set the value of a signal and return its previous value.
If the value of the signal is changed, all the agents waiting on signal
for which value
satisfies their wait condition are awakened.
[in] | signal | Signal. If signal is a queue doorbell signal, the behavior is undefined. |
[in] | value | New value. |
hsa_signal_value_t HSA_API HSA_DEPRECATED hsa_signal_exchange_release | ( | hsa_signal_t | signal, |
hsa_signal_value_t | value ) |
Atomically set the value of a signal and return its previous value.
If the value of the signal is changed, all the agents waiting on signal
for which value
satisfies their wait condition are awakened.
[in] | signal | Signal. If signal is a queue doorbell signal, the behavior is undefined. |
[in] | value | New value. |
hsa_signal_value_t HSA_API hsa_signal_exchange_scacq_screl | ( | hsa_signal_t | signal, |
hsa_signal_value_t | value ) |
Atomically set the value of a signal and return its previous value.
If the value of the signal is changed, all the agents waiting on signal
for which value
satisfies their wait condition are awakened.
[in] | signal | Signal. If signal is a queue doorbell signal, the behavior is undefined. |
[in] | value | New value. |
hsa_signal_value_t HSA_API hsa_signal_exchange_scacquire | ( | hsa_signal_t | signal, |
hsa_signal_value_t | value ) |
Atomically set the value of a signal and return its previous value.
If the value of the signal is changed, all the agents waiting on signal
for which value
satisfies their wait condition are awakened.
[in] | signal | Signal. If signal is a queue doorbell signal, the behavior is undefined. |
[in] | value | New value. |
hsa_signal_value_t HSA_API hsa_signal_exchange_screlease | ( | hsa_signal_t | signal, |
hsa_signal_value_t | value ) |
Atomically set the value of a signal and return its previous value.
If the value of the signal is changed, all the agents waiting on signal
for which value
satisfies their wait condition are awakened.
[in] | signal | Signal. If signal is a queue doorbell signal, the behavior is undefined. |
[in] | value | New value. |
hsa_status_t HSA_API hsa_signal_group_create | ( | uint32_t | num_signals, |
const hsa_signal_t * | signals, | ||
uint32_t | num_consumers, | ||
const hsa_agent_t * | consumers, | ||
hsa_signal_group_t * | signal_group ) |
Create a signal group.
[in] | num_signals | Number of elements in signals . Must not be 0. |
[in] | signals | List of signals in the group. The list must not contain any repeated elements. Must not be NULL. |
[in] | num_consumers | Number of elements in consumers . Must not be 0. |
[in] | consumers | List of agents that might consume (wait on) the signal group. The list must not contain repeated elements, and must be a subset of the set of agents that are allowed to wait on all the signals in the group. If an agent not listed in consumers waits on the returned group, the behavior is undefined. The memory associated with consumers can be reused or freed after the function returns. Must not be NULL. |
[out] | signal_group | Pointer to newly created signal group. Must not be NULL. |
HSA_STATUS_SUCCESS | The function has been executed successfully. |
HSA_STATUS_ERROR_NOT_INITIALIZED | The HSA runtime has not been initialized. |
HSA_STATUS_ERROR_OUT_OF_RESOURCES | The HSA runtime failed to allocate the required resources. |
HSA_STATUS_ERROR_INVALID_ARGUMENT | num_signals is 0, signals is NULL, num_consumers is 0, consumers is NULL, or signal_group is NULL. |
hsa_status_t HSA_API hsa_signal_group_destroy | ( | hsa_signal_group_t | signal_group | ) |
Destroy a signal group previous created by hsa_signal_group_create.
[in] | signal_group | Signal group. |
HSA_STATUS_SUCCESS | The function has been executed successfully. |
HSA_STATUS_ERROR_NOT_INITIALIZED | The HSA runtime has not been initialized. |
HSA_STATUS_ERROR_INVALID_SIGNAL_GROUP | signal_group is invalid. |
hsa_status_t HSA_API hsa_signal_group_wait_any_relaxed | ( | hsa_signal_group_t | signal_group, |
const hsa_signal_condition_t * | conditions, | ||
const hsa_signal_value_t * | compare_values, | ||
hsa_wait_state_t | wait_state_hint, | ||
hsa_signal_t * | signal, | ||
hsa_signal_value_t * | value ) |
Wait until the value of at least one of the signals in a signal group satisfies its associated condition.
The function is guaranteed to return if the value of at least one of the signals in the group satisfies its associated condition at some point in time during the wait, but the signal value returned to the application may no longer satisfy the condition. The application must ensure that signals in the group are used in such way that wait wakeup conditions are not invalidated before dependent threads have woken up.
When this operation internally loads the value of the passed signal, it uses the memory order indicated in the function name.
[in] | signal_group | Signal group. |
[in] | conditions | List of conditions. Each condition, and the value at the same index in compare_values , is used to compare the value of the signal at that index in signal_group (the signal passed by the application to hsa_signal_group_create at that particular index). The size of conditions must not be smaller than the number of signals in signal_group ; any extra elements are ignored. Must not be NULL. |
[in] | compare_values | List of comparison values. The size of compare_values must not be smaller than the number of signals in signal_group ; any extra elements are ignored. Must not be NULL. |
[in] | wait_state_hint | Hint used by the application to indicate the preferred waiting state. The actual waiting state is decided by the HSA runtime and may not match the provided hint. A value of HSA_WAIT_STATE_ACTIVE may improve the latency of response to a signal update by avoiding rescheduling overhead. |
[out] | signal | Signal in the group that satisfied the associated condition. If several signals satisfied their condition, the function can return any of those signals. Must not be NULL. |
[out] | value | Observed value for signal , which might no longer satisfy the specified condition. Must not be NULL. |
HSA_STATUS_SUCCESS | The function has been executed successfully. |
HSA_STATUS_ERROR_INVALID_SIGNAL_GROUP | signal_group is invalid. |
HSA_STATUS_ERROR_INVALID_ARGUMENT | conditions is NULL, compare_values is NULL, signal is NULL, or value is NULL. |
hsa_status_t HSA_API hsa_signal_group_wait_any_scacquire | ( | hsa_signal_group_t | signal_group, |
const hsa_signal_condition_t * | conditions, | ||
const hsa_signal_value_t * | compare_values, | ||
hsa_wait_state_t | wait_state_hint, | ||
hsa_signal_t * | signal, | ||
hsa_signal_value_t * | value ) |
Wait until the value of at least one of the signals in a signal group satisfies its associated condition.
The function is guaranteed to return if the value of at least one of the signals in the group satisfies its associated condition at some point in time during the wait, but the signal value returned to the application may no longer satisfy the condition. The application must ensure that signals in the group are used in such way that wait wakeup conditions are not invalidated before dependent threads have woken up.
When this operation internally loads the value of the passed signal, it uses the memory order indicated in the function name.
[in] | signal_group | Signal group. |
[in] | conditions | List of conditions. Each condition, and the value at the same index in compare_values , is used to compare the value of the signal at that index in signal_group (the signal passed by the application to hsa_signal_group_create at that particular index). The size of conditions must not be smaller than the number of signals in signal_group ; any extra elements are ignored. Must not be NULL. |
[in] | compare_values | List of comparison values. The size of compare_values must not be smaller than the number of signals in signal_group ; any extra elements are ignored. Must not be NULL. |
[in] | wait_state_hint | Hint used by the application to indicate the preferred waiting state. The actual waiting state is decided by the HSA runtime and may not match the provided hint. A value of HSA_WAIT_STATE_ACTIVE may improve the latency of response to a signal update by avoiding rescheduling overhead. |
[out] | signal | Signal in the group that satisfied the associated condition. If several signals satisfied their condition, the function can return any of those signals. Must not be NULL. |
[out] | value | Observed value for signal , which might no longer satisfy the specified condition. Must not be NULL. |
HSA_STATUS_SUCCESS | The function has been executed successfully. |
HSA_STATUS_ERROR_INVALID_SIGNAL_GROUP | signal_group is invalid. |
HSA_STATUS_ERROR_INVALID_ARGUMENT | conditions is NULL, compare_values is NULL, signal is NULL, or value is NULL. |
hsa_signal_value_t HSA_API HSA_DEPRECATED hsa_signal_load_acquire | ( | hsa_signal_t | signal | ) |
Atomically read the current value of a signal.
[in] | signal | Signal. |
hsa_signal_value_t HSA_API hsa_signal_load_relaxed | ( | hsa_signal_t | signal | ) |
Atomically read the current value of a signal.
[in] | signal | Signal. |
hsa_signal_value_t HSA_API hsa_signal_load_scacquire | ( | hsa_signal_t | signal | ) |
Atomically read the current value of a signal.
[in] | signal | Signal. |
void HSA_API HSA_DEPRECATED hsa_signal_or_acq_rel | ( | hsa_signal_t | signal, |
hsa_signal_value_t | value ) |
Atomically perform a bitwise OR operation between the value of a signal and a given value.
If the value of the signal is changed, all the agents waiting on signal
for which value
satisfies their wait condition are awakened.
[in] | signal | Signal. If signal is a queue doorbell signal, the behavior is undefined. |
[in] | value | Value to OR with the value of the signal. |
void HSA_API HSA_DEPRECATED hsa_signal_or_acquire | ( | hsa_signal_t | signal, |
hsa_signal_value_t | value ) |
Atomically perform a bitwise OR operation between the value of a signal and a given value.
If the value of the signal is changed, all the agents waiting on signal
for which value
satisfies their wait condition are awakened.
[in] | signal | Signal. If signal is a queue doorbell signal, the behavior is undefined. |
[in] | value | Value to OR with the value of the signal. |
void HSA_API hsa_signal_or_relaxed | ( | hsa_signal_t | signal, |
hsa_signal_value_t | value ) |
Atomically perform a bitwise OR operation between the value of a signal and a given value.
If the value of the signal is changed, all the agents waiting on signal
for which value
satisfies their wait condition are awakened.
[in] | signal | Signal. If signal is a queue doorbell signal, the behavior is undefined. |
[in] | value | Value to OR with the value of the signal. |
void HSA_API HSA_DEPRECATED hsa_signal_or_release | ( | hsa_signal_t | signal, |
hsa_signal_value_t | value ) |
Atomically perform a bitwise OR operation between the value of a signal and a given value.
If the value of the signal is changed, all the agents waiting on signal
for which value
satisfies their wait condition are awakened.
[in] | signal | Signal. If signal is a queue doorbell signal, the behavior is undefined. |
[in] | value | Value to OR with the value of the signal. |
void HSA_API hsa_signal_or_scacq_screl | ( | hsa_signal_t | signal, |
hsa_signal_value_t | value ) |
Atomically perform a bitwise OR operation between the value of a signal and a given value.
If the value of the signal is changed, all the agents waiting on signal
for which value
satisfies their wait condition are awakened.
[in] | signal | Signal. If signal is a queue doorbell signal, the behavior is undefined. |
[in] | value | Value to OR with the value of the signal. |
void HSA_API hsa_signal_or_scacquire | ( | hsa_signal_t | signal, |
hsa_signal_value_t | value ) |
Atomically perform a bitwise OR operation between the value of a signal and a given value.
If the value of the signal is changed, all the agents waiting on signal
for which value
satisfies their wait condition are awakened.
[in] | signal | Signal. If signal is a queue doorbell signal, the behavior is undefined. |
[in] | value | Value to OR with the value of the signal. |
void HSA_API hsa_signal_or_screlease | ( | hsa_signal_t | signal, |
hsa_signal_value_t | value ) |
Atomically perform a bitwise OR operation between the value of a signal and a given value.
If the value of the signal is changed, all the agents waiting on signal
for which value
satisfies their wait condition are awakened.
[in] | signal | Signal. If signal is a queue doorbell signal, the behavior is undefined. |
[in] | value | Value to OR with the value of the signal. |
void HSA_API hsa_signal_silent_store_relaxed | ( | hsa_signal_t | signal, |
hsa_signal_value_t | value ) |
Atomically set the value of a signal without necessarily notifying the the agents waiting on it.
The agents waiting on signal
may not wake up even when the new value satisfies their wait condition. If the application wants to update the signal and there is no need to notify any agent, invoking this function can be more efficient than calling the non-silent counterpart.
[in] | signal | Signal. |
[in] | value | New signal value. |
void HSA_API hsa_signal_silent_store_screlease | ( | hsa_signal_t | signal, |
hsa_signal_value_t | value ) |
Atomically set the value of a signal without necessarily notifying the the agents waiting on it.
The agents waiting on signal
may not wake up even when the new value satisfies their wait condition. If the application wants to update the signal and there is no need to notify any agent, invoking this function can be more efficient than calling the non-silent counterpart.
[in] | signal | Signal. |
[in] | value | New signal value. |
void HSA_API hsa_signal_store_relaxed | ( | hsa_signal_t | signal, |
hsa_signal_value_t | value ) |
Atomically set the value of a signal.
If the value of the signal is changed, all the agents waiting on signal
for which value
satisfies their wait condition are awakened.
[in] | signal | Signal. |
[in] | value | New signal value. |
void HSA_API HSA_DEPRECATED hsa_signal_store_release | ( | hsa_signal_t | signal, |
hsa_signal_value_t | value ) |
Atomically set the value of a signal.
If the value of the signal is changed, all the agents waiting on signal
for which value
satisfies their wait condition are awakened.
[in] | signal | Signal. |
[in] | value | New signal value. |
void HSA_API hsa_signal_store_screlease | ( | hsa_signal_t | signal, |
hsa_signal_value_t | value ) |
Atomically set the value of a signal.
If the value of the signal is changed, all the agents waiting on signal
for which value
satisfies their wait condition are awakened.
[in] | signal | Signal. |
[in] | value | New signal value. |
void HSA_API HSA_DEPRECATED hsa_signal_subtract_acq_rel | ( | hsa_signal_t | signal, |
hsa_signal_value_t | value ) |
Atomically decrement the value of a signal by a given amount.
If the value of the signal is changed, all the agents waiting on signal
for which value
satisfies their wait condition are awakened.
[in] | signal | Signal. If signal is a queue doorbell signal, the behavior is undefined. |
[in] | value | Value to subtract from the value of the signal. |
void HSA_API HSA_DEPRECATED hsa_signal_subtract_acquire | ( | hsa_signal_t | signal, |
hsa_signal_value_t | value ) |
Atomically decrement the value of a signal by a given amount.
If the value of the signal is changed, all the agents waiting on signal
for which value
satisfies their wait condition are awakened.
[in] | signal | Signal. If signal is a queue doorbell signal, the behavior is undefined. |
[in] | value | Value to subtract from the value of the signal. |
void HSA_API hsa_signal_subtract_relaxed | ( | hsa_signal_t | signal, |
hsa_signal_value_t | value ) |
Atomically decrement the value of a signal by a given amount.
If the value of the signal is changed, all the agents waiting on signal
for which value
satisfies their wait condition are awakened.
[in] | signal | Signal. If signal is a queue doorbell signal, the behavior is undefined. |
[in] | value | Value to subtract from the value of the signal. |
void HSA_API HSA_DEPRECATED hsa_signal_subtract_release | ( | hsa_signal_t | signal, |
hsa_signal_value_t | value ) |
Atomically decrement the value of a signal by a given amount.
If the value of the signal is changed, all the agents waiting on signal
for which value
satisfies their wait condition are awakened.
[in] | signal | Signal. If signal is a queue doorbell signal, the behavior is undefined. |
[in] | value | Value to subtract from the value of the signal. |
void HSA_API hsa_signal_subtract_scacq_screl | ( | hsa_signal_t | signal, |
hsa_signal_value_t | value ) |
Atomically decrement the value of a signal by a given amount.
If the value of the signal is changed, all the agents waiting on signal
for which value
satisfies their wait condition are awakened.
[in] | signal | Signal. If signal is a queue doorbell signal, the behavior is undefined. |
[in] | value | Value to subtract from the value of the signal. |
void HSA_API hsa_signal_subtract_scacquire | ( | hsa_signal_t | signal, |
hsa_signal_value_t | value ) |
Atomically decrement the value of a signal by a given amount.
If the value of the signal is changed, all the agents waiting on signal
for which value
satisfies their wait condition are awakened.
[in] | signal | Signal. If signal is a queue doorbell signal, the behavior is undefined. |
[in] | value | Value to subtract from the value of the signal. |
void HSA_API hsa_signal_subtract_screlease | ( | hsa_signal_t | signal, |
hsa_signal_value_t | value ) |
Atomically decrement the value of a signal by a given amount.
If the value of the signal is changed, all the agents waiting on signal
for which value
satisfies their wait condition are awakened.
[in] | signal | Signal. If signal is a queue doorbell signal, the behavior is undefined. |
[in] | value | Value to subtract from the value of the signal. |
hsa_signal_value_t HSA_API HSA_DEPRECATED hsa_signal_wait_acquire | ( | hsa_signal_t | signal, |
hsa_signal_condition_t | condition, | ||
hsa_signal_value_t | compare_value, | ||
uint64_t | timeout_hint, | ||
hsa_wait_state_t | wait_state_hint ) |
Wait until a signal value satisfies a specified condition, or a certain amount of time has elapsed.
A wait operation can spuriously resume at any time sooner than the timeout (for example, due to system or other external factors) even when the condition has not been met.
The function is guaranteed to return if the signal value satisfies the condition at some point in time during the wait, but the value returned to the application might not satisfy the condition. The application must ensure that signals are used in such way that wait wakeup conditions are not invalidated before dependent threads have woken up.
When the wait operation internally loads the value of the passed signal, it uses the memory order indicated in the function name.
[in] | signal | Signal. |
[in] | condition | Condition used to compare the signal value with compare_value . |
[in] | compare_value | Value to compare with. |
[in] | timeout_hint | Maximum duration of the wait. Specified in the same unit as the system timestamp. The operation might block for a shorter or longer time even if the condition is not met. A value of UINT64_MAX indicates no maximum. |
[in] | wait_state_hint | Hint used by the application to indicate the preferred waiting state. The actual waiting state is ultimately decided by HSA runtime and may not match the provided hint. A value of HSA_WAIT_STATE_ACTIVE may improve the latency of response to a signal update by avoiding rescheduling overhead. |
hsa_signal_value_t HSA_API hsa_signal_wait_relaxed | ( | hsa_signal_t | signal, |
hsa_signal_condition_t | condition, | ||
hsa_signal_value_t | compare_value, | ||
uint64_t | timeout_hint, | ||
hsa_wait_state_t | wait_state_hint ) |
Wait until a signal value satisfies a specified condition, or a certain amount of time has elapsed.
A wait operation can spuriously resume at any time sooner than the timeout (for example, due to system or other external factors) even when the condition has not been met.
The function is guaranteed to return if the signal value satisfies the condition at some point in time during the wait, but the value returned to the application might not satisfy the condition. The application must ensure that signals are used in such way that wait wakeup conditions are not invalidated before dependent threads have woken up.
When the wait operation internally loads the value of the passed signal, it uses the memory order indicated in the function name.
[in] | signal | Signal. |
[in] | condition | Condition used to compare the signal value with compare_value . |
[in] | compare_value | Value to compare with. |
[in] | timeout_hint | Maximum duration of the wait. Specified in the same unit as the system timestamp. The operation might block for a shorter or longer time even if the condition is not met. A value of UINT64_MAX indicates no maximum. |
[in] | wait_state_hint | Hint used by the application to indicate the preferred waiting state. The actual waiting state is ultimately decided by HSA runtime and may not match the provided hint. A value of HSA_WAIT_STATE_ACTIVE may improve the latency of response to a signal update by avoiding rescheduling overhead. |
hsa_signal_value_t HSA_API hsa_signal_wait_scacquire | ( | hsa_signal_t | signal, |
hsa_signal_condition_t | condition, | ||
hsa_signal_value_t | compare_value, | ||
uint64_t | timeout_hint, | ||
hsa_wait_state_t | wait_state_hint ) |
Wait until a signal value satisfies a specified condition, or a certain amount of time has elapsed.
A wait operation can spuriously resume at any time sooner than the timeout (for example, due to system or other external factors) even when the condition has not been met.
The function is guaranteed to return if the signal value satisfies the condition at some point in time during the wait, but the value returned to the application might not satisfy the condition. The application must ensure that signals are used in such way that wait wakeup conditions are not invalidated before dependent threads have woken up.
When the wait operation internally loads the value of the passed signal, it uses the memory order indicated in the function name.
[in] | signal | Signal. |
[in] | condition | Condition used to compare the signal value with compare_value . |
[in] | compare_value | Value to compare with. |
[in] | timeout_hint | Maximum duration of the wait. Specified in the same unit as the system timestamp. The operation might block for a shorter or longer time even if the condition is not met. A value of UINT64_MAX indicates no maximum. |
[in] | wait_state_hint | Hint used by the application to indicate the preferred waiting state. The actual waiting state is ultimately decided by HSA runtime and may not match the provided hint. A value of HSA_WAIT_STATE_ACTIVE may improve the latency of response to a signal update by avoiding rescheduling overhead. |
void HSA_API HSA_DEPRECATED hsa_signal_xor_acq_rel | ( | hsa_signal_t | signal, |
hsa_signal_value_t | value ) |
Atomically perform a bitwise XOR operation between the value of a signal and a given value.
If the value of the signal is changed, all the agents waiting on signal
for which value
satisfies their wait condition are awakened.
[in] | signal | Signal. If signal is a queue doorbell signal, the behavior is undefined. |
[in] | value | Value to XOR with the value of the signal. |
void HSA_API HSA_DEPRECATED hsa_signal_xor_acquire | ( | hsa_signal_t | signal, |
hsa_signal_value_t | value ) |
Atomically perform a bitwise XOR operation between the value of a signal and a given value.
If the value of the signal is changed, all the agents waiting on signal
for which value
satisfies their wait condition are awakened.
[in] | signal | Signal. If signal is a queue doorbell signal, the behavior is undefined. |
[in] | value | Value to XOR with the value of the signal. |
void HSA_API hsa_signal_xor_relaxed | ( | hsa_signal_t | signal, |
hsa_signal_value_t | value ) |
Atomically perform a bitwise XOR operation between the value of a signal and a given value.
If the value of the signal is changed, all the agents waiting on signal
for which value
satisfies their wait condition are awakened.
[in] | signal | Signal. If signal is a queue doorbell signal, the behavior is undefined. |
[in] | value | Value to XOR with the value of the signal. |
void HSA_API HSA_DEPRECATED hsa_signal_xor_release | ( | hsa_signal_t | signal, |
hsa_signal_value_t | value ) |
Atomically perform a bitwise XOR operation between the value of a signal and a given value.
If the value of the signal is changed, all the agents waiting on signal
for which value
satisfies their wait condition are awakened.
[in] | signal | Signal. If signal is a queue doorbell signal, the behavior is undefined. |
[in] | value | Value to XOR with the value of the signal. |
void HSA_API hsa_signal_xor_scacq_screl | ( | hsa_signal_t | signal, |
hsa_signal_value_t | value ) |
Atomically perform a bitwise XOR operation between the value of a signal and a given value.
If the value of the signal is changed, all the agents waiting on signal
for which value
satisfies their wait condition are awakened.
[in] | signal | Signal. If signal is a queue doorbell signal, the behavior is undefined. |
[in] | value | Value to XOR with the value of the signal. |
void HSA_API hsa_signal_xor_scacquire | ( | hsa_signal_t | signal, |
hsa_signal_value_t | value ) |
Atomically perform a bitwise XOR operation between the value of a signal and a given value.
If the value of the signal is changed, all the agents waiting on signal
for which value
satisfies their wait condition are awakened.
[in] | signal | Signal. If signal is a queue doorbell signal, the behavior is undefined. |
[in] | value | Value to XOR with the value of the signal. |
void HSA_API hsa_signal_xor_screlease | ( | hsa_signal_t | signal, |
hsa_signal_value_t | value ) |
Atomically perform a bitwise XOR operation between the value of a signal and a given value.
If the value of the signal is changed, all the agents waiting on signal
for which value
satisfies their wait condition are awakened.
[in] | signal | Signal. If signal is a queue doorbell signal, the behavior is undefined. |
[in] | value | Value to XOR with the value of the signal. |