1 #ifndef SimTK_SimTKCOMMON_COMMON_H_
2 #define SimTK_SimTKCOMMON_COMMON_H_
104 #ifndef SimTK_DEFAULT_PRECISION
105 # define SimTK_DEFAULT_PRECISION 2
108 #if (SimTK_DEFAULT_PRECISION == 1)
111 #elif (SimTK_DEFAULT_PRECISION == 2)
114 #elif (SimTK_DEFAULT_PRECISION == 4)
118 #error ILLEGAL VALUE FOR DEFAULT PRECISION
122 #if defined(__cplusplus)
124 #define SimTK_DEBUG(s) std::printf("DBG: " s)
125 #define SimTK_DEBUG1(s,a1) std::printf("DBG: " s,a1)
126 #define SimTK_DEBUG2(s,a1,a2) std::printf("DBG: " s,a1,a2)
127 #define SimTK_DEBUG3(s,a1,a2,a3) std::printf("DBG: " s,a1,a2,a3)
128 #define SimTK_DEBUG4(s,a1,a2,a3,a4) std::printf("DBG: " s,a1,a2,a3,a4)
131 #define SimTK_DEBUG(s) printf("DBG: " s)
132 #define SimTK_DEBUG1(s,a1) printf("DBG: " s,a1)
133 #define SimTK_DEBUG2(s,a1,a2) printf("DBG: " s,a1,a2)
134 #define SimTK_DEBUG3(s,a1,a2,a3) printf("DBG: " s,a1,a2,a3)
135 #define SimTK_DEBUG4(s,a1,a2,a3,a4) printf("DBG: " s,a1,a2,a3,a4)
138 #define SimTK_DEBUG(s)
139 #define SimTK_DEBUG1(s,a1)
140 #define SimTK_DEBUG2(s,a1,a2)
141 #define SimTK_DEBUG3(s,a1,a2,a3)
142 #define SimTK_DEBUG4(s,a1,a2,a3,a4)
167 #pragma warning(disable:4231)
168 #pragma warning(disable:4251)
169 #pragma warning(disable:4275)
170 #pragma warning(disable:4345)
172 #if defined(SimTK_SimTKCOMMON_BUILDING_SHARED_LIBRARY)
173 #define SimTK_SimTKCOMMON_EXPORT __declspec(dllexport)
176 #pragma warning(disable:4661)
178 #elif defined(SimTK_SimTKCOMMON_BUILDING_STATIC_LIBRARY) || defined(SimTK_USE_STATIC_LIBRARIES)
179 #define SimTK_SimTKCOMMON_EXPORT
181 #define SimTK_SimTKCOMMON_EXPORT __declspec(dllimport)
202 #define SimTK_SimTKCOMMON_EXPORT // Linux, Mac
208 #if defined(__cplusplus)
220 #if defined(__cplusplus)
228 #if defined(__cplusplus)
243 #define OVERRIDE_11 override
244 #define FINAL_11 final
246 #define OVERRIDE_11 override
247 #define FINAL_11 sealed
261 #if defined(_MSC_VER) && (_MSC_VER <= 1700) // VC++ 12 (2013, _MSC_VER=1800) added these
263 inline bool isfinite(
float f) {
return _finite(f) != 0;}
264 inline bool isfinite(
double d) {
return _finite(d) != 0;}
265 inline bool isfinite(
long double l) {
return _finite(l) != 0;}
266 inline bool isnan(
float f) {
return _isnan(f) != 0;}
267 inline bool isnan(
double d) {
return _isnan(d) != 0;}
268 inline bool isnan(
long double l) {
return _isnan(l) != 0;}
269 inline bool isinf(
float f) {
return std::abs(f)==std::numeric_limits<float>::infinity();}
270 inline bool isinf(
double d) {
return std::abs(d)==std::numeric_limits<double>::infinity();}
271 inline bool isinf(
long double l) {
return std::abs(l)==std::numeric_limits<double>::infinity();}
272 inline bool signbit(
float f) {
return (*reinterpret_cast<unsigned*>(&f) & 0x80000000U) != 0;}
273 inline bool signbit(
double d) {
return (*reinterpret_cast<unsigned long long*>(&d)
274 & 0x8000000000000000ULL) != 0;}
275 inline bool signbit(
long double l) {
return (*reinterpret_cast<unsigned long long*>(&l)
276 & 0x8000000000000000ULL) != 0;}
286 inline bool canStoreInInt(
bool) {
return true;}
287 inline bool canStoreInInt(
char) {
return true;}
288 inline bool canStoreInInt(
unsigned char) {
return true;}
289 inline bool canStoreInInt(
signed char) {
return true;}
290 inline bool canStoreInInt(
short) {
return true;}
291 inline bool canStoreInInt(
unsigned short) {
return true;}
292 inline bool canStoreInInt(
int) {
return true;}
293 inline bool canStoreInInt(
unsigned int u) {
return (
unsigned int)(int(u)) == u;}
294 inline bool canStoreInInt(
long i) {
return long(
int(i)) == i;}
295 inline bool canStoreInInt(
unsigned long u) {
return (
unsigned long)(int(u)) == u;}
296 inline bool canStoreInInt(
long long i) {
return (
long long)(int(i)) == i;}
297 inline bool canStoreInInt(
unsigned long long u) {
return (
unsigned long long)(int(u)) == u;}
301 inline bool canStoreInNonnegativeInt(
bool) {
return true;}
302 inline bool canStoreInNonnegativeInt(
char c) {
return c >= 0;}
303 inline bool canStoreInNonnegativeInt(
unsigned char) {
return true;}
304 inline bool canStoreInNonnegativeInt(
signed char c) {
return c >= 0;}
305 inline bool canStoreInNonnegativeInt(
short s) {
return s >= 0;}
306 inline bool canStoreInNonnegativeInt(
unsigned short) {
return true;}
307 inline bool canStoreInNonnegativeInt(
int i) {
return i >= 0;}
308 inline bool canStoreInNonnegativeInt(
long l) {
return canStoreInInt(l) && l >= 0;}
309 inline bool canStoreInNonnegativeInt(
long long l) {
return canStoreInInt(l) && l >= 0;}
310 inline bool canStoreInNonnegativeInt(
unsigned int u) {
return canStoreInInt(u);}
311 inline bool canStoreInNonnegativeInt(
unsigned long u) {
return canStoreInInt(u);}
312 inline bool canStoreInNonnegativeInt(
unsigned long long u) {
return canStoreInInt(u);}
319 inline bool isSizeInRange(
char sz,
char mx){
return 0<=sz&&sz<=mx;}
320 inline bool isSizeInRange(
signed char sz,
signed char mx){
return 0<=sz&&sz<=mx;}
321 inline bool isSizeInRange(
short sz,
short mx){
return 0<=sz&&sz<=mx;}
322 inline bool isSizeInRange(
int sz,
int mx){
return 0<=sz&&sz<=mx;}
323 inline bool isSizeInRange(
long sz,
long mx){
return 0<=sz&&sz<=mx;}
324 inline bool isSizeInRange(
long long sz,
long long mx){
return 0<=sz&&sz<=mx;}
325 inline bool isSizeInRange(
unsigned char sz,
unsigned char mx){
return sz<=mx;}
326 inline bool isSizeInRange(
unsigned short sz,
unsigned short mx){
return sz<=mx;}
327 inline bool isSizeInRange(
unsigned int sz,
unsigned int mx){
return sz<=mx;}
328 inline bool isSizeInRange(
unsigned long sz,
unsigned long mx){
return sz<=mx;}
329 inline bool isSizeInRange(
unsigned long long sz,
unsigned long long mx){
return sz<=mx;}
338 inline bool isIndexInRange(
char ix,
char sz){
return 0<=ix&&ix<sz;}
339 inline bool isIndexInRange(
signed char ix,
signed char sz){
return 0<=ix&&ix<sz;}
340 inline bool isIndexInRange(
short ix,
short sz){
return 0<=ix&&ix<sz;}
341 inline bool isIndexInRange(
int ix,
int sz){
return 0<=ix&&ix<sz;}
342 inline bool isIndexInRange(
long ix,
long sz){
return 0<=ix&&ix<sz;}
343 inline bool isIndexInRange(
long long ix,
long long sz){
return 0<=ix&&ix<sz;}
344 inline bool isIndexInRange(
unsigned char ix,
unsigned char sz){
return ix<sz;}
345 inline bool isIndexInRange(
unsigned short ix,
unsigned short sz){
return ix<sz;}
346 inline bool isIndexInRange(
unsigned int ix,
unsigned int sz){
return ix<sz;}
347 inline bool isIndexInRange(
unsigned long ix,
unsigned long sz){
return ix<sz;}
348 inline bool isIndexInRange(
unsigned long long ix,
unsigned long long sz){
return ix<sz;}
354 inline bool isNonnegative(
bool) {
return true;}
356 inline bool isNonnegative(
char n) {
return n>=0;}
357 inline bool isNonnegative(
signed char n) {
return n>=0;}
358 inline bool isNonnegative(
short n) {
return n>=0;}
359 inline bool isNonnegative(
int n) {
return n>=0;}
360 inline bool isNonnegative(
long n) {
return n>=0;}
361 inline bool isNonnegative(
long long n) {
return n>=0;}
362 inline bool isNonnegative(
unsigned char) {
return true;}
363 inline bool isNonnegative(
unsigned short) {
return true;}
364 inline bool isNonnegative(
unsigned int) {
return true;}
365 inline bool isNonnegative(
unsigned long) {
return true;}
366 inline bool isNonnegative(
unsigned long long){
return true;}
371 static const int InvalidIndex = -1111111111;
407 #define SimTK_DEFINE_UNIQUE_INDEX_TYPE(NAME) \
408 SimTK_DEFINE_AND_EXPORT_UNIQUE_LOCAL_INDEX_TYPE(,,,NAME) \
409 static const NAME Invalid ## NAME;
413 #define SimTK_DEFINE_AND_EXPORT_UNIQUE_INDEX_TYPE(EXPORT,NAME) \
414 SimTK_DEFINE_AND_EXPORT_UNIQUE_LOCAL_INDEX_TYPE(EXPORT,,,NAME) \
415 static const NAME Invalid ## NAME;
418 #define SimTK_DEFINE_UNIQUE_LOCAL_INDEX_TYPE(PARENT,NAME) \
419 SimTK_DEFINE_AND_EXPORT_UNIQUE_LOCAL_INDEX_TYPE(,PARENT,::,NAME)
423 #define SimTK_DEFINE_AND_EXPORT_UNIQUE_LOCAL_INDEX_TYPE(EXPORT,PARENT,SEP,NAME) \
424 class EXPORT NAME { \
427 NAME() : ix(SimTK::InvalidIndex) { } \
428 explicit NAME(int i) : ix(i) {assert(i>=0 || i==SimTK::InvalidIndex);} \
429 explicit NAME(long l): ix((int)l) {assert(SimTK::canStoreInNonnegativeInt(l));} \
430 explicit NAME(unsigned int u) : ix((int)u) {assert(SimTK::canStoreInInt(u));} \
431 explicit NAME(unsigned long ul) : ix((int)ul) {assert(SimTK::canStoreInInt(ul));} \
432 operator int() const {return ix;} \
433 bool isValid() const {return ix>=0;} \
434 bool isValidExtended() const {return ix>=-1;} \
435 void invalidate(){ix=SimTK::InvalidIndex;} \
437 bool operator==(int i) const {assert(isValidExtended() && isValidExtended(i)); return ix==i;} \
438 bool operator==(short s) const{assert(isValidExtended() && isValidExtended(s)); return ix==(int)s;} \
439 bool operator==(long l) const {assert(isValidExtended() && isValidExtended(l)); return ix==(int)l;} \
440 bool operator==(unsigned int u) const {assert(isValidExtended() && isValid(u)); return ix==(int)u;} \
441 bool operator==(unsigned short us)const {assert(isValidExtended() && isValid(us)); return ix==(int)us;} \
442 bool operator==(unsigned long ul) const {assert(isValidExtended() && isValid(ul)); return ix==(int)ul;} \
443 bool operator!=(int i) const {return !operator==(i);} \
444 bool operator!=(short s) const {return !operator==(s);} \
445 bool operator!=(long l) const {return !operator==(l);} \
446 bool operator!=(unsigned int u) const {return !operator==(u);} \
447 bool operator!=(unsigned long ul) const {return !operator==(ul);} \
449 bool operator< (int i) const {assert(isValidExtended() && isValidExtended(i)); return ix<i;} \
450 bool operator< (short s) const{assert(isValidExtended() && isValidExtended(s)); return ix<(int)s;} \
451 bool operator< (long l) const {assert(isValidExtended() && isValidExtended(l)); return ix<(int)l;} \
452 bool operator< (unsigned int u) const {assert(isValidExtended() && isValid(u)); return ix<(int)u;} \
453 bool operator< (unsigned short us)const {assert(isValidExtended() && isValid(us)); return ix<(int)us;} \
454 bool operator< (unsigned long ul) const {assert(isValidExtended() && isValid(ul)); return ix<(int)ul;} \
455 bool operator>=(int i) const {return !operator<(i);} \
456 bool operator>=(short s) const {return !operator<(s);} \
457 bool operator>=(long l) const {return !operator<(l);} \
458 bool operator>=(unsigned int u) const {return !operator<(u);} \
459 bool operator>=(unsigned short us)const {return !operator<(us);} \
460 bool operator>=(unsigned long ul) const {return !operator<(ul);} \
462 bool operator> (int i) const {assert(isValidExtended() && isValidExtended(i)); return ix>i;} \
463 bool operator> (short s) const{assert(isValidExtended() && isValidExtended(s)); return ix>(int)s;} \
464 bool operator> (long l) const {assert(isValidExtended() && isValidExtended(l)); return ix>(int)l;} \
465 bool operator> (unsigned int u) const {assert(isValidExtended() && isValid(u)); return ix>(int)u;} \
466 bool operator> (unsigned short us)const {assert(isValidExtended() && isValid(us)); return ix>(int)us;} \
467 bool operator> (unsigned long ul) const {assert(isValidExtended() && isValid(ul)); return ix>(int)ul;} \
468 bool operator<=(int i) const {return !operator>(i);} \
469 bool operator<=(short s) const {return !operator>(s);} \
470 bool operator<=(long l) const {return !operator>(l);} \
471 bool operator<=(unsigned int u) const {return !operator>(u);} \
472 bool operator<=(unsigned short us)const {return !operator>(us);} \
473 bool operator<=(unsigned long ul) const {return !operator>(ul);} \
475 const NAME& operator++() {assert(isValid()); ++ix; return *this;} \
476 NAME operator++(int) {assert(isValid()); ++ix; return NAME(ix-1);} \
477 const NAME& operator--() {assert(isValid()); --ix; return *this;} \
478 NAME operator--(int) {assert(isValid()); --ix; return NAME(ix+1);} \
479 NAME next() const {assert(isValid()); return NAME(ix+1);} \
480 NAME prev() const {assert(isValid()); return NAME(ix-1);} \
482 NAME& operator+=(int i) {assert(isValid() && isValidExtended(ix+i)); ix+=i; return *this;} \
483 NAME& operator-=(int i) {assert(isValid() && isValidExtended(ix-i)); ix-=i; return *this;} \
484 NAME& operator+=(short s){assert(isValid() && SimTK::canStoreInInt(s) && isValidExtended(ix+(int)s)); ix+=(int)s; return *this;} \
485 NAME& operator-=(short s){assert(isValid() && SimTK::canStoreInInt(s) && isValidExtended(ix-(int)s)); ix-=(int)s; return *this;} \
486 NAME& operator+=(long l) {assert(isValid() && SimTK::canStoreInInt(l) && isValidExtended(ix+(int)l)); ix+=(int)l; return *this;} \
487 NAME& operator-=(long l) {assert(isValid() && SimTK::canStoreInInt(l) && isValidExtended(ix-(int)l)); ix-=(int)l; return *this;} \
488 NAME& operator+=(unsigned int u) {assert(isValid()&& SimTK::canStoreInInt(u) && isValid(ix+(int)u)); ix+=(int)u; return *this;} \
489 NAME& operator-=(unsigned int u) {assert(isValid()&& SimTK::canStoreInInt(u) && isValidExtended(ix-(int)u)); ix-=(int)u; return *this;} \
490 NAME& operator+=(unsigned short us){assert(isValid()&& SimTK::canStoreInInt(us) && isValid(ix+(int)us)); ix+=(int)us; return *this;} \
491 NAME& operator-=(unsigned short us){assert(isValid()&& SimTK::canStoreInInt(us) && isValidExtended(ix-(int)us)); ix-=(int)us; return *this;} \
492 NAME& operator+=(unsigned long ul) {assert(isValid()&& SimTK::canStoreInInt(ul) && isValid(ix+(int)ul)); ix+=(int)ul; return *this;} \
493 NAME& operator-=(unsigned long ul) {assert(isValid()&& SimTK::canStoreInInt(ul) && isValidExtended(ix-(int)ul)); ix-=(int)ul; return *this;} \
495 static const NAME& Invalid() {static const NAME invalid; return invalid;} \
496 static bool isValid(int i) {return i>=0;} \
497 static bool isValid(short s){return s>=0;} \
498 static bool isValid(long l) {return SimTK::canStoreInNonnegativeInt(l);} \
499 static bool isValid(unsigned int u) {return SimTK::canStoreInInt(u);} \
500 static bool isValid(unsigned short) {return true;} \
501 static bool isValid(unsigned long ul) {return SimTK::canStoreInInt(ul);} \
502 static bool isValidExtended(int i) {return i>=-1;} \
503 static bool isValidExtended(short s){return s>=-1;} \
504 static bool isValidExtended(long l) {return SimTK::canStoreInInt(l) && l>=-1;} \
506 typedef int size_type; \
507 typedef int difference_type; \
508 static size_type max_size() {return std::numeric_limits<int>::max();} \
518 #define SimTK_DYNAMIC_CAST_DEBUG dynamic_cast // safe but slow
520 #define SimTK_DYNAMIC_CAST_DEBUG static_cast // unsafe but fast
526 #define SimTK_DOWNCAST(Derived,Parent) \
527 static bool isA(const Parent& p) \
528 { return dynamic_cast<const Derived*>(&p) != 0; } \
529 static const Derived& downcast(const Parent& p) \
530 { return SimTK_DYNAMIC_CAST_DEBUG<const Derived&>(p); } \
531 static Derived& updDowncast(Parent& p) \
532 { return SimTK_DYNAMIC_CAST_DEBUG<Derived&>(p); } \
533 static Derived& downcast(Parent& p) \
534 { return SimTK_DYNAMIC_CAST_DEBUG<Derived&>(p); }
538 #define SimTK_DOWNCAST2(Derived,Helper,Parent) \
539 static bool isA(const Parent& p) \
540 { return Helper::isA(p); } \
541 static const Derived& downcast(const Parent& p) \
542 { return static_cast<const Derived&>(Helper::downcast(p)); } \
543 static Derived& updDowncast(Parent& p) \
544 { return static_cast<Derived&>(Helper::downcast(p)); } \
545 static Derived& downcast(Parent& p) \
546 { return static_cast<Derived&>(Helper::downcast(p)); }
552 #define SimTK_PIMPL_DOWNCAST(Derived, Parent) \
553 static bool isInstanceOf(const Parent&); \
554 static const Derived& downcast(const Parent&); \
555 static Derived& updDowncast(Parent&)
561 namespace Exception { }
568 typedef std::complex<Real> Complex;
570 typedef std::complex<float> fComplex;
572 typedef std::complex<float> dComplex;
577 template <
int M,
class E=Real,
int STRIDE=1>
class Vec;
578 template <
int N,
class E=Real,
int STRIDE=1>
class Row;
579 template <
int M,
int N,
class E=Real,
int CS=M,
int RS=1>
class Mat;
580 template <
int M,
class E=Real,
int RS=1>
class SymMat;
586 Segment() : length(0), offset(0) { }
587 explicit Segment(
int l,
int ofs=0) : length(l), offset(ofs) {
588 assert(l>=0 && ofs>=0);
615 template <
class L,
class R>
struct AndOpType {};
616 template<>
struct AndOpType<FalseType,FalseType> {
typedef FalseType Result;};
617 template<>
struct AndOpType<FalseType,TrueType> {
typedef FalseType Result;};
618 template<>
struct AndOpType<TrueType, FalseType> {
typedef FalseType Result;};
619 template<>
struct AndOpType<TrueType, TrueType> {
typedef TrueType Result;};
622 template <
class L,
class R>
struct OrOpType {};
623 template<>
struct OrOpType<FalseType,FalseType> {
typedef FalseType Result;};
624 template<>
struct OrOpType<FalseType,TrueType> {
typedef TrueType Result;};
625 template<>
struct OrOpType<TrueType, FalseType> {
typedef TrueType Result;};
626 template<>
struct OrOpType<TrueType, TrueType> {
typedef TrueType Result;};
629 template <
class L,
class R>
struct XorOpType {};
630 template<>
struct XorOpType<FalseType,FalseType> {
typedef FalseType Result;};
631 template<>
struct XorOpType<FalseType,TrueType> {
typedef TrueType Result;};
632 template<>
struct XorOpType<TrueType, FalseType> {
typedef TrueType Result;};
633 template<>
struct XorOpType<TrueType, TrueType> {
typedef FalseType Result;};
636 template <
class T>
struct IsIntegralType {
639 typedef FalseType Result;
642 static const bool result =
false;
646 #define SimTK_SPECIALIZE_INTEGRAL_TYPE(T) \
647 template<> struct IsIntegralType<T> \
648 {typedef TrueType Result; static const bool result = true;}
650 SimTK_SPECIALIZE_INTEGRAL_TYPE(
bool);
651 SimTK_SPECIALIZE_INTEGRAL_TYPE(
char);
655 SimTK_SPECIALIZE_INTEGRAL_TYPE(
signed char);
656 SimTK_SPECIALIZE_INTEGRAL_TYPE(
unsigned char);
657 SimTK_SPECIALIZE_INTEGRAL_TYPE(
short);
658 SimTK_SPECIALIZE_INTEGRAL_TYPE(
unsigned short);
659 SimTK_SPECIALIZE_INTEGRAL_TYPE(
int);
660 SimTK_SPECIALIZE_INTEGRAL_TYPE(
unsigned int);
661 SimTK_SPECIALIZE_INTEGRAL_TYPE(
long);
662 SimTK_SPECIALIZE_INTEGRAL_TYPE(
unsigned long);
663 SimTK_SPECIALIZE_INTEGRAL_TYPE(
long long);
664 SimTK_SPECIALIZE_INTEGRAL_TYPE(
unsigned long long);
667 template <
class T>
struct IsFloatingType {
670 typedef FalseType Result;
673 static const bool result =
false;
677 #define SimTK_SPECIALIZE_FLOATING_TYPE(T) \
678 template<> struct IsFloatingType<T> \
679 {typedef TrueType Result; static const bool result = true;}
681 SimTK_SPECIALIZE_FLOATING_TYPE(
float);
682 SimTK_SPECIALIZE_FLOATING_TYPE(
double);
683 SimTK_SPECIALIZE_FLOATING_TYPE(
long double);
686 template <
class T>
struct IsVoidType {
689 typedef FalseType Result;
692 static const bool result =
false;
694 template<>
struct IsVoidType<void>
695 {
typedef TrueType Result;
static const bool result =
true;};
699 template <
class T>
struct IsArithmeticType {
702 typedef OrOpType<typename IsIntegralType<T>::Result,
703 typename IsFloatingType<T>::Result> Result;
706 static const bool result = IsIntegralType<T>::result
707 || IsFloatingType<T>::result;
712 template <
bool is64Bit>
struct Is64BitHelper {};
713 template<>
struct Is64BitHelper<true>
714 {
typedef TrueType Result;
static const bool result =
true;};
715 template<>
struct Is64BitHelper<false>
716 {
typedef FalseType Result;
static const bool result =
false;};
722 static const bool Is64BitPlatform =
sizeof(size_t) >
sizeof(
int);
723 typedef Is64BitHelper<Is64BitPlatform>::Result Is64BitPlatformType;
729 template <
class T>
struct NiceTypeName {
730 static const char* name() {
return typeid(T).name();}
736 #define SimTK_NICETYPENAME_LITERAL(T) \
737 template <> struct NiceTypeName< T > { \
738 static const char* name() { return #T; } \
742 SimTK_NICETYPENAME_LITERAL(
bool);
743 SimTK_NICETYPENAME_LITERAL(
char);
747 SimTK_NICETYPENAME_LITERAL(
signed char);
748 SimTK_NICETYPENAME_LITERAL(
unsigned char);
749 SimTK_NICETYPENAME_LITERAL(
short);
750 SimTK_NICETYPENAME_LITERAL(
unsigned short);
751 SimTK_NICETYPENAME_LITERAL(
int);
752 SimTK_NICETYPENAME_LITERAL(
unsigned);
753 SimTK_NICETYPENAME_LITERAL(
long);
754 SimTK_NICETYPENAME_LITERAL(
unsigned long);
755 SimTK_NICETYPENAME_LITERAL(
long long);
756 SimTK_NICETYPENAME_LITERAL(
unsigned long long);
757 SimTK_NICETYPENAME_LITERAL(
float);
758 SimTK_NICETYPENAME_LITERAL(
double);
759 SimTK_NICETYPENAME_LITERAL(
long double);
760 SimTK_NICETYPENAME_LITERAL(std::string);
761 SimTK_NICETYPENAME_LITERAL(std::complex<float>);
762 SimTK_NICETYPENAME_LITERAL(std::complex<double>);
763 SimTK_NICETYPENAME_LITERAL(std::complex<long double>);
764 SimTK_NICETYPENAME_LITERAL(SimTK::FalseType);
765 SimTK_NICETYPENAME_LITERAL(SimTK::TrueType);
#define SimTK_SimTKCOMMON_EXPORT
Definition: SimTKcommon/include/SimTKcommon/internal/common.h:202
double SimTK_Real
This type is for use in C; in C++ use SimTK::Real instead.
Definition: SimTKcommon/include/SimTKcommon/internal/common.h:113
void SimTK_about_SimTKcommon(const char *key, int maxlen, char *value)
Obtain "about" information for the currently-loaded SimTKcommon library.
void SimTK_version_SimTKcommon(int *major, int *minor, int *build)
Obtain version information for the currently-loaded SimTKcommon library.
RowVectorBase< typename CNT< ELEM >::TAbs > abs(const RowVectorBase< ELEM > &v)
Definition: VectorMath.h:120