MCPcopy Create free account
hub / github.com/RedisGraph/RedisGraph / GB_nthreads

Function GB_nthreads

deps/GraphBLAS/Source/GB_nthreads.h:61–74  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59// else if work < 3*chunk, then two threads are used, and so on.
60
61static inline int GB_nthreads // return # of threads to use
62(
63 double work, // total work to do
64 double chunk, // give each thread at least this much work
65 int nthreads_max // max # of threads to use
66)
67{
68 work = GB_IMAX (work, 1) ;
69 chunk = GB_IMAX (chunk, 1) ;
70 int64_t nthreads = (int64_t) floor (work / chunk) ;
71 nthreads = GB_IMIN (nthreads, nthreads_max) ;
72 nthreads = GB_IMAX (nthreads, 1) ;
73 return ((int) nthreads) ;
74}
75
76#endif
77

Callers 15

GB_ewise_sliceFunction · 0.85
GB_selectorFunction · 0.85
GB_dense_subassign_22Function · 0.85
GB_split_bitmapFunction · 0.85
GB_AxB_dot4Function · 0.85
GB_Matrix_diagFunction · 0.85
GB_AxB_dot3_one_sliceFunction · 0.85
GB_concat_fullFunction · 0.85
GB_addFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected