mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 06:09:01 +00:00
Add memory_scope_all_devices testing (#999)
* Add memory_scope_all_devices testing This duplicats memory_scope_all_svm_devices testing, but it seems pretty quick so I don't think it hurts. Fixes #990 * Address clang-format failures * Address a further clang-format failure
This commit is contained in:
@@ -44,16 +44,12 @@ const char *get_memory_scope_type_name(TExplicitMemoryScopeType scopeType)
|
||||
{
|
||||
switch (scopeType)
|
||||
{
|
||||
case MEMORY_SCOPE_EMPTY:
|
||||
return "";
|
||||
case MEMORY_SCOPE_WORK_GROUP:
|
||||
return "memory_scope_work_group";
|
||||
case MEMORY_SCOPE_DEVICE:
|
||||
return "memory_scope_device";
|
||||
case MEMORY_SCOPE_ALL_SVM_DEVICES:
|
||||
return "memory_scope_all_svm_devices";
|
||||
default:
|
||||
return 0;
|
||||
case MEMORY_SCOPE_EMPTY: return "";
|
||||
case MEMORY_SCOPE_WORK_GROUP: return "memory_scope_work_group";
|
||||
case MEMORY_SCOPE_DEVICE: return "memory_scope_device";
|
||||
case MEMORY_SCOPE_ALL_DEVICES: return "memory_scope_all_devices";
|
||||
case MEMORY_SCOPE_ALL_SVM_DEVICES: return "memory_scope_all_svm_devices";
|
||||
default: return 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -276,6 +272,9 @@ cl_int getSupportedMemoryOrdersAndScopes(
|
||||
}
|
||||
if (atomic_capabilities & CL_DEVICE_ATOMIC_SCOPE_ALL_DEVICES)
|
||||
{
|
||||
// OpenCL 3.0 added memory_scope_all_devices as an alias for
|
||||
// memory_scope_all_svm_devices, so test both.
|
||||
memoryScopes.push_back(MEMORY_SCOPE_ALL_DEVICES);
|
||||
memoryScopes.push_back(MEMORY_SCOPE_ALL_SVM_DEVICES);
|
||||
}
|
||||
return CL_SUCCESS;
|
||||
|
||||
Reference in New Issue
Block a user