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:
Tony
2020-05-07 19:15:42 -04:00
والد 96d4140609
کامیت bccb25fc33
4فایلهای تغییر یافته به همراه26 افزوده شده و 30 حذف شده
@@ -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;
}