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

Method error

src/tests/functional/func-error.cpp:57–107  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55}
56
57template <typename M> void
58ErrorClass<M>::error(cl_int err_etalon)
59{
60 metod.initDefault(1024, 1);
61 cl_command_queue queues = metod.queues[0];
62 if (generateData()) {
63 switch (err_etalon) {
64 case CL_INVALID_EVENT_WAIT_LIST:
65 metod.inEvent = NULL;
66 metod.inEventCount = 1;
67 break;
68 case CL_INVALID_EVENT:
69 metod.outEvent = NULL;
70 metod.inEventCount = 1;
71 break;
72 case CL_INVALID_CONTEXT:
73 clReleaseContext(metod.context);
74 break;
75 case CL_INVALID_COMMAND_QUEUE:
76 metod.queues[0] = NULL;
77 break;
78 case clblasInvalidMatA:
79 case clblasInvalidVecX:
80 case CL_INVALID_MEM_OBJECT:
81 metod.bufA = NULL;
82 metod.bufAP = NULL;
83 metod.bufX = NULL;
84 metod.bufY = NULL;
85 break;
86 case CL_INVALID_DEVICE:
87 break;
88 case clblasInsufficientMemMatA:
89 case clblasInsufficientMemMatB:
90 case clblasInsufficientMemVecX:
91 case CL_INVALID_VALUE:
92 metod.size = 2048;
93 //metod.bufA = NULL;
94 break;
95 default:
96 FAIL() << "Unknown Error cod " << err_etalon;
97 }
98
99 cl_int err = metod.run();
100
101 metod.queues[0] = queues;
102
103 ASSERT_EQ(err, err_etalon) << "clFinish()";
104
105 }
106 metod.destroy();
107}
108
109#ifdef DO_THEIRS
110// Instantiate the test

Callers 1

TESTFunction · 0.80

Calls 3

initDefaultMethod · 0.80
runMethod · 0.45
destroyMethod · 0.45

Tested by

no test coverage detected