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

Method run

src/tests/functional/func-thread.cpp:130–168  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

128}
129
130template <typename M> void
131MThreadClass<M>::run()
132{
133 cl_int err;
134 bool b = s_metod.prepareDataToRun();
135 ASSERT_EQ(b, true);
136 for (int i=0; i < P_TH; ++i ) {
137 bool b = m_metod[i].prepareDataToRun();
138 m_metod[i].initOutEvent();
139 ASSERT_EQ(b, true);
140 }
141
142 err = s_metod.run();
143 if (err == CL_SUCCESS) {
144 err = clFinish(s_metod.queues[0]);
145 ASSERT_EQ(err, CL_SUCCESS) << "clFinish()";
146
147 err = s_metod.getResult();
148 ASSERT_EQ(err, CL_SUCCESS);
149
150 THREAD_ID pt[P_TH];
151
152 for (int i=0; i < P_TH; ++i ) {
153 THREAD_START(pt[i], m_metod[i]);
154 }
155
156 for (int i=0; i < P_TH; ++i ) {
157 bool ret;
158 THREAD_WAIT(pt[i], ret);
159 EXPECT_EQ(ret, true);
160 s_metod.compareData(m_metod[i]);
161 }
162 }
163 else {
164 ::std::cerr << ">> Test skipped." << err <<::std::endl;
165 SUCCEED();
166 return;
167 }
168}
169template <typename M> void
170MThreadClass<M>::destroy()
171{

Callers 1

phfuncFunction · 0.45

Calls 4

prepareDataToRunMethod · 0.80
initOutEventMethod · 0.80
getResultMethod · 0.80
compareDataMethod · 0.80

Tested by

no test coverage detected