Make HSA_QUEUE_TYPE_COOPERATIVE a queue type value
- Correct defintion of HSA_QUEUE_TYPE_COOPERATIVE to be a queue type and not a bit mask. - Correct implementation of hsa_queue_type_t to treat is as an enumeration type and not a bit mask. In particular HSA_QUEUE_TYPE_COOPERATIVE is a distinct queue type that uses the multi producer protocol, and is not a bit set value. Change-Id: I9415be8853671e5511e16e306caf16020e8c84af
This commit is contained in:
@@ -700,13 +700,8 @@ hsa_status_t hsa_queue_create(
|
||||
agent->GetInfo(HSA_AGENT_INFO_QUEUE_TYPE, &agent_queue_type);
|
||||
assert(HSA_STATUS_SUCCESS == status);
|
||||
|
||||
if (agent_queue_type == HSA_QUEUE_TYPE_SINGLE &&
|
||||
((type & HSA_QUEUE_TYPE_SINGLE) != HSA_QUEUE_TYPE_SINGLE)) {
|
||||
return HSA_STATUS_ERROR_INVALID_QUEUE_CREATION;
|
||||
}
|
||||
|
||||
if ((type & HSA_QUEUE_TYPE_COOPERATIVE) &&
|
||||
((type & HSA_QUEUE_TYPE_SINGLE) != HSA_QUEUE_TYPE_MULTI)) {
|
||||
if ((agent_queue_type == HSA_QUEUE_TYPE_SINGLE) &&
|
||||
(type != HSA_QUEUE_TYPE_SINGLE)) {
|
||||
return HSA_STATUS_ERROR_INVALID_QUEUE_CREATION;
|
||||
}
|
||||
|
||||
|
||||
مرجع در شماره جدید
Block a user