44 #ifdef DEBUG_LinearGridInterpolator3D
48 cout <<
"LinearGridInterpolator3D called with a,b,c " << a <<
"," << b <<
"," << c << endl;
49 cout <<
" i,j,k = " << i <<
"," << j <<
"," << k
50 <<
" s,t,u = " << s <<
"," << t <<
"," << u << endl;
51 cout <<
"Node positions for " << i <<
"," << j <<
"," << k <<
" : "
53 cout <<
"Node positions for " << i+1 <<
"," << j+1 <<
"," << k+1 <<
" : "
55 cout <<
"Grid(" << i <<
"," << j <<
"," << k <<
") = " <<
grid(i, j, k) <<
" ";
56 cout <<
"Grid(" << i <<
"," << j <<
"," << k+1 <<
") = " <<
grid(i,j,k+1) << endl;
57 cout <<
"Grid(" << i <<
"," << j+1 <<
"," << k <<
") = " <<
grid(i,j+1,k) <<
" ";
58 cout <<
"Grid(" << i <<
"," << j+1 <<
"," << k+1 <<
") = " <<
grid(i,j+1,k+1) << endl;
59 cout <<
"Grid(" << i+1 <<
"," << j <<
"," << k <<
") = " <<
grid(i+1,j,k) <<
" ";
60 cout <<
"Grid(" << i+1 <<
"," << j <<
"," << k+1 <<
") = " <<
grid(i+1,j,k+1) << endl;
61 cout <<
"Grid(" << i+1 <<
"," << j+1 <<
"," << k <<
") = " <<
grid(i+1,j+1,k) <<
" ";
62 cout <<
"Grid(" << i+1 <<
"," << j+1 <<
"," << k+1 <<
") = " <<
grid(i+1,j+1,k+1) << endl;
82 #if defined(CMS_TEST_RAWSSE)
84 __m128 resultSIMD = _mm_mul_ps(_mm_set1_ps((1.
f - s) * (1.
f - t) * u), _mm_sub_ps(
grid(ind + s3).
v.vec,
grid(ind ).
v.vec));
85 resultSIMD = _mm_add_ps(resultSIMD, _mm_mul_ps(_mm_set1_ps((1.
f - s) * t * u), _mm_sub_ps(
grid(ind + s2 + s3).
v.vec,
grid(ind + s2).
v.vec)));
86 resultSIMD = _mm_add_ps(resultSIMD, _mm_mul_ps(_mm_set1_ps( s * (1.
f - t) * u), _mm_sub_ps(
grid(ind + s1 + s3).
v.vec,
grid(ind + s1 ).
v.vec)));
87 resultSIMD = _mm_add_ps(resultSIMD, _mm_mul_ps(_mm_set1_ps( s * t * u), _mm_sub_ps(
grid(ind + s1 + s2 + s3).
v.vec,
grid(ind + s1 + s2).
v.vec)));
88 resultSIMD = _mm_add_ps(resultSIMD, _mm_mul_ps(_mm_set1_ps((1.
f - s) * t ), _mm_sub_ps(
grid(ind + s2 ).
v.vec,
grid(ind ).
v.vec)));
89 resultSIMD = _mm_add_ps(resultSIMD, _mm_mul_ps(_mm_set1_ps( s * t ), _mm_sub_ps(
grid(ind + s1 + s2 ).
v.vec,
grid(ind + s1 ).
v.vec)));
90 resultSIMD = _mm_add_ps(resultSIMD, _mm_mul_ps(_mm_set1_ps( s ), _mm_sub_ps(
grid(ind + s1 ).
v.vec,
grid(ind ).
v.vec)));
91 resultSIMD = _mm_add_ps(resultSIMD,
grid(ind ).
v.vec);
99 result = result + ((1.f-
s)* t *u)*(
grid(ind +s2+s3) -
grid(ind +s2));
100 result = result + (s *(1.f-
t)*u)*(
grid(ind+s1 +s3) -
grid(ind+s1 ));
101 result = result + (s * t *u)*(
grid(ind+s1+s2+s3) -
grid(ind+s1+s2));
102 result = result + ( (1.f-
s)*t)*(
grid(ind +s2 ) -
grid(ind ));
103 result = result + ( s *
t)*(
grid(ind+s1+s2 ) -
grid(ind+s1 ));
104 result = result + (
s)*(
grid(ind+s1 ) -
grid(ind ));
105 result = result +
grid(ind );
void throwGridInterpolator3DException(void)
ReturnType interpolate(Scalar a, Scalar b, Scalar c)
int index(int i, int j, int k) const
void normalize(int &ind, Scalar &f) const
int index(Scalar a, Scalar &f) const