MCPcopy Create free account
hub / github.com/clMathLibraries/clBLAS / SetUp

Method SetUp

src/tests/BasicRoutines.cpp:30–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28 }
29
30 virtual void SetUp() {
31 cl_int err;
32 cl_context_properties props[] = { CL_CONTEXT_PLATFORM, 0, 0 };
33
34 ASSERT_EQ(CL_SUCCESS, clGetPlatformIDs(1, &platform, NULL));
35 ASSERT_EQ(CL_SUCCESS,
36 clGetDeviceIDs(platform, CL_DEVICE_TYPE_GPU, 1, &device, NULL));
37 props[1] = (cl_context_properties)platform;
38 context = clCreateContext(props, 1, &device, NULL, NULL, &err);
39 ASSERT_EQ(CL_SUCCESS, err) << "clCreateContext() failed";
40 queue = clCreateCommandQueue(context, device, 0, &err);
41 ASSERT_EQ(CL_SUCCESS, err) << "clCreateCommandQueue() failed";
42 }
43
44 virtual void TearDown() {
45 if (queue != NULL) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected