47 float minSAH =
min(bestSAH.x,
min(bestSAH.y, bestSAH.z));
49 if (bestSAH.x == minSAH)
51 else if (bestSAH.y == minSAH)
67 unaligned_heuristic_(unaligned_heuristic),
68 aligned_space_(aligned_space)
90 for (
size_t i = 0; i <
num_bins; i++) {
92 bin_bounds[i][0] = bin_bounds[i][1] = bin_bounds[i][2] =
BoundBox::empty;
115 bin_bounds[b00][0].
grow(bounds0);
116 int b01 = (int)extract<1>(bin0);
118 bin_bounds[b01][1].
grow(bounds0);
119 int b02 = (int)extract<2>(bin0);
121 bin_bounds[b02][2].
grow(bounds0);
126 bin_bounds[b10][0].
grow(bounds1);
127 int b11 = (int)extract<1>(bin1);
129 bin_bounds[b11][1].
grow(bounds1);
130 int b12 = (int)extract<2>(bin1);
132 bin_bounds[b12][2].
grow(bounds1);
145 bin_bounds[b00][0].
grow(bounds0);
146 int b01 = (int)extract<1>(bin0);
148 bin_bounds[b01][1].
grow(bounds0);
149 int b02 = (int)extract<2>(bin0);
151 bin_bounds[b02][2].
grow(bounds0);
164 for (
size_t i =
num_bins - 1; i > 0; i--) {
168 bx =
merge(bx, bin_bounds[i][0]);
170 by =
merge(by, bin_bounds[i][1]);
172 bz =
merge(bz, bin_bounds[i][2]);
174 r_area[i][3] = r_area[i][2];
191 bx =
merge(bx, bin_bounds[i - 1][0]);
193 by =
merge(by, bin_bounds[i - 1][1]);
195 bz =
merge(bz, bin_bounds[i - 1][2]);
200 float4 sah = lArea * lCount + r_area[i] * r_count[i];
202 bestSplit =
select(sah < bestSAH, ii, bestSplit);
203 bestSAH =
min(sah, bestSAH);
251 if (
l != 0 &&
N - 1 -
r != 0) {
265 for (
size_t i = 0; i <
N / 2; i++) {
270 for (
size_t i =
N / 2; i <
N; i++) {
NSNotificationCenter * center
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble u2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLdouble GLdouble v2 _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLdouble GLdouble nz _GL_VOID_RET _GL_VOID GLfloat GLfloat nz _GL_VOID_RET _GL_VOID GLint GLint nz _GL_VOID_RET _GL_VOID GLshort GLshort nz _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const GLfloat *values _GL_VOID_RET _GL_VOID GLsizei const GLushort *values _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID const GLuint const GLclampf *priorities _GL_VOID_RET _GL_VOID GLdouble y _GL_VOID_RET _GL_VOID GLfloat y _GL_VOID_RET _GL_VOID GLint y _GL_VOID_RET _GL_VOID GLshort y _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLfloat GLfloat z _GL_VOID_RET _GL_VOID GLint GLint z _GL_VOID_RET _GL_VOID GLshort GLshort z _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble w _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat w _GL_VOID_RET _GL_VOID GLint GLint GLint w _GL_VOID_RET _GL_VOID GLshort GLshort GLshort w _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble y2 _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat y2 _GL_VOID_RET _GL_VOID GLint GLint GLint y2 _GL_VOID_RET _GL_VOID GLshort GLshort GLshort y2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLuint *buffer _GL_VOID_RET _GL_VOID GLdouble t _GL_VOID_RET _GL_VOID GLfloat t _GL_VOID_RET _GL_VOID GLint t _GL_VOID_RET _GL_VOID GLshort t _GL_VOID_RET _GL_VOID GLdouble GLdouble r _GL_VOID_RET _GL_VOID GLfloat GLfloat r _GL_VOID_RET _GL_VOID GLint GLint r _GL_VOID_RET _GL_VOID GLshort GLshort r _GL_VOID_RET _GL_VOID GLdouble GLdouble r
__forceinline const avxb select(const avxb &m, const avxb &t, const avxb &f)
__forceinline float extract< 0 >(const avxf &a)
CCL_NAMESPACE_BEGIN __forceinline void prefetch_L1(const void *)
__forceinline float extract(const int4 &b)
__forceinline void prefetch_L2(const void *)
__forceinline void prefetch_NTA(const void *)
__forceinline void prefetch_L3(const void *)
__forceinline const float4 insert(const float4 &a, const float b)
__forceinline int get_best_dimension(const float4 &bestSAH)
ATTR_WARN_UNUSED_RESULT const BMLoop * l
__forceinline BoundBox merge(const BoundBox &bbox, const float3 &pt)
void split(BVHReference *prims, BVHObjectBinning &left_o, BVHObjectBinning &right_o) const
__forceinline const BoundBox & unaligned_bounds()
__forceinline int4 get_bin(const BoundBox &box) const
__forceinline BVHObjectBinning()
__forceinline BoundBox get_prim_bounds(const BVHReference &prim) const
__forceinline float4 blocks(const int4 &a) const
const Transform * aligned_space_
__forceinline int size() const
__forceinline int start() const
__forceinline const BoundBox & cent_bounds() const
__forceinline const BoundBox & bounds() const
__forceinline const BoundBox & bounds() const
BoundBox compute_aligned_boundbox(const BVHObjectBinning &range, const BVHReference *references, const Transform &aligned_space, BoundBox *cent_bounds=NULL) const
#define CCL_NAMESPACE_END
SyclQueue void void * src
ccl_device_inline float3 rcp(const float3 &a)
ccl_device_inline float4 zero_float4()
ccl_device_inline float4 mask(const int4 &mask, const float4 &a)
static const pxr::TfToken b("b", pxr::TfToken::Immortal)
__forceinline float half_area() const
__forceinline float3 size() const
__forceinline void grow(const float3 &pt)
__forceinline float3 center2() const
ccl_device_inline float4 float3_to_float4(const float3 a)