| /oneTBB/include/oneapi/tbb/detail/ |
| H A D | _machine.h | 155 x |= (x >> 1); in machine_log2() 156 x |= (x >> 2); in machine_log2() 157 x |= (x >> 4); in machine_log2() 158 x |= (x >> 8); in machine_log2() 159 x |= (x >> 16); in machine_log2() 160 x |= (x >> 32); in machine_log2() 167 if( sizeof(x) > 4 && (uintptr_t tmp = x >> 32) ) { x = tmp; result += 32; } in machine_log2() 168 if( uintptr_t tmp = x >> 16 ) { x = tmp; result += 16; } in machine_log2() 169 if( uintptr_t tmp = x >> 8 ) { x = tmp; result += 8; } in machine_log2() 170 if( uintptr_t tmp = x >> 4 ) { x = tmp; result += 4; } in machine_log2() [all …]
|
| /oneTBB/examples/parallel_for/tachyon/src/ |
| H A D | apitrigeom.cpp | 59 #define MyVAddS(x, a, b, c) VAddS((flt)x, (vector *)a, (vector *)b, (vector *)c) argument 66 vector x, y, z, tmp; in rt_tri_fcylinder() local 74 tmp.x = z.y - 2.1111111; in rt_tri_fcylinder() 79 MyVCross(&z, &tmp, &x); in rt_tri_fcylinder() 80 MyVNorm(&x); in rt_tri_fcylinder() 81 MyVCross(&x, &z, &y); in rt_tri_fcylinder() 118 vector x, y, z, tmp; in rt_tri_ring() local 126 tmp.x = z.y - 2.1111111; in rt_tri_ring() 131 MyVCross(&z, &tmp, &x); in rt_tri_ring() 132 MyVNorm(&x); in rt_tri_ring() [all …]
|
| H A D | grid.cpp | 163 gmin->x = MYMIN(gmin->x, min.x); in globalbound() 167 gmax->x = MYMAX(gmax->x, max.x); in globalbound() 190 cellmax.x = cellmin.x + g->voxsize.x; in cellbound() 212 cmin->x = MYMIN(cmin->x, min.x); in cellbound() 216 cmax->x = MYMAX(cmax->x, max.x); in cellbound() 433 for (x = low.x; x <= high.x; x++) { in engrid_object() 447 index->x = (int)((pos->x - g->min.x) / g->voxsize.x); in pos2grid() 499 tdelta.x = g->voxsize.x / -ry->d.x; in grid_intersect() 504 tdelta.x = g->voxsize.x / ry->d.x; in grid_intersect() 641 if ((ry->o.x < g->min.x) || (ry->o.x > g->max.x)) in grid_bounds_intersect() [all …]
|
| H A D | texture.cpp | 69 rh.x = hit->x - tex->ctr.x; in image_cyl_texture() 95 rh.x = hit->x - tex->ctr.x; in image_sphere_texture() 121 pnt.x = hit->x - tex->ctr.x; in image_plane_texture() 170 x = x % 2; in checker_texture() 198 rh.x = hit->x - tex->ctr.x; in cyl_checker_texture() 205 x = x % 2; in cyl_checker_texture() 229 x = (hit->x - tex->ctr.x) * 1000; in wood_texture() 261 for (x = 0; x < NMAX; x++) { in InitNoise() 297 x = fabs(x); in Noise() 341 x = hit->x; in marble_texture() [all …]
|
| H A D | apigeom.cpp | 72 a.x = points[i].x - points[i - 1].x; in rt_polycylinder() 131 int x, y, addr; in rt_sheightfield() local 136 offset.x = ctr.x - (wx / 2.0); in rt_sheightfield() 145 for (x = 0; x < m; x++) { in rt_sheightfield() 153 for (x = 1; x < m; x++) { in rt_sheightfield() 154 normals[x] = normals[(n - 1) * m + x] = rt_vector(0.0, 1.0, 0.0); in rt_sheightfield() 160 for (x = 1; x < (m - 1); x++) { in rt_sheightfield() 173 for (x = 0; x < (m - 1); x++) { in rt_sheightfield() 226 long x, y; in subdivide() local 232 x = (x1 + x2) / 2; in subdivide() [all …]
|
| H A D | vector.cpp | 55 return (a->x * b->x + a->y * b->y + a->z * b->z); in VDot() 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() 65 return (flt)sqrt((a->x * a->x) + (a->y * a->y) + (a->z * a->z)); in VLength() 71 len = sqrt((a->x * a->x) + (a->y * a->y) + (a->z * a->z)); in VNorm() 73 a->x /= len; in VNorm() 80 c->x = (a->x + b->x); in VAdd() 86 c->x = (a->x - b->x); in VSub() 92 C->x = (a * A->x) + B->x; in VAddS() 100 temp.x = a->o.x + (a->d.x * t); in Raypnt() [all …]
|
| H A D | quadric.cpp | 73 q->ctr.x = 0.0; in newquadric() 91 ro.x = ry->o.x - q->ctr.x; in quadric_intersect() 95 Aq = (q->mat.a * (rd.x * rd.x)) + (2.0 * q->mat.b * rd.x * rd.y) + in quadric_intersect() 99 Bq = 2.0 * ((q->mat.a * ro.x * rd.x) + (q->mat.b * ((ro.x * rd.y) + (rd.x * ro.y))) + in quadric_intersect() 100 (q->mat.c * ((ro.x * rd.z) + (rd.x * ro.z))) + (q->mat.d * rd.x) + in quadric_intersect() 104 Cq = (q->mat.a * (ro.x * ro.x)) + (2.0 * q->mat.b * ro.x * ro.y) + in quadric_intersect() 105 (2.0 * q->mat.c * ro.x * ro.z) + (2.0 * q->mat.d * ro.x) + (q->mat.e * (ro.y * ro.y)) + in quadric_intersect() 126 N->x = (q->mat.a * (pnt->x - q->ctr.x) + q->mat.b * (pnt->y - q->ctr.y) + in quadric_normal() 129 N->y = (q->mat.b * (pnt->x - q->ctr.x) + q->mat.e * (pnt->y - q->ctr.y) + in quadric_normal() 132 N->z = (q->mat.c * (pnt->x - q->ctr.x) + q->mat.f * (pnt->y - q->ctr.y) + in quadric_normal() [all …]
|
| H A D | cylinder.cpp | 94 rc.x = ry->o.x - cyl->ctr.x; in cylinder_intersect() 105 D.x = rc.x - d * cyl->axis.x; in cylinder_intersect() 146 b.x = c.x * t + cyl->ctr.x; in cylinder_normal() 154 N->x = -N->x; in cylinder_normal() 179 mintmp.x = c->ctr.x; in fcylinder_bbox() 182 maxtmp.x = c->ctr.x + c->axis.x; in fcylinder_bbox() 186 min->x = MYMIN(mintmp.x, maxtmp.x); in fcylinder_bbox() 193 max->x = MYMAX(mintmp.x, maxtmp.x); in fcylinder_bbox() 207 rc.x = ry->o.x - cyl->ctr.x; in fcylinder_intersect() 239 tmp2.x = hit.x - cyl->ctr.x; in fcylinder_intersect() [all …]
|
| H A D | macros.hpp | 56 #define VDOT(return, a, b) return = (a.x * b.x + a.y * b.y + a.z * b.z); 59 c.x = a.o.x + (a.d.x * b); \ 64 c.x = (a.x - b.x); \ 69 c->x = (a->y * b->z) - (a->z * b->y); \ 70 c->y = (a->z * b->x) - (a->x * b->z); \ 71 c->z = (a->x * b->y) - (a->y * b->x);
|
| H A D | box.cpp | 92 if (ry->d.x == 0.0) { in box_intersect() 93 if ((ry->o.x < bx->min.x) || (ry->o.x > bx->max.x)) in box_intersect() 97 tx1 = (bx->min.x - ry->o.x) / ry->d.x; in box_intersect() 98 tx2 = (bx->max.x - ry->o.x) / ry->d.x; in box_intersect() 166 c.x = (bx->max.x + bx->min.x) / 2.0; in box_normal() 173 a.x = fabs(N->x); in box_normal() 177 N->x = 0.0; in box_normal() 181 t = MYMAX(a.x, MYMAX(a.y, a.z)); in box_normal() 183 if (t == a.x) in box_normal() 184 N->x = b.x; in box_normal()
|
| H A D | coordsys.cpp | 54 void xytopolar(flt x, flt y, flt rad, flt* u, flt* v) { in xytopolar() argument 56 r1 = x * x + y * y; in xytopolar() 59 *u = 1.0 - acos(x / sqrt(r1)) / TWOPI; in xytopolar() 61 *u = acos(x / sqrt(r1)) / TWOPI; in xytopolar() 67 r1 = pnt.x * pnt.x + pnt.y * pnt.y; in xyztocyl() 71 *u = 1.0 - acos(pnt.x / sqrt(r1)) / TWOPI; in xyztocyl() 73 *u = acos(pnt.x / sqrt(r1)) / TWOPI; in xyztocyl() 79 r1 = sqrt(pnt.x * pnt.x + pnt.y * pnt.y + pnt.z * pnt.z); in xyztospr() 84 theta = acos((pnt.x / r1) / sin(phi)) / TWOPI; in xyztospr()
|
| H A D | extvol.cpp | 105 xvol->tex->ctr.x = 0.0; in newextvol() 174 if (ry->d.x == 0.0) { in ext_volume_texture() 175 if ((ry->o.x < bx->min.x) || (ry->o.x > bx->max.x)) in ext_volume_texture() 179 tx1 = (bx->min.x - ry->o.x) / ry->d.x; in ext_volume_texture() 180 tx2 = (bx->max.x - ry->o.x) / ry->d.x; in ext_volume_texture() 247 bln.x = fabs(bx->min.x - bx->max.x); in ext_volume_texture() 257 pnt.x = ((ry->o.x + (ry->d.x * t)) - bx->min.x) / bln.x; in ext_volume_texture() 262 scalar = xvol->evaluator(pnt.x, pnt.y, pnt.z); in ext_volume_texture() 278 N.x = (xvol->evaluator(pnt.x - ddt, pnt.y, pnt.z) - in ext_volume_texture() 282 N.y = (xvol->evaluator(pnt.x, pnt.y - ddt, pnt.z) - in ext_volume_texture() [all …]
|
| H A D | bndbox.cpp | 106 if ((ry->s.x > bx->max.x) && (ry->e.x > bx->max.x)) in bndbox_intersect() 108 if ((ry->s.x < bx->min.x) && (ry->e.x < bx->min.x)) in bndbox_intersect() 125 if (ry->d.x == 0.0) { in bndbox_intersect() 126 if ((ry->o.x < bx->min.x) || (ry->o.x > bx->max.x)) in bndbox_intersect() 130 tx1 = (bx->min.x - ry->o.x) / ry->d.x; in bndbox_intersect() 131 tx2 = (bx->max.x - ry->o.x) / ry->d.x; in bndbox_intersect()
|
| H A D | triangle.cpp | 128 dest.x = v1.y * v2.z - v1.z * v2.y; \ 129 dest.y = v1.z * v2.x - v1.x * v2.z; \ 130 dest.z = v1.x * v2.y - v1.y * v2.x; 132 #define DOT(v1, v2) (v1.x * v2.x + v1.y * v2.y + v1.z * v2.z) 135 dest.x = v1.x - v2.x; \ 146 min->x = MYMIN(t->v0.x, MYMIN(v1.x, v2.x)); in tri_bbox() 150 max->x = MYMAX(t->v0.x, MYMAX(v1.x, v2.x)); in tri_bbox() 200 N->x = -N->x; in tri_normal() 223 N->x = W * trn->n0.x + U * trn->n1.x + V * trn->n2.x; in stri_normal()
|
| H A D | vol.cpp | 105 tx->ctr.x = 0.0; in newscalarvol() 169 int x, y, z; in scalar_volume_texture() local 182 if (ry->d.x == 0.0) { in scalar_volume_texture() 183 if ((ry->o.x < bx->min.x) || (ry->o.x > bx->max.x)) in scalar_volume_texture() 187 tx1 = (bx->min.x - ry->o.x) / ry->d.x; in scalar_volume_texture() 188 tx2 = (bx->max.x - ry->o.x) / ry->d.x; in scalar_volume_texture() 254 bln.x = fabs(bx->min.x - bx->max.x); in scalar_volume_texture() 258 dt = sqrt(bln.x * bln.x + bln.y * bln.y + bln.z * bln.z) / tdist; in scalar_volume_texture() 268 pnt.x = ((ry->o.x + (ry->d.x * t)) - bx->min.x) / bln.x; in scalar_volume_texture() 272 x = (int)((vol->xres - 1.5) * pnt.x + 0.5); in scalar_volume_texture() [all …]
|
| H A D | objbound.cpp | 66 gmin->x = FHUGE; in globalbound() 69 gmax->x = -FHUGE; in globalbound() 78 max.x = FHUGE; in globalbound() 84 gmin->x = MYMIN(gmin->x, min.x); in globalbound() 88 gmax->x = MYMAX(gmax->x, max.x); in globalbound() 103 if ((min->x <= omin.x) && (min->y <= omin.y) && (min->z <= omin.z) && (max->x >= omax.x) && in objinside() 156 gctr.x = ((gmax.x - gmin.x) / 2.0) + gmin.x; in octreespace() 165 cmin2.x = gctr.x; in octreespace() 174 cmax3.x = gctr.x; in octreespace() 179 cmin4.x = gctr.x; in octreespace() [all …]
|
| /oneTBB/examples/parallel_reduce/convex_hull/ |
| H A D | convex_hull.hpp | 74 T x; member 82 point(T _x, T _y) : x(_x), y(_y) {} in point() 86 return o << "(" << p.x << "," << p.y << ")"; in operator <<() 108 T r = (x * x + y * y); in GenerateRNDPoint() 113 x /= r; in GenerateRNDPoint() 119 x /= r; in GenerateRNDPoint() 124 x = (x + 1) * 0.5 * maxsize; in GenerateRNDPoint() 127 return point<T>(x, y); in GenerateRNDPoint() 144 return _istr >> _p.x >> _p.y; in operator >>() 149 return (p1.x == p2.x && p1.y == p2.y); in operator ==() [all …]
|
| /oneTBB/examples/parallel_for/game_of_life/ |
| H A D | Update_state.cpp | 239 if (cellNumber < x) { in GetAdjacentCellState() 243 if ((x * y) - cellNumber <= x) { in GetAdjacentCellState() 247 if (cellNumber % x == 0) { in GetAdjacentCellState() 251 if ((cellNumber + 1) % x == 0) { in GetAdjacentCellState() 261 return *(source + (((x * y) - x) + (cellNumber - 1))); in GetAdjacentCellState() 270 return *(source + (((x * y) - x) + cellNumber)); in GetAdjacentCellState() 276 return *(source + ((x * y) - x)); in GetAdjacentCellState() 279 return *(source + (((x * y) - x) + (cellNumber + 1))); in GetAdjacentCellState() 297 return *(source + ((cellNumber - ((x * y) - x)) + 1)); in GetAdjacentCellState() 306 return *(source + (cellNumber - ((x * y) - x))); in GetAdjacentCellState() [all …]
|
| /oneTBB/examples/task_arena/fractal/ |
| H A D | fractal.cpp | 33 double fx0, fy0, xtemp, x, y, mu; in calc_one_pixel() local 43 x = 0; in calc_one_pixel() 47 while (((x * x + y * y) <= 4) && (iter < max_iterations)) { in calc_one_pixel() 48 xtemp = x * x - y * y + fx0; in calc_one_pixel() 49 y = 2 * x * y + fy0; in calc_one_pixel() 50 x = xtemp; in calc_one_pixel() 51 mu += exp(-sqrt(x * x + y * y)); in calc_one_pixel() 79 for (int x = 0; x < size_x; ++x) { in clear() local 112 for (int x = x0; x < x1; ++x) { in render_rect() local 158 return x >= off_x && x <= off_x + size_x && y >= off_y && y <= off_y + size_y; in check_point() [all …]
|
| /oneTBB/examples/migration/recursive_fibonacci/ |
| H A D | fibonacci_two_tasks.h | 37 sum = x + y; in execute() 41 int x{ 0 }, y{ 0 }; 46 fib_computation(int n, int* x) : n(n), x(x) {} in fib_computation() 51 *x = serial_fib(n); in execute() 55 … auto& c = *this->allocate_continuation<fib_continuation>(/* children_counter = */ 2, *x); in execute() 56 task_emulation::run_task(c.create_child<fib_computation>(n - 1, &c.x)); in execute() 61 x = &c.y; in execute() 68 int* x; member
|
| /oneTBB/test/common/ |
| H A D | test.h | 26 #define TBB_TEST_THROW(x) throw x argument 29 #define TBB_TEST_THROW(x) FAIL("Exceptions are disabled") argument 34 #define CHECK_FAST(x) do { if (!(x)) { CHECK(false); } } while((void)0, 0) argument 35 #define CHECK_FAST_MESSAGE(x, y) do { if (!(x)) { CHECK_MESSAGE(false, y); } } while((void)0, 0) argument
|
| /oneTBB/examples/common/gui/ |
| H A D | macvideo.cpp | 62 bool video::init_window(int x, int y) { in init_window() argument 63 g_sizex = x; in init_window() 65 g_pImg = new unsigned int[x * y]; in init_window() 137 extern "C" void on_mouse_func(int x, int y, int k) { in on_mouse_func() argument 138 g_video->on_mouse(x, y, k); in on_mouse_func() 142 extern "C" void on_key_func(int x) { in on_key_func() argument 143 g_video->on_key(x); in on_key_func() 168 : base_index(y * g_sizex + x), in drawing_area() 173 start_x(x), in drawing_area() 177 assert(x < g_sizex); in drawing_area() [all …]
|
| H A D | convideo.cpp | 61 bool video::init_window(int x, int y) { in init_window() argument 62 g_sizex = x; in init_window() 64 g_pImg = new unsigned int[x * y]; in init_window() 130 drawing_area::drawing_area(int x, int y, int sizex, int sizey) in drawing_area() argument 131 : base_index(y * g_sizex + x), in drawing_area() 136 start_x(x), in drawing_area() 140 assert(x < g_sizex); in drawing_area() 142 assert(x + sizex <= g_sizex); in drawing_area()
|
| /oneTBB/examples/parallel_for_each/parallel_preorder/ |
| H A D | Matrix.hpp | 31 friend Matrix operator-(const Matrix& x) { in operator -() argument 35 result.array[i][j] = -x.array[i][j]; in operator -() 38 friend Matrix operator+(const Matrix& x, const Matrix& y) { in operator +() argument 42 result.array[i][j] = x.array[i][j] + y.array[i][j]; in operator +() 45 friend Matrix operator-(const Matrix& x, const Matrix& y) { in operator -() argument 49 result.array[i][j] = x.array[i][j] - y.array[i][j]; in operator -() 52 friend Matrix operator*(const Matrix& x, const Matrix& y) { in operator *() argument 57 result.array[i][j] += x.array[i][k] * y.array[k][j]; in operator *()
|
| /oneTBB/test/conformance/ |
| H A D | conformance_blocked_range.cpp | 40 AbstractValueType x; in MakeAbstractValueType() local 41 x.value = i; in MakeAbstractValueType() 42 return x; in MakeAbstractValueType() 58 for( int x=-10; x<10; ++x ) { in SerialTest() local 60 AbstractValueType i = MakeAbstractValueType(x); in SerialTest() 70 CHECK( r.empty()==(y<=x)); in SerialTest() 72 if( x<=y ) { in SerialTest() 74 CHECK( r.is_divisible()==(std::size_t(y-x)>k) ); in SerialTest() 75 CHECK( r.size()==std::size_t(y-x) ); in SerialTest() 78 CHECK( GetValueOf(r.begin())==x ); in SerialTest()
|