#include "camtypes.h"
Go to the source code of this file.
Functions | |
DECLARE_SOURCE ("$Revision: 1282 $") | |
xlong | operator+ (const xlong &operand1, const xlong &operand2) |
Overloading the addition operator for XLONGs. | |
xlong | operator+ (const xlong &operand1, INT32 operand2) |
Overloading the addition operator for XLONGs. | |
xlong | operator- (const xlong &operand1, const xlong &operand2) |
Overloading the subtract operator for XLONGs. | |
xlong | operator- (const xlong &operand1, INT32 operand2) |
Overloading the subtract operator for XLONGs. | |
xlong | operator- (const xlong &input) |
Overloading the negation operator for XLONGs. | |
xlong | operator * (const xlong &operand1, const xlong &operand2) |
Overloading the multiplication operator for XLONGs. | |
xlong | operator * (const xlong &operand1, INT32 operand2) |
Overloading the multiplication operator for XLONGs. | |
xlong | operator * (const xlong &operand1, FIXED16 operand2) |
Overloading the multiplication operator for XLONGs and FIXED16s. | |
xlong | operator/ (const xlong &operand1, const xlong &operand2) |
Overloading the division operator for XLONGs. | |
xlong | operator/ (const xlong &operand1, INT32 operand2) |
Overloading the division operator for XLONGs. | |
xlong | operator/ (const xlong &operand1, const fixed16 &operand2) |
Overloading the division operator for XLONGs. | |
xlong | operator>> (const xlong &operand, UINT32 shift) |
Overloading the >> operator to mean shift right for XLONGs. | |
xlong | operator<< (const xlong &operand, UINT32 shift) |
Overloading the << operator to mean shift left for XLONGs. | |
xlong & | operator *= (xlong &xl, fixed16 fix) |
Overloading the times-equals operator for XLONGs, multiplying by a fixed16. | |
INT32 | operator== (const xlong &first, const xlong &second) |
Overloading the postfix equality operator for XLONGs. | |
INT32 | operator== (const xlong &first, INT32 second) |
Overloading the postfix equality operator for XLONGs. | |
INT32 | operator!= (const xlong &first, const xlong &second) |
Overloading the postfix inequality operator for XLONGs. | |
INT32 | operator!= (const xlong &first, INT32 second) |
Overloading the postfix inequality operator for XLONGs. | |
INT32 | operator< (const xlong &first, const xlong &second) |
Overloading the postfix less-than operator for XLONGs. | |
INT32 | operator< (const xlong &first, INT32 second) |
Overloading the postfix less-than operator for XLONGs. | |
INT32 | operator> (const xlong &first, const xlong &second) |
Overloading the postfix greater-than operator for XLONGs. | |
INT32 | operator> (const xlong &first, INT32 second) |
Overloading the postfix greater-than operator for XLONGs. | |
INT32 | operator<= (const xlong &first, const xlong &second) |
Overloading the postfix less-than--or-equal operator for XLONGs. | |
INT32 | operator<= (const xlong &first, INT32 second) |
Overloading the postfix less-than--or-equal operator for XLONGs. | |
INT32 | operator>= (const xlong &first, const xlong &second) |
Overloading the postfix greater-than--or-equal operator for XLONGs. | |
INT32 | operator>= (const xlong &first, INT32 second) |
Overloading the postfix greater-than--or-equal operator for XLONGs. | |
void | XlongAdd (const xlong &input1, const xlong &input2, xlong &result) |
64-bit signed addition | |
void | XlongAddOne (const xlong &input, xlong &result) |
void | XlongSub (const xlong &input1, const xlong &input2, xlong &result) |
64-bit signed subtraction | |
void | XlongSubOne (const xlong &input, xlong &result) |
void | XlongNegOne (xlong &arg) |
64-bit signed negation | |
INT32 | Mul32Div32 (INT32 mul1, INT32 mul2, INT32 divisor) |
To avoid losing precision. | |
void | XMul32 (INT32 mul1, INT32 mul2, xlong &result) |
To avoid losing precision. | |
void | XMul64 (const xlong &m1, const xlong &m2, xlong &result) |
Private to ccmath.h. Primitive for operator overloading. | |
void | XlongMulOne (const xlong &m, xlong &result) |
void | longToXlong (const INT32 input, xlong &result) |
Private to ccmath.h. Primitive for operator overloading. | |
INT32 | XlongTolong (const xlong &input) |
Private to ccmath.cpp. Primitive for operator overloading. | |
void | XlongAsl64 (const xlong &input, INT32 shift, xlong &result) |
Private to ccmath.cpp. Primitive for operator overloading. | |
void | XlongAsl64One (INT32 shift, xlong &result) |
void | XlongAsr64 (const xlong &input, INT32 shift, xlong &result) |
Private to ccmath.cpp. Primitive for operator overloading. | |
void | XlongAsr64One (INT32 shift, xlong &result) |
INT32 | XlongCmpGT (const xlong &first, const xlong &second) |
Private to ccmath.cpp. Primitive for operator overloading. | |
INT32 | XlongCmpGE (const xlong &first, const xlong &second) |
INT32 | XlongCmpLT (const xlong &first, const xlong &second) |
INT32 | XlongCmpLE (const xlong &first, const xlong &second) |
INT32 | XlongCmpEQ (const xlong &first, const xlong &second) |
INT32 | XlongCmpNE (const xlong &first, const xlong &second) |
void | XlongIncrement (xlong &input) |
Private to ccmath.cpp. Primitive for operator overloading. This is much more efficient than calling Add with a 1 as a second parameter. | |
void | XlongDecrement (xlong &input) |
Private to ccmath.cpp. Primitive for operator overloading. This is much more efficient than calling Sub with a 1 as a second parameter. | |
void | XDiv64 (xlong &top, xlong &bottom, xlong &result) |
Private to ccmath.cpp. Primitive for operator overloading. | |
void | XDiv64One (xlong &bottom, xlong &result) |
void | XlongToAscii (const xlong &arg, LPSTR dest) |
Display xlongs in meaningful format. | |
void | XlongToUnicode (const xlong &arg, WCHAR *dest) |
void | XMatrixCalc (fixed16 fix1, const xlong &l1, fixed16 fix2, const xlong &l2, xlong &result) |
Matrix multiply primitive done using intermediate 128-bit results so full accuracy is maintained. Special cases are when fix1 or fix2 are 0.0 or 1.0 as multiplications may be avoided (NOT YET IMPLEMENTED) Note that the result is rounded to the nearest integer. | |
void | XlongByFixed16One (xlong *x1, fixed16 fix) |
Multiplying without losing precision. Private function used by operator overloading on *=. | |
double | XlongToDouble (const xlong &x) |
Conversion between types. Private to ccmaths.h which has a better interface on top of this. | |
void | DoubleToXlong (const double arg, xlong &x) |
Conversion between types. Private to ccmaths.h which has a better interface on top of this. |
|
|
|
Conversion between types. Private to ccmaths.h which has a better interface on top of this.
Definition at line 2166 of file xlong.cpp. 02167 { 02168 x = (xlong)arg ; 02169 }
|
|
Private to ccmath.h. Primitive for operator overloading.
Definition at line 1844 of file xlong.cpp.
|
|
To avoid losing precision.
Definition at line 1775 of file xlong.cpp. 01776 { 01777 // return MulDiv(mul1,mul2,divisor) ; 01778 return INT32(((xlong)mul1*mul2)/divisor) ; 01779 }
|
|
Overloading the multiplication operator for XLONGs and FIXED16s.
Definition at line 464 of file xlong.cpp. 00465 { 00466 xlong temp = operand1; 00467 00468 XlongByFixed16One( &temp, operand2 ); // more efficient to pass 1 ptr than 2 00469 00470 return temp; 00471 }
|
|
Overloading the multiplication operator for XLONGs.
Definition at line 402 of file xlong.cpp. 00403 { 00404 xlong result = operand1; 00405 xlong temp; 00406 00407 LongToXlong(operand2, temp); 00408 00409 XMul64One(temp, result); 00410 00411 return result; 00412 }
|
|
Overloading the multiplication operator for XLONGs.
Definition at line 373 of file xlong.cpp. 00374 { 00375 xlong result = operand1; 00376 00377 XMul64One(operand2, result); 00378 00379 return result; 00380 }
|
|
Overloading the times-equals operator for XLONGs, multiplying by a fixed16.
Definition at line 911 of file xlong.cpp. 00912 { 00913 XlongByFixed16One( &xl, fix ); 00914 return xl; 00915 }
|
|
Overloading the postfix inequality operator for XLONGs.
Definition at line 1272 of file xlong.cpp. 01273 { 01274 xlong temp; 01275 01276 LongToXlong(second, temp); 01277 01278 return XlongCmpNE(first, temp); 01279 }
|
|
Overloading the postfix inequality operator for XLONGs.
Definition at line 1246 of file xlong.cpp. 01247 { 01248 return XlongCmpNE(first, second); 01249 }
|
|
Overloading the addition operator for XLONGs.
Definition at line 191 of file xlong.cpp. 00192 { 00193 xlong result = operand1; 00194 xlong temp; 00195 00196 LongToXlong(operand2, temp); 00197 00198 XlongAddOne(temp, result); 00199 00200 return result; 00201 }
|
|
Overloading the addition operator for XLONGs.
Definition at line 161 of file xlong.cpp. 00162 { 00163 xlong result = operand1; 00164 00165 XlongAddOne(operand2, result); 00166 00167 return result; 00168 }
|
|
Overloading the negation operator for XLONGs.
Definition at line 345 of file xlong.cpp. 00346 { 00347 xlong temp; 00348 00349 XlongNegOne( temp = input ); 00350 return temp; 00351 }
|
|
Overloading the subtract operator for XLONGs.
Definition at line 285 of file xlong.cpp. 00286 { 00287 xlong result = operand1; 00288 xlong temp; 00289 00290 LongToXlong(operand2, temp); 00291 00292 XlongSubOne(temp, result); 00293 00294 return result; 00295 }
|
|
Overloading the subtract operator for XLONGs.
Definition at line 256 of file xlong.cpp. 00257 { 00258 xlong result = operand1; 00259 00260 XlongSubOne(operand2, result); 00261 00262 return result; 00263 }
|
|
Overloading the division operator for XLONGs.
Definition at line 590 of file xlong.cpp. 00591 { 00592 xlong result; 00593 00594 result = operand1; 00595 00596 // XlongByFixed16One(&result, operand2); 00597 ENSURE( FALSE, "You are using the XLONG / operator which actually multiplies!" ); 00598 00599 return result; 00600 }
|
|
Overloading the division operator for XLONGs.
Definition at line 524 of file xlong.cpp. 00525 { 00526 xlong result = operand1; 00527 xlong temp; 00528 00529 LongToXlong(operand2, temp); 00530 00531 XDiv64One(temp, result); 00532 00533 return result; 00534 }
|
|
Overloading the division operator for XLONGs.
Definition at line 495 of file xlong.cpp. 00496 { 00497 xlong result = operand1; 00498 00499 XDiv64One(operand2, result); 00500 00501 return result; 00502 }
|
|
Overloading the postfix less-than operator for XLONGs.
Definition at line 1358 of file xlong.cpp. 01359 { 01360 xlong temp; 01361 01362 LongToXlong(second, temp); 01363 01364 return XlongCmpLT(first, temp); 01365 }
|
|
Overloading the postfix less-than operator for XLONGs.
Definition at line 1332 of file xlong.cpp. 01333 { 01334 return XlongCmpLT(first, second); 01335 }
|
|
Overloading the << operator to mean shift left for XLONGs.
Definition at line 654 of file xlong.cpp. 00655 { 00656 xlong result = operand; 00657 00658 XlongAsl64One(shift, result); 00659 00660 return result; 00661 }
|
|
Overloading the postfix less-than--or-equal operator for XLONGs.
Definition at line 1530 of file xlong.cpp. 01531 { 01532 xlong temp; 01533 01534 LongToXlong(second, temp); 01535 01536 return XlongCmpLE(first, temp); 01537 }
|
|
Overloading the postfix less-than--or-equal operator for XLONGs.
Definition at line 1504 of file xlong.cpp. 01505 { 01506 return XlongCmpLE(first, second); 01507 }
|
|
Overloading the postfix equality operator for XLONGs.
Definition at line 1186 of file xlong.cpp. 01187 { 01188 xlong temp; 01189 01190 LongToXlong(second, temp); 01191 01192 return XlongCmpEQ(first, temp); 01193 }
|
|
Overloading the postfix equality operator for XLONGs.
Definition at line 1160 of file xlong.cpp. 01161 { 01162 return XlongCmpEQ(first, second); 01163 }
|
|
Overloading the postfix greater-than operator for XLONGs.
Definition at line 1444 of file xlong.cpp. 01445 { 01446 xlong temp; 01447 01448 LongToXlong(second, temp); 01449 01450 return XlongCmpGT(first, temp); 01451 }
|
|
Overloading the postfix greater-than operator for XLONGs.
Definition at line 1418 of file xlong.cpp. 01419 { 01420 return XlongCmpGT(first, second); 01421 }
|
|
Overloading the postfix greater-than--or-equal operator for XLONGs.
Definition at line 1616 of file xlong.cpp. 01617 { 01618 xlong temp; 01619 01620 LongToXlong(second, temp); 01621 01622 return XlongCmpGE(first, temp); 01623 }
|
|
Overloading the postfix greater-than--or-equal operator for XLONGs.
Definition at line 1590 of file xlong.cpp. 01591 { 01592 return XlongCmpGE(first, second); 01593 }
|
|
Overloading the >> operator to mean shift right for XLONGs.
Definition at line 625 of file xlong.cpp. 00626 { 00627 xlong result = operand; 00628 00629 XlongAsr64One(shift, result); 00630 00631 return result; 00632 }
|
|
Private to ccmath.cpp. Primitive for operator overloading.
Definition at line 2039 of file xlong.cpp.
|
|
Definition at line 2044 of file xlong.cpp.
|
|
64-bit signed addition
Definition at line 1698 of file xlong.cpp.
|
|
Definition at line 1703 of file xlong.cpp.
|
|
Private to ccmath.cpp. Primitive for operator overloading.
Definition at line 1889 of file xlong.cpp.
|
|
Definition at line 1894 of file xlong.cpp.
|
|
Private to ccmath.cpp. Primitive for operator overloading.
Definition at line 1917 of file xlong.cpp.
|
|
Definition at line 1922 of file xlong.cpp.
|
|
Multiplying without losing precision. Private function used by operator overloading on *=.
Definition at line 2123 of file xlong.cpp.
|
|
Definition at line 1970 of file xlong.cpp.
|
|
Definition at line 1955 of file xlong.cpp.
|
|
Private to ccmath.cpp. Primitive for operator overloading. .. = comparison operator, one of: GT > GE >= LT < LE <= EQ == NE !=
Definition at line 1950 of file xlong.cpp.
|
|
Definition at line 1965 of file xlong.cpp.
|
|
Definition at line 1960 of file xlong.cpp.
|
|
Definition at line 1975 of file xlong.cpp.
|
|
Private to ccmath.cpp. Primitive for operator overloading. This is much more efficient than calling Sub with a 1 as a second parameter.
Definition at line 2017 of file xlong.cpp.
|
|
Private to ccmath.cpp. Primitive for operator overloading. This is much more efficient than calling Add with a 1 as a second parameter.
Definition at line 1996 of file xlong.cpp.
|
|
Definition at line 1824 of file xlong.cpp.
|
|
64-bit signed negation
Definition at line 1754 of file xlong.cpp.
|
|
64-bit signed subtraction
Definition at line 1728 of file xlong.cpp.
|
|
Definition at line 1733 of file xlong.cpp.
|
|
Display xlongs in meaningful format.
Definition at line 2066 of file xlong.cpp. 02067 { 02068 #if defined(__WXMSW__) 02069 sprintf(dest,"%I64i",arg) ; 02070 #else 02071 sprintf(dest,"%lld",arg) ; 02072 #endif 02073 }
|
|
Conversion between types. Private to ccmaths.h which has a better interface on top of this.
Definition at line 2144 of file xlong.cpp.
|
|
Private to ccmath.cpp. Primitive for operator overloading.
Definition at line 1865 of file xlong.cpp. 01866 { 01867 return (INT32)input ; 01868 }
|
|
Definition at line 2075 of file xlong.cpp. 02076 { 02077 #if defined(__WXMSW__) 02078 swprintf( dest, 21, L"%I64i", arg ); 02079 #else 02080 swprintf( dest, 21, L"%lld", arg ); 02081 #endif 02082 }
|
|
Matrix multiply primitive done using intermediate 128-bit results so full accuracy is maintained. Special cases are when fix1 or fix2 are 0.0 or 1.0 as multiplications may be avoided (NOT YET IMPLEMENTED) Note that the result is rounded to the nearest integer.
Definition at line 2102 of file xlong.cpp.
|
|
To avoid losing precision.
Definition at line 1796 of file xlong.cpp. 01797 { 01798 result = (xlong)mul1*mul2 ; 01799 }
|
|
Private to ccmath.h. Primitive for operator overloading.
Definition at line 1819 of file xlong.cpp.
|