diff options
author | Justin Berger <j.david.berger@gmail.com> | 2018-03-15 23:14:29 -0600 |
---|---|---|
committer | Justin Berger <j.david.berger@gmail.com> | 2018-03-16 18:10:35 -0600 |
commit | c9cf2446c5eb18a29119c7dfe90c5b62f6b374c5 (patch) | |
tree | 8f2cbfacf97aef23fc897fddfed5b5f27feaea95 /redist/sba/compiler.h | |
parent | 1fe0debd6474c0368f81159cd6a0451edbc6d381 (diff) | |
download | libsurvive-c9cf2446c5eb18a29119c7dfe90c5b62f6b374c5.tar.gz libsurvive-c9cf2446c5eb18a29119c7dfe90c5b62f6b374c5.tar.bz2 |
Add sba poser
Diffstat (limited to 'redist/sba/compiler.h')
-rw-r--r-- | redist/sba/compiler.h | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/redist/sba/compiler.h b/redist/sba/compiler.h new file mode 100644 index 0000000..09c01f1 --- /dev/null +++ b/redist/sba/compiler.h @@ -0,0 +1,42 @@ +///////////////////////////////////////////////////////////////////////////////// +//// +//// Compiler-specific definitions for sparse bundle adjustment based on the +//// Levenberg - Marquardt minimization algorithm +//// Copyright (C) 2004-2008 Manolis Lourakis (lourakis at ics forth gr) +//// Institute of Computer Science, Foundation for Research & Technology - Hellas +//// Heraklion, Crete, Greece. +//// +//// This program is free software; you can redistribute it and/or modify +//// it under the terms of the GNU General Public License as published by +//// the Free Software Foundation; either version 2 of the License, or +//// (at your option) any later version. +//// +//// This program is distributed in the hope that it will be useful, +//// but WITHOUT ANY WARRANTY; without even the implied warranty of +//// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +//// GNU General Public License for more details. +//// +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef _COMPILER_H_ +#define _COMPILER_H_ + +/* note: intel's icc defines both __ICC & __INTEL_COMPILER. + * Also, some compilers other than gcc define __GNUC__, + * therefore gcc should be checked last + */ +#ifdef _MSC_VER +#define inline __inline // MSVC +#elif !defined(__ICC) && !defined(__INTEL_COMPILER) && !defined(__GNUC__) +#define inline // other than MSVC, ICC, GCC: define empty +#endif + +#ifdef _MSC_VER +#define SBA_FINITE _finite // MSVC +#elif defined(__ICC) || defined(__INTEL_COMPILER) || defined(__GNUC__) +#define SBA_FINITE isfinite // ICC, GCC +#else +#define SBA_FINITE isfinite // other than MSVC, ICC, GCC, let's hope this will work +#endif + +#endif /* _COMPILER_H_ */ |