MCPcopy Create free account
hub / github.com/pydata/numexpr / vm_engine_iter_outer_reduce_task

Function vm_engine_iter_outer_reduce_task

numexpr3/interpreter.cpp:304–336  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

302}
303
304static int
305vm_engine_iter_outer_reduce_task(NpyIter *iter,
306 const NumExprObject *params, int *pc_error, char **errorMessage)
307{
308 NpyIter_IterNextFunc *iterNext;
309 npy_intp task_size, *sizePtr;
310 char **iterDataPtr;
311 npy_intp *iterStrides;
312
313 iterNext = NpyIter_GetIterNext(iter, errorMessage);
314 if (iterNext == NULL) {
315 return -1;
316 }
317
318 sizePtr = NpyIter_GetInnerLoopSizePtr(iter);
319 iterDataPtr = NpyIter_GetDataPtrArray(iter);
320 iterStrides = NpyIter_GetInnerStrideArray(iter);
321
322 task_size = *sizePtr;
323 // First do all the blocks with a compile-time fixed size.
324 // This makes a big difference (30-50% on some tests).
325 // RAM: Not-so-much with vectorized loops
326
327 while( task_size > 0 ) {
328#define NO_OUTPUT_BUFFERING
329#include "interp_body_GENERATED.cpp"
330#undef NO_OUTPUT_BUFFERING
331 iterNext(iter);
332 task_size = *sizePtr;
333 }
334
335 return 0;
336}
337
338// Parallel iterator version of VM engine
339// This function fills out the global state and then unlocks the mutexes

Callers 1

run_interpreterFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…