Text archives Help
- From: "James Bigler" <bigler@cs.utah.edu>
- To: manta@sci.utah.edu
- Subject: [Manta] r2073 - trunk/Model/Primitives
- Date: Fri, 15 Feb 2008 07:26:36 -0700 (MST)
Author: bigler
Date: Fri Feb 15 07:26:36 2008
New Revision: 2073
Modified:
trunk/Model/Primitives/SphereRTSL.cc
Log:
Model/Primitives/SphereRTSL.cc
Changed val1 + negative val2 to val1 - val2.
float t1 = t + -(r+B)*A_inv;
to
float t1 = t -(r+B)*A_inv;
Modified: trunk/Model/Primitives/SphereRTSL.cc
==============================================================================
--- trunk/Model/Primitives/SphereRTSL.cc (original)
+++ trunk/Model/Primitives/SphereRTSL.cc Fri Feb 15 07:26:36 2008
@@ -93,7 +93,7 @@
// Current scope = 7, scope for r = 7
// Current scope = 7, scope for B = 6
// scope for t1: 7
- __m128 rtsl_t1_ = _mm_add_ps(rtsl_t_,
_mm_mul_ps(_mm_xor_ps(_mm_add_ps(rtsl_r_, rtsl_B_),
_mm_castsi128_ps(_mm_set1_epi32(0x80000000))), _mm_set1_ps(rtsl_A_inv)));
+ __m128 rtsl_t1_ = _mm_sub_ps(rtsl_t_,
_mm_mul_ps(_mm_add_ps(rtsl_r_, rtsl_B_), _mm_set1_ps(rtsl_A_inv)));
// Current scope = 7, scope for t1 = 7
__m128 condmask9_section_undefined = _mm_cmple_ps(rtsl_t1_,
_mm_set1_ps(T_EPSILON));
int condintmask10_section_undefined =
_mm_movemask_ps(condmask9_section_undefined);
@@ -215,7 +215,7 @@
// Current scope = 7, scope for r = 7
// Current scope = 7, scope for B = 6
// scope for t1: 7
- __m128 rtsl_t1_ = _mm_add_ps(rtsl_t_,
_mm_mul_ps(_mm_xor_ps(_mm_add_ps(rtsl_r_, rtsl_B_),
_mm_castsi128_ps(_mm_set1_epi32(0x80000000))), _mm_set1_ps(rtsl_A_inv)));
+ __m128 rtsl_t1_ = _mm_sub_ps(rtsl_t_,
_mm_mul_ps(_mm_add_ps(rtsl_r_, rtsl_B_), _mm_set1_ps(rtsl_A_inv)));
// Current scope = 7, scope for t1 = 7
__m128 condmask9_section_undefined = _mm_cmple_ps(rtsl_t1_,
_mm_set1_ps(T_EPSILON));
int condintmask10_section_undefined =
_mm_movemask_ps(condmask9_section_undefined);
@@ -336,7 +336,7 @@
// Current scope = 7, scope for r = 7
// Current scope = 7, scope for B = 6
// scope for t1: 7
- __m128 rtsl_t1_ = _mm_add_ps(rtsl_t_,
_mm_mul_ps(_mm_xor_ps(_mm_add_ps(rtsl_r_, rtsl_B_),
_mm_castsi128_ps(_mm_set1_epi32(0x80000000))), _mm_set1_ps(rtsl_A_inv)));
+ __m128 rtsl_t1_ = _mm_sub_ps(rtsl_t_,
_mm_mul_ps(_mm_add_ps(rtsl_r_, rtsl_B_), _mm_set1_ps(rtsl_A_inv)));
// Current scope = 7, scope for t1 = 7
__m128 condmask9_section_undefined = _mm_cmple_ps(rtsl_t1_,
_mm_set1_ps(T_EPSILON));
int condintmask10_section_undefined =
_mm_movemask_ps(condmask9_section_undefined);
@@ -456,7 +456,7 @@
// Current scope = 6, scope for r = 6
// Current scope = 6, scope for B = 5
// scope for t1: 6
- __m128 rtsl_t1_ = _mm_add_ps(rtsl_t_,
_mm_mul_ps(_mm_xor_ps(_mm_add_ps(rtsl_r_, rtsl_B_),
_mm_castsi128_ps(_mm_set1_epi32(0x80000000))), _mm_set1_ps(rtsl_A_inv)));
+ __m128 rtsl_t1_ = _mm_sub_ps(rtsl_t_,
_mm_mul_ps(_mm_add_ps(rtsl_r_, rtsl_B_), _mm_set1_ps(rtsl_A_inv)));
// Current scope = 6, scope for t1 = 6
__m128 condmask9_section_undefined = _mm_cmple_ps(rtsl_t1_,
_mm_set1_ps(T_EPSILON));
int condintmask10_section_undefined =
_mm_movemask_ps(condmask9_section_undefined);
@@ -530,7 +530,7 @@
rtsl_disc = ((rtsl_B * rtsl_B) - rtsl_C);
if((rtsl_disc >= 0.f)){
Real rtsl_r = Sqrt(rtsl_disc);
- Real rtsl_t1 = (rtsl_t + ((-((rtsl_r + rtsl_B))) *
rtsl_A_inv));
+ Real rtsl_t1 = (rtsl_t - ((rtsl_r + rtsl_B) * rtsl_A_inv));
if((rtsl_t1 <= T_EPSILON)){
rtsl_t += ((rtsl_r - rtsl_B) * rtsl_A_inv);
} else {
@@ -638,7 +638,7 @@
// Current scope = 7, scope for r = 7
// Current scope = 7, scope for B = 6
// scope for t1: 7
- __m128 rtsl_t1_ = _mm_add_ps(rtsl_t_,
_mm_mul_ps(_mm_xor_ps(_mm_add_ps(rtsl_r_, rtsl_B_),
_mm_castsi128_ps(_mm_set1_epi32(0x80000000))), _mm_set1_ps(rtsl_A_inv)));
+ __m128 rtsl_t1_ = _mm_sub_ps(rtsl_t_,
_mm_mul_ps(_mm_add_ps(rtsl_r_, rtsl_B_), _mm_set1_ps(rtsl_A_inv)));
// Current scope = 7, scope for t1 = 7
__m128 condmask9_section_undefined = _mm_cmple_ps(rtsl_t1_,
_mm_set1_ps(T_EPSILON));
int condintmask10_section_undefined =
_mm_movemask_ps(condmask9_section_undefined);
@@ -762,7 +762,7 @@
// Current scope = 7, scope for r = 7
// Current scope = 7, scope for B = 6
// scope for t1: 7
- __m128 rtsl_t1_ = _mm_add_ps(rtsl_t_,
_mm_mul_ps(_mm_xor_ps(_mm_add_ps(rtsl_r_, rtsl_B_),
_mm_castsi128_ps(_mm_set1_epi32(0x80000000))), _mm_set1_ps(rtsl_A_inv)));
+ __m128 rtsl_t1_ = _mm_sub_ps(rtsl_t_,
_mm_mul_ps(_mm_add_ps(rtsl_r_, rtsl_B_), _mm_set1_ps(rtsl_A_inv)));
// Current scope = 7, scope for t1 = 7
__m128 condmask9_section_undefined = _mm_cmple_ps(rtsl_t1_,
_mm_set1_ps(T_EPSILON));
int condintmask10_section_undefined =
_mm_movemask_ps(condmask9_section_undefined);
@@ -885,7 +885,7 @@
// Current scope = 7, scope for r = 7
// Current scope = 7, scope for B = 6
// scope for t1: 7
- __m128 rtsl_t1_ = _mm_add_ps(rtsl_t_,
_mm_mul_ps(_mm_xor_ps(_mm_add_ps(rtsl_r_, rtsl_B_),
_mm_castsi128_ps(_mm_set1_epi32(0x80000000))), _mm_set1_ps(rtsl_A_inv)));
+ __m128 rtsl_t1_ = _mm_sub_ps(rtsl_t_,
_mm_mul_ps(_mm_add_ps(rtsl_r_, rtsl_B_), _mm_set1_ps(rtsl_A_inv)));
// Current scope = 7, scope for t1 = 7
__m128 condmask9_section_undefined = _mm_cmple_ps(rtsl_t1_,
_mm_set1_ps(T_EPSILON));
int condintmask10_section_undefined =
_mm_movemask_ps(condmask9_section_undefined);
@@ -1007,7 +1007,7 @@
// Current scope = 6, scope for r = 6
// Current scope = 6, scope for B = 5
// scope for t1: 6
- __m128 rtsl_t1_ = _mm_add_ps(rtsl_t_,
_mm_mul_ps(_mm_xor_ps(_mm_add_ps(rtsl_r_, rtsl_B_),
_mm_castsi128_ps(_mm_set1_epi32(0x80000000))), _mm_set1_ps(rtsl_A_inv)));
+ __m128 rtsl_t1_ = _mm_sub_ps(rtsl_t_,
_mm_mul_ps(_mm_add_ps(rtsl_r_, rtsl_B_), _mm_set1_ps(rtsl_A_inv)));
// Current scope = 6, scope for t1 = 6
__m128 condmask9_section_undefined = _mm_cmple_ps(rtsl_t1_,
_mm_set1_ps(T_EPSILON));
int condintmask10_section_undefined =
_mm_movemask_ps(condmask9_section_undefined);
@@ -1077,7 +1077,7 @@
rtsl_disc = ((rtsl_B * rtsl_B) - rtsl_C);
if((rtsl_disc >= 0.f)){
Real rtsl_r = Sqrt(rtsl_disc);
- Real rtsl_t1 = (rtsl_t + ((-((rtsl_r + rtsl_B))) *
rtsl_A_inv));
+ Real rtsl_t1 = (rtsl_t - ((rtsl_r + rtsl_B) * rtsl_A_inv));
if((rtsl_t1 <= T_EPSILON)){
rtsl_t += ((rtsl_r - rtsl_B) * rtsl_A_inv);
} else {
@@ -1196,7 +1196,7 @@
// Current scope = 7, scope for B = 6
// Current scope = 7, scope for A_inv = 5
// scope for t1: 7
- __m128 rtsl_t1_ = _mm_add_ps(rtsl_t_,
_mm_mul_ps(_mm_xor_ps(_mm_add_ps(rtsl_r_, rtsl_B_),
_mm_castsi128_ps(_mm_set1_epi32(0x80000000))), rtsl_A_inv_));
+ __m128 rtsl_t1_ = _mm_sub_ps(rtsl_t_,
_mm_mul_ps(_mm_add_ps(rtsl_r_, rtsl_B_), rtsl_A_inv_));
// Current scope = 7, scope for t1 = 7
__m128 condmask9_section_undefined = _mm_cmple_ps(rtsl_t1_,
_mm_set1_ps(T_EPSILON));
int condintmask10_section_undefined =
_mm_movemask_ps(condmask9_section_undefined);
@@ -1330,7 +1330,7 @@
// Current scope = 7, scope for B = 6
// Current scope = 7, scope for A_inv = 5
// scope for t1: 7
- __m128 rtsl_t1_ = _mm_add_ps(rtsl_t_,
_mm_mul_ps(_mm_xor_ps(_mm_add_ps(rtsl_r_, rtsl_B_),
_mm_castsi128_ps(_mm_set1_epi32(0x80000000))), rtsl_A_inv_));
+ __m128 rtsl_t1_ = _mm_sub_ps(rtsl_t_,
_mm_mul_ps(_mm_add_ps(rtsl_r_, rtsl_B_), rtsl_A_inv_));
// Current scope = 7, scope for t1 = 7
__m128 condmask9_section_undefined = _mm_cmple_ps(rtsl_t1_,
_mm_set1_ps(T_EPSILON));
int condintmask10_section_undefined =
_mm_movemask_ps(condmask9_section_undefined);
@@ -1463,7 +1463,7 @@
// Current scope = 7, scope for B = 6
// Current scope = 7, scope for A_inv = 5
// scope for t1: 7
- __m128 rtsl_t1_ = _mm_add_ps(rtsl_t_,
_mm_mul_ps(_mm_xor_ps(_mm_add_ps(rtsl_r_, rtsl_B_),
_mm_castsi128_ps(_mm_set1_epi32(0x80000000))), rtsl_A_inv_));
+ __m128 rtsl_t1_ = _mm_sub_ps(rtsl_t_,
_mm_mul_ps(_mm_add_ps(rtsl_r_, rtsl_B_), rtsl_A_inv_));
// Current scope = 7, scope for t1 = 7
__m128 condmask9_section_undefined = _mm_cmple_ps(rtsl_t1_,
_mm_set1_ps(T_EPSILON));
int condintmask10_section_undefined =
_mm_movemask_ps(condmask9_section_undefined);
@@ -1595,7 +1595,7 @@
// Current scope = 6, scope for B = 5
// Current scope = 6, scope for A_inv = 4
// scope for t1: 6
- __m128 rtsl_t1_ = _mm_add_ps(rtsl_t_,
_mm_mul_ps(_mm_xor_ps(_mm_add_ps(rtsl_r_, rtsl_B_),
_mm_castsi128_ps(_mm_set1_epi32(0x80000000))), rtsl_A_inv_));
+ __m128 rtsl_t1_ = _mm_sub_ps(rtsl_t_,
_mm_mul_ps(_mm_add_ps(rtsl_r_, rtsl_B_), rtsl_A_inv_));
// Current scope = 6, scope for t1 = 6
__m128 condmask9_section_undefined = _mm_cmple_ps(rtsl_t1_,
_mm_set1_ps(T_EPSILON));
int condintmask10_section_undefined =
_mm_movemask_ps(condmask9_section_undefined);
@@ -1672,7 +1672,7 @@
rtsl_disc = ((rtsl_B * rtsl_B) - (rtsl_A * rtsl_C));
if((rtsl_disc >= 0.f)){
Real rtsl_r = Sqrt(rtsl_disc);
- Real rtsl_t1 = (rtsl_t + ((-((rtsl_r + rtsl_B))) *
rtsl_A_inv));
+ Real rtsl_t1 = (rtsl_t - ((rtsl_r + rtsl_B) * rtsl_A_inv));
if((rtsl_t1 <= T_EPSILON)){
rtsl_t += ((rtsl_r - rtsl_B) * rtsl_A_inv);
} else {
@@ -1789,7 +1789,7 @@
// Current scope = 7, scope for B = 6
// Current scope = 7, scope for A_inv = 5
// scope for t1: 7
- __m128 rtsl_t1_ = _mm_add_ps(rtsl_t_,
_mm_mul_ps(_mm_xor_ps(_mm_add_ps(rtsl_r_, rtsl_B_),
_mm_castsi128_ps(_mm_set1_epi32(0x80000000))), rtsl_A_inv_));
+ __m128 rtsl_t1_ = _mm_sub_ps(rtsl_t_,
_mm_mul_ps(_mm_add_ps(rtsl_r_, rtsl_B_), rtsl_A_inv_));
// Current scope = 7, scope for t1 = 7
__m128 condmask9_section_undefined = _mm_cmple_ps(rtsl_t1_,
_mm_set1_ps(T_EPSILON));
int condintmask10_section_undefined =
_mm_movemask_ps(condmask9_section_undefined);
@@ -1925,7 +1925,7 @@
// Current scope = 7, scope for B = 6
// Current scope = 7, scope for A_inv = 5
// scope for t1: 7
- __m128 rtsl_t1_ = _mm_add_ps(rtsl_t_,
_mm_mul_ps(_mm_xor_ps(_mm_add_ps(rtsl_r_, rtsl_B_),
_mm_castsi128_ps(_mm_set1_epi32(0x80000000))), rtsl_A_inv_));
+ __m128 rtsl_t1_ = _mm_sub_ps(rtsl_t_,
_mm_mul_ps(_mm_add_ps(rtsl_r_, rtsl_B_), rtsl_A_inv_));
// Current scope = 7, scope for t1 = 7
__m128 condmask9_section_undefined = _mm_cmple_ps(rtsl_t1_,
_mm_set1_ps(T_EPSILON));
int condintmask10_section_undefined =
_mm_movemask_ps(condmask9_section_undefined);
@@ -2060,7 +2060,7 @@
// Current scope = 7, scope for B = 6
// Current scope = 7, scope for A_inv = 5
// scope for t1: 7
- __m128 rtsl_t1_ = _mm_add_ps(rtsl_t_,
_mm_mul_ps(_mm_xor_ps(_mm_add_ps(rtsl_r_, rtsl_B_),
_mm_castsi128_ps(_mm_set1_epi32(0x80000000))), rtsl_A_inv_));
+ __m128 rtsl_t1_ = _mm_sub_ps(rtsl_t_,
_mm_mul_ps(_mm_add_ps(rtsl_r_, rtsl_B_), rtsl_A_inv_));
// Current scope = 7, scope for t1 = 7
__m128 condmask9_section_undefined = _mm_cmple_ps(rtsl_t1_,
_mm_set1_ps(T_EPSILON));
int condintmask10_section_undefined =
_mm_movemask_ps(condmask9_section_undefined);
@@ -2194,7 +2194,7 @@
// Current scope = 6, scope for B = 5
// Current scope = 6, scope for A_inv = 4
// scope for t1: 6
- __m128 rtsl_t1_ = _mm_add_ps(rtsl_t_,
_mm_mul_ps(_mm_xor_ps(_mm_add_ps(rtsl_r_, rtsl_B_),
_mm_castsi128_ps(_mm_set1_epi32(0x80000000))), rtsl_A_inv_));
+ __m128 rtsl_t1_ = _mm_sub_ps(rtsl_t_,
_mm_mul_ps(_mm_add_ps(rtsl_r_, rtsl_B_), rtsl_A_inv_));
// Current scope = 6, scope for t1 = 6
__m128 condmask9_section_undefined = _mm_cmple_ps(rtsl_t1_,
_mm_set1_ps(T_EPSILON));
int condintmask10_section_undefined =
_mm_movemask_ps(condmask9_section_undefined);
@@ -2267,7 +2267,7 @@
rtsl_disc = ((rtsl_B * rtsl_B) - (rtsl_A * rtsl_C));
if((rtsl_disc >= 0.f)){
Real rtsl_r = Sqrt(rtsl_disc);
- Real rtsl_t1 = (rtsl_t + ((-((rtsl_r + rtsl_B))) *
rtsl_A_inv));
+ Real rtsl_t1 = (rtsl_t - ((rtsl_r + rtsl_B) * rtsl_A_inv));
if((rtsl_t1 <= T_EPSILON)){
rtsl_t += ((rtsl_r - rtsl_B) * rtsl_A_inv);
} else {
- [Manta] r2073 - trunk/Model/Primitives, James Bigler, 02/15/2008
Archive powered by MHonArc 2.6.16.