MCPcopy Create free account
hub / github.com/KhronosGroup/OpenCL-CTS / should_skip

Function should_skip

test_conformance/basic/test_progvar.cpp:1982–2000  ·  view source on GitHub ↗

Determines whether its valid to skip this test based on the driver version and the features it optionally supports. Whether the test should be skipped is writen into the out paramter skip. The check returns an error code for the clDeviceInfo query.

Source from the content-addressed store, hash-verified

1980// Whether the test should be skipped is writen into the out paramter skip.
1981// The check returns an error code for the clDeviceInfo query.
1982static cl_int should_skip(cl_device_id device, cl_bool& skip)
1983{
1984 // Assume we can't skip to begin with.
1985 skip = CL_FALSE;
1986
1987 // Progvar tests are already skipped for OpenCL < 2.0, so here we only need
1988 // to test for 3.0 since that is when program scope global variables become
1989 // optional.
1990 if (get_device_cl_version(device) >= Version(3, 0))
1991 {
1992 size_t max_global_variable_size{};
1993 test_error(clGetDeviceInfo(device, CL_DEVICE_MAX_GLOBAL_VARIABLE_SIZE,
1994 sizeof(max_global_variable_size),
1995 &max_global_variable_size, nullptr),
1996 "clGetDeviceInfo failed");
1997 skip = (max_global_variable_size != 0) ? CL_FALSE : CL_TRUE;
1998 }
1999 return CL_SUCCESS;
2000}
2001
2002////////////////////
2003// Global functions

Callers 1

test_progvar.cppFile · 0.85

Calls 2

get_device_cl_versionFunction · 0.85
VersionClass · 0.85

Tested by

no test coverage detected