| /oneTBB/examples/task_group/sudoku/ |
| H A D | sudoku.cpp | 99 b[i].solved_element = b[i].potential_set = 0; in init_board() 105 b[i].potential_set = 0; in init_board() 150 if (!in_row(b, row, col, potential) && !in_col(b, row, col, potential) && in calculate_potentials() 163 if (in_row(b, row, col, b[i].solved_element) || in valid_board() 164 in_col(b, row, col, b[i].solved_element) || in valid_board() 165 in_block(b, row, col, b[i].solved_element)) in valid_board() 175 if (b[i].solved_element == 0 && b[i].potential_set == 0) // empty set in examine_potentials() 226 return valid_board(b); in examine_potentials() 232 if (fixed_board(b)) { in partial_solve() 236 print_board(b); in partial_solve() [all …]
|
| /oneTBB/examples/parallel_for/tachyon/src/ |
| H A D | macros.hpp | 53 #define MYMAX(a, b) ((a) > (b) ? (a) : (b)) argument 54 #define MYMIN(a, b) ((a) < (b) ? (a) : (b)) argument 56 #define VDOT(return, a, b) return = (a.x * b.x + a.y * b.y + a.z * b.z); argument 61 c.z = a.o.z + (a.d.z * b); 63 #define VSUB(a, b, c) \ argument 64 c.x = (a.x - b.x); \ 65 c.y = (a.y - b.y); \ 66 c.z = (a.z - b.z); 69 c->x = (a->y * b->z) - (a->z * b->y); \ 70 c->y = (a->z * b->x) - (a->x * b->z); \ [all …]
|
| H A D | vector.cpp | 55 return (a->x * b->x + a->y * b->y + a->z * b->z); in VDot() 59 c->x = (a->y * b->z) - (a->z * b->y); in VCross() 60 c->y = (a->z * b->x) - (a->x * b->z); in VCross() 61 c->z = (a->x * b->y) - (a->y * b->x); in VCross() 114 a->r += b->r * s; in ColorAddS() 115 a->g += b->g * s; in ColorAddS() 116 a->b += b->b * s; in ColorAddS() 120 a->r += b->r; in ColorAccum() 121 a->g += b->g; in ColorAccum() 122 a->b += b->b; in ColorAccum() [all …]
|
| H A D | box.cpp | 61 *min = b->min; in box_bbox() 62 *max = b->max; in box_bbox() 73 box *b; in newbox() local 79 b->min = min; in newbox() 80 b->max = max; in newbox() 82 return b; in newbox() 163 vector a, b, c; in box_normal() local 171 b = (*N); in box_normal() 184 N->x = b.x; in box_normal() 187 N->y = b.y; in box_normal() [all …]
|
| H A D | bndbox.cpp | 66 bndbox *b; in newbndbox() local 70 b->min = min; in newbndbox() 71 b->max = max; in newbndbox() 74 b->objlist = nullptr; in newbndbox() 75 b->tex = nullptr; in newbndbox() 76 b->nextobj = nullptr; in newbndbox() 77 return b; in newbndbox() 83 *min = b->min; in bndbox_bbox() 84 *max = b->max; in bndbox_bbox() 90 bndbox *b = (bndbox *)v; in free_bndbox() local [all …]
|
| H A D | parse.cpp | 79 l = strlen(b); in stringcmp() 239 float a, b, c; in GetScenedefs() local 279 Ccenter.y = b; in GetScenedefs() 285 Cview.y = b; in GetScenedefs() 291 Cup.y = b; in GetScenedefs() 366 v1->y = b; in GetVector() 380 c1->b = b; in GetColor() 526 scenebackcol.b = b; in GetBackGnd() 688 float a, b; in GetRing() local 762 float a, b; in GetLandScape() local [all …]
|
| H A D | light.cpp | 84 flt b, disc, t1, t2, temp; in light_intersect() local 92 VDOT(b, V, ry->d); in light_intersect() 95 disc = b * b + l->rad * l->rad - temp; in light_intersect() 101 t2 = b + disc; in light_intersect() 106 t1 = b - disc; in light_intersect()
|
| H A D | extvol.cpp | 66 box *b = (box *)obj; in extvol_bbox() local 68 *min = b->min; in extvol_bbox() 69 *max = b->max; in extvol_bbox() 144 col.b = 1.0 - (scalar / 2.0); in ExtVoxelColor() 166 col.b = 0.0; in ext_volume_texture() 271 col.b += transval * col2.b * xvol->ambient; in ext_volume_texture() 294 diffint.b = 0.0; in ext_volume_texture() 308 diffint.b += inten * li->tex->col.b; in ext_volume_texture() 313 col.b += col2.b * diffint.b * xvol->diffuse; in ext_volume_texture() 330 col.b += transcol.b; /* transmission total.. */ in ext_volume_texture()
|
| H A D | sphere.cpp | 93 flt b, disc, t1, t2, temp; in sphere_intersect() local 97 VDOT(b, V, ry->d); in sphere_intersect() 100 disc = b * b + spr->rad * spr->rad - temp; in sphere_intersect() 106 t2 = b + disc; in sphere_intersect() 111 t1 = b - disc; in sphere_intersect()
|
| H A D | imap.cpp | 104 colx.b = (flt)((flt)ptr[2] + px * ((flt)ptr2[2] - (flt)ptr[2])) / 255.0; in ImageMap() 111 colx2.b = ((flt)ptr[2] + px * ((flt)ptr2[2] - (flt)ptr[2])) / 255.0; in ImageMap() 115 col.b = colx.b + py * (colx2.b - colx.b); in ImageMap() 120 col.b = 0.0; in ImageMap()
|
| H A D | vol.cpp | 65 box *b = (box *)obj; in scalarvol_bbox() local 67 *min = b->min; in scalarvol_bbox() 68 *max = b->max; in scalarvol_bbox() 142 col.b = 0.0; in VoxelColor() 148 col.b = 0.0; in VoxelColor() 153 col.b = (scalar - 0.75) * 4.0; in VoxelColor() 177 col.b = 0.0; in scalar_volume_texture() 289 col.b += transval * col2.b; in scalar_volume_texture() 305 col.b += transcol.b; /* transmission total.. */ in scalar_volume_texture()
|
| /oneTBB/test/tbb/ |
| H A D | test_buffer_node.cpp | 50 parallel_puts( tbb::flow::buffer_node<T> &b ) : my_b(b) {} in parallel_puts() 104 parallel_gets( tbb::flow::buffer_node<T> &b, touches<T> &t) : my_b(b), my_touches(t) {} in parallel_gets() 122 parallel_put_get( tbb::flow::buffer_node<T> &b, touches<T> &t ) : my_b(b), my_touches(t) {} in parallel_put_get() 154 tbb::flow::buffer_node<T> b(g); in test_reservation() local 156 b.try_put(T(1)); in test_reservation() 157 b.try_put(T(2)); in test_reservation() 158 b.try_put(T(3)); in test_reservation() 213 spin_try_get( b, j ); in test_parallel() 249 tbb::flow::make_edge( b, b2 ); in test_parallel() 344 spin_try_get( b, j ); in test_serial() [all …]
|
| H A D | test_broadcast_node.cpp | 85 tbb::flow::broadcast_node<T> b(g); in test_serial_broadcasts() local 93 tbb::flow::make_edge( b, *receivers[r] ); in test_serial_broadcasts() 97 CHECK_MESSAGE( b.try_put( (T)n ), "" ); in test_serial_broadcasts() 104 tbb::flow::remove_edge( b, *receivers[r] ); in test_serial_broadcasts() 106 CHECK_MESSAGE( b.try_put( (T)0 ), "" ); in test_serial_broadcasts() 120 native_body( tbb::flow::broadcast_node<T> &b ) : my_b(b) {} in native_body() argument 138 tbb::flow::make_edge( b, *receivers[r] ); in run_parallel_broadcasts() 149 CHECK_MESSAGE( b.try_put( (T)0 ), "" ); in run_parallel_broadcasts() 159 tbb::flow::broadcast_node<T> b(g); in test_parallel_broadcasts() local 160 run_parallel_broadcasts(g, p, b); in test_parallel_broadcasts() [all …]
|
| H A D | test_collaborative_call_once.cpp | 256 auto setB = [&b]() { b = true; }; in __anon8532fc100802() 258 b = true; in __anon8532fc100902() 264 REQUIRE(b); 266 b = false; 268 REQUIRE(b); 270 b = false; 272 REQUIRE(b); 274 b = false; 276 REQUIRE(!b); 278 b = false; [all …]
|
| H A D | test_openmp.cpp | 37 void SerialConvolve( data_type c[], const data_type a[], int m, const data_type b[], int n ) { in SerialConvolve() argument 43 sum += a[j] * b[i - j]; in SerialConvolve() 60 InnerBody( data_type /*c*/[], const data_type a[], const data_type b[], int ii ) : in InnerBody() argument 61 my_a(a), my_b(b), i(ii), sum(0) in InnerBody() 79 void OpenMP_TBB_Convolve( data_type c[], const data_type a[], int m, const data_type b[], int n, in… in OpenMP_TBB_Convolve() argument 87 InnerBody body(c, a, b, i); in OpenMP_TBB_Convolve() 109 OuterBody( data_type c[], const data_type a[], int m_, const data_type b[], int n_, int p_ ) : in OuterBody() argument 110 my_a(a), my_b(b), my_c(c), m(m_), n(n_), p(p_) in OuterBody() 126 void TBB_OpenMP_Convolve( data_type c[], const data_type a[], int m, const data_type b[], int n, in… in TBB_OpenMP_Convolve() argument 127 tbb::parallel_for(tbb::blocked_range<int>(0, m + n - 1, 10), OuterBody(c, a, m, b, n, p)); in TBB_OpenMP_Convolve()
|
| H A D | test_join_node_preview.cpp | 44 auto b = [](msg_t) { return msg_t(); }; in jn_follows_and_precedes() local 52 (messages_for_follows, b, b, b); in jn_follows_and_precedes() 62 (messages_for_precedes, b, b, b); in jn_follows_and_precedes()
|
| /oneTBB/examples/graph/cholesky/ |
| H A D | cholesky.cpp | 82 for (int A_j = j * b, T_j = 0; T_j < b; ++A_j, ++T_j) { in create_tile_array() 232 dpotf2(&uplo, &b, A_block, &b, &info); in call_dpotf2() 241 dtrsm(&side, &uplo, &transa, &diag, &b, &b, &alpha, L_block, &b, A_block, &b); in call_dtrsm() 254 dsyrk(&uplo, &transa, &b, &b, &alpha, L_block, &b, &beta, A_block, &b); in call_dsyr2k() 259 dgemm(&transa, &transb, &b, &b, &b, &alpha, L1_block, &b, L2_block, &b, &beta, A_block, &b); in call_dsyr2k() 326 int b; member in dpotf2_body 339 dpotf2(&uplo, &b, A_block, &b, &info); in operator ()() 353 int b; member in dtrsm_body 370 dtrsm(&side, &uplo, &transa, &diag, &b, &b, &alpha, L_block, &b, A_block, &b); in operator ()() 390 int b; member in dsyr2k_body [all …]
|
| /oneTBB/python/tbb/ |
| H A D | api.i | 92 barrier_data b; variable 93 b.worker_threads = 0; 94 b.full_threads = threads-1; 95 for(int i = 0; i < b.full_threads; i++) 96 tg.run([&b]{ 98 if(++b.worker_threads >= b.full_threads) 99 b.event.notify_all(); 100 else while(b.worker_threads < b.full_threads) 101 b.event.wait(lock); 103 std::unique_lock<std::mutex> lock(b.m); [all …]
|
| /oneTBB/examples/graph/fgbzip2/ |
| H A D | bzlib.hpp | 168 BZ_EXTERN void BZ_API(BZ2_bzReadClose)(int* bzerror, BZFILE* b); 170 BZ_EXTERN void BZ_API(BZ2_bzReadGetUnused)(int* bzerror, BZFILE* b, void** unused, int* nUnused); 172 BZ_EXTERN int BZ_API(BZ2_bzRead)(int* bzerror, BZFILE* b, void* buf, int len); 177 BZ_EXTERN void BZ_API(BZ2_bzWrite)(int* bzerror, BZFILE* b, void* buf, int len); 180 BZFILE* b, 186 BZFILE* b, 227 BZ_EXTERN int BZ_API(BZ2_bzread)(BZFILE* b, void* buf, int len); 229 BZ_EXTERN int BZ_API(BZ2_bzwrite)(BZFILE* b, void* buf, int len); 231 BZ_EXTERN int BZ_API(BZ2_bzflush)(BZFILE* b); 233 BZ_EXTERN void BZ_API(BZ2_bzclose)(BZFILE* b); [all …]
|
| /oneTBB/examples/test_all/fibonacci/ |
| H A D | fibonacci.cpp | 82 value a = 0, b = 1, sum; in SerialFib() local 85 sum = a + b; in SerialFib() 86 a = b; in SerialFib() 87 b = sum; in SerialFib() 351 parallel_reduceFibBody b; in parallel_reduceFib() local 354 return b.sum.v[0][0]; in parallel_reduceFib() 371 output(b.output) {} in parallel_scanFibBody() 382 product = b.product; in assign() 401 parallel_scanFibBody b(output); in parallel_scanFib() local 407 return b.product.v[0][1]; in parallel_scanFib() [all …]
|
| /oneTBB/doc/main/tbb_userguide/ |
| H A D | use_nested_algorithms.rst | 41 double *b = new double[N]; 43 b[i] = f1(a[i]); 45 return b; 48 double *b = new double[N]; 50 b[i] = f2(a[i]); 52 return b; 55 []( double *b ) -> double * { 56 return consume_f1(b); 59 []( double *b ) -> double * { 60 return consume_f2(b);
|
| H A D | use_nested_flow_graphs.rst | 9 two nodes, ``a`` and ``b``. When node ``a`` receives a message, it constructs and 10 executes an inner dependence graph. When node ``b`` receives a message, it 32 function_node< int, int > b( g, unlimited, []( int i ) -> int { 58 make_edge( a, b ); 68 example above, for example, to have node ``b`` reuse a graph that is 113 function_node< int, int > b( g, unlimited, [&]( int i ) -> int { 118 make_edge( a, b ); 126 invocation of ``b``'s body in our modified code, if you wish for this ``b``'s 128 of ``b``, it was necessary to call ``h.wait_for_all`` at the end of each 130 would be valid in the body of ``b`` above to call ``m1.try_put(i)`` and then
|
| /oneTBB/test/conformance/ |
| H A D | conformance_parallel_scan.cpp | 54 Body( Body& b, oneapi::tbb::split ): identity(b.identity), sum(b.identity), y(b.y), z(b.z) {} in Body() argument 56 void assign( Body& b ) { sum = b.sum; } in assign() argument 131 [](std::size_t a, std::size_t b) -> std::size_t 133 return a + b; in __anonb56fb5590202()
|
| /oneTBB/include/oneapi/tbb/ |
| H A D | concurrent_hash_map.h | 290 add_to_bucket( b, n ); in insert_new_node() 472 if( b && !map_base::is_valid(n) ) in hash_map_iterator() 560 my_midpoint = Iterator(*my_begin.my_map,m,b,b->node_list.load(std::memory_order_relaxed)); in set_midpoint() 966 __TBB_ASSERT((b&(b-1))==0, nullptr); // zero or power of 2 in __TBB_requires() 968 for(; b <= mask; b++, bp++ ) { in __TBB_requires() 1296 while ( !b.is_writer() && !b.upgrade_to_writer() ) { // TODO: improved insertion in __TBB_requires() 1338 b.release(); in __TBB_requires() 1444 } else if (!b.is_writer() && !b.upgrade_to_writer()) { in __TBB_requires() 1591 n = search_bucket( key, b ); in __TBB_requires() 1646 { return !(a == b); } [all …]
|
| /oneTBB/examples/parallel_for/polygon_overlay/ |
| H A D | rpolygon.hpp | 45 RPolygon(int xMin, int yMin, int xMax, int yMax, int r = -1, int g = -1, int b = -1) in RPolygon() argument 53 m_b = (colorcomp_t)b; in RPolygon() 143 bool operator<(const RPolygon &a, const RPolygon &b) { in operator <() argument 144 if (a.ymin() > b.ymin()) in operator <() 146 if (a.ymin() < b.ymin()) in operator <() 148 return a.xmin() < b.xmin(); in operator <() 151 extern bool operator<(const RPolygon &a, const RPolygon &b);
|