| 212 | } |
| 213 | |
| 214 | void CLKeySearchDevice::doStep() |
| 215 | { |
| 216 | try { |
| 217 | uint64_t numKeys = (uint64_t)_points; |
| 218 | |
| 219 | if(_iterations < 2 && _start.cmp(numKeys) <= 0) { |
| 220 | |
| 221 | _stepKernelWithDouble->set_args( |
| 222 | _points, |
| 223 | _compression, |
| 224 | _chain, |
| 225 | _x, |
| 226 | _y, |
| 227 | _xInc, |
| 228 | _yInc, |
| 229 | _deviceTargetList.ptr, |
| 230 | _deviceTargetList.size, |
| 231 | _deviceTargetList.mask, |
| 232 | _deviceResults, |
| 233 | _deviceResultsCount); |
| 234 | _stepKernelWithDouble->call(_blocks, _threads); |
| 235 | } else { |
| 236 | |
| 237 | _stepKernel->set_args( |
| 238 | _points, |
| 239 | _compression, |
| 240 | _chain, |
| 241 | _x, |
| 242 | _y, |
| 243 | _xInc, |
| 244 | _yInc, |
| 245 | _deviceTargetList.ptr, |
| 246 | _deviceTargetList.size, |
| 247 | _deviceTargetList.mask, |
| 248 | _deviceResults, |
| 249 | _deviceResultsCount); |
| 250 | _stepKernel->call(_blocks, _threads); |
| 251 | } |
| 252 | fflush(stdout); |
| 253 | |
| 254 | getResultsInternal(); |
| 255 | |
| 256 | _iterations++; |
| 257 | } catch(cl::CLException ex) { |
| 258 | throw KeySearchException(ex.msg); |
| 259 | } |
| 260 | } |
| 261 | |
| 262 | void CLKeySearchDevice::setTargetsList() |
| 263 | { |
no test coverage detected