[658] | 1 | /***************************************************************************
|
---|
| 2 | * blitz/compiler.h Compiler specific directives and kludges
|
---|
| 3 | *
|
---|
| 4 | * $Id: compiler.h,v 1.1.1.1 1999-11-26 16:37:03 ansari Exp $
|
---|
| 5 | *
|
---|
| 6 | * Copyright (C) 1997,1998 Todd Veldhuizen <tveldhui@seurat.uwaterloo.ca>
|
---|
| 7 | *
|
---|
| 8 | * This program is free software; you can redistribute it and/or
|
---|
| 9 | * modify it under the terms of the GNU General Public License
|
---|
| 10 | * as published by the Free Software Foundation; either version 2
|
---|
| 11 | * of the License, or (at your option) any later version.
|
---|
| 12 | *
|
---|
| 13 | * This program is distributed in the hope that it will be useful,
|
---|
| 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
| 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
| 16 | * GNU General Public License for more details.
|
---|
| 17 | *
|
---|
| 18 | * Suggestions: blitz-suggest@cybervision.com
|
---|
| 19 | * Bugs: blitz-bugs@cybervision.com
|
---|
| 20 | *
|
---|
| 21 | * For more information, please see the Blitz++ Home Page:
|
---|
| 22 | * http://seurat.uwaterloo.ca/blitz/
|
---|
| 23 | *
|
---|
| 24 | ***************************************************************************
|
---|
| 25 | * $Log: not supported by cvs2svn $
|
---|
| 26 | * Revision 1.1.1.1 1999/04/09 17:58:58 ansari
|
---|
| 27 | * Creation module DPC/Blitz (blitz 0.4) Reza 09/04/99
|
---|
| 28 | *
|
---|
| 29 | * Revision 1.7 1998/03/14 00:04:47 tveldhui
|
---|
| 30 | * 0.2-alpha-05
|
---|
| 31 | *
|
---|
| 32 | * Revision 1.6 1997/07/16 14:51:20 tveldhui
|
---|
| 33 | * Update: Alpha release 0.2 (Arrays)
|
---|
| 34 | *
|
---|
| 35 | * Revision 1.5 1997/01/24 14:42:00 tveldhui
|
---|
| 36 | * Periodic RCS update
|
---|
| 37 | *
|
---|
| 38 | * Revision 1.4 1997/01/13 22:19:58 tveldhui
|
---|
| 39 | * Periodic RCS update
|
---|
| 40 | *
|
---|
| 41 | * Revision 1.3 1996/11/11 17:29:13 tveldhui
|
---|
| 42 | * Periodic RCS update
|
---|
| 43 | *
|
---|
| 44 | *
|
---|
| 45 | */
|
---|
| 46 |
|
---|
| 47 |
|
---|
| 48 | #ifndef BZ_COMPILER_H
|
---|
| 49 | #define BZ_COMPILER_H
|
---|
| 50 |
|
---|
| 51 | // The file <blitz/config.h> is generated automatically by the
|
---|
| 52 | // script 'bzconfig', located in the 'compiler' directory.
|
---|
| 53 |
|
---|
| 54 | #include <blitz/config.h>
|
---|
| 55 |
|
---|
| 56 | /*
|
---|
| 57 | * Define some kludges.
|
---|
| 58 | */
|
---|
| 59 |
|
---|
| 60 | #ifndef BZ_TEMPLATES
|
---|
| 61 | #error In <blitz/config.h>: A working template implementation is required by Blitz++ (you may need to rerun the compiler/bzconfig script)
|
---|
| 62 | #endif
|
---|
| 63 |
|
---|
| 64 | #ifndef BZ_MEMBER_TEMPLATES
|
---|
| 65 | #error In <blitz/config.h>: Your compiler does not support member templates. (you may need to rerun the compiler/bzconfig script)
|
---|
| 66 | #endif
|
---|
| 67 |
|
---|
| 68 | #ifndef BZ_FULL_SPECIALIZATION_SYNTAX
|
---|
| 69 | #error In <blitz/config.h>: Your compiler does not support template<> full specialization syntax. You may need to rerun the compiler/bzconfig script.
|
---|
| 70 | #endif
|
---|
| 71 |
|
---|
| 72 | #ifndef BZ_PARTIAL_ORDERING
|
---|
| 73 | #error In <blitz/config.h>: Your compiler does not support partial ordering (you may need to rerun the compiler/bzconfig script)
|
---|
| 74 | #endif
|
---|
| 75 |
|
---|
| 76 | #ifndef BZ_PARTIAL_SPECIALIZATION
|
---|
| 77 | #error In <blitz/config.h>: Your compiler does not support partial specialization (you may need to rerun the compiler/bzconfig script)
|
---|
| 78 | #endif
|
---|
| 79 |
|
---|
| 80 | #ifdef BZ_NAMESPACES
|
---|
| 81 | #define BZ_NAMESPACE(X) namespace X {
|
---|
| 82 | #define BZ_NAMESPACE_END }
|
---|
| 83 | #define BZ_USING_NAMESPACE(X) using namespace X;
|
---|
| 84 | #else
|
---|
| 85 | #define BZ_NAMESPACE(X)
|
---|
| 86 | #define BZ_NAMESPACE_END
|
---|
| 87 | #define BZ_USING_NAMESPACE(X)
|
---|
| 88 | #endif
|
---|
| 89 |
|
---|
| 90 | #ifdef BZ_TEMPLATE_QUALIFIED_RETURN_TYPE
|
---|
| 91 | #define BZ_USE_NUMTRAIT
|
---|
| 92 | #endif
|
---|
| 93 |
|
---|
| 94 | #ifdef BZ_DEFAULT_TEMPLATE_PARAMETERS
|
---|
| 95 | #define BZ_TEMPLATE_DEFAULT(X) = X
|
---|
| 96 | #else
|
---|
| 97 | #define BZ_TEMPLATE_DEFAULT
|
---|
| 98 | #endif
|
---|
| 99 |
|
---|
| 100 | #ifdef BZ_EXPLICIT
|
---|
| 101 | #define _bz_explicit explicit
|
---|
| 102 | #else
|
---|
| 103 | #define _bz_explicit
|
---|
| 104 | #endif
|
---|
| 105 |
|
---|
| 106 | #ifdef BZ_TYPENAME
|
---|
| 107 | #define _bz_typename typename
|
---|
| 108 | #else
|
---|
| 109 | #define _bz_typename
|
---|
| 110 | #endif
|
---|
| 111 |
|
---|
| 112 | #ifdef BZ_MUTABLE
|
---|
| 113 | #define _bz_mutable mutable
|
---|
| 114 | #else
|
---|
| 115 | #define _bz_mutable
|
---|
| 116 | #endif
|
---|
| 117 |
|
---|
| 118 | #ifdef BZ_DISABLE_RESTRICT
|
---|
| 119 | #undef BZ_NCEG_RESTRICT
|
---|
| 120 | #endif
|
---|
| 121 |
|
---|
| 122 | #ifdef BZ_NCEG_RESTRICT
|
---|
| 123 | #define _bz_restrict restrict
|
---|
| 124 | #else
|
---|
| 125 | #define _bz_restrict
|
---|
| 126 | #endif
|
---|
| 127 |
|
---|
| 128 | #ifdef BZ_BOOL
|
---|
| 129 | #define _bz_bool bool
|
---|
| 130 | #define _bz_true true
|
---|
| 131 | #define _bz_false false
|
---|
| 132 | #else
|
---|
| 133 | #define _bz_bool int
|
---|
| 134 | #define _bz_true 1
|
---|
| 135 | #define _bz_false 0
|
---|
| 136 | #endif
|
---|
| 137 |
|
---|
| 138 | #ifdef BZ_ENUM_COMPUTATIONS_WITH_CAST
|
---|
| 139 | #define BZ_ENUM_CAST(X) (int)X
|
---|
| 140 | #elif defined(BZ_ENUM_COMPUTATIONS)
|
---|
| 141 | #define BZ_ENUM_CAST(X) X
|
---|
| 142 | #else
|
---|
| 143 | #error In <blitz/config.h>: Your compiler does not support enum computations. You may have to rerun compiler/bzconfig.
|
---|
| 144 | #endif
|
---|
| 145 |
|
---|
| 146 | #if defined(BZ_MATH_FN_IN_NAMESPACE_STD)
|
---|
| 147 | #define BZ_MATHFN_SCOPE(x) std::x
|
---|
| 148 | #elif defined(BZ_NAMESPACES)
|
---|
| 149 | #define BZ_MATHFN_SCOPE(x) ::x
|
---|
| 150 | #else
|
---|
| 151 | #define BZ_MATHFN_SCOPE(x) x
|
---|
| 152 | #endif
|
---|
| 153 |
|
---|
| 154 | #if defined(BZ_COMPLEX_MATH_IN_NAMESPACE_STD)
|
---|
| 155 | #define BZ_CMATHFN_SCOPE(x) std::x
|
---|
| 156 | #elif defined(BZ_NAMESPACES)
|
---|
| 157 | #define BZ_CMATHFN_SCOPE(x) ::x
|
---|
| 158 | #else
|
---|
| 159 | #define BZ_CMATHFN_SCOPE(x) x
|
---|
| 160 | #endif
|
---|
| 161 |
|
---|
| 162 | #if defined(BZ_NAMESPACES)
|
---|
| 163 | #define BZ_BLITZ_SCOPE(x) blitz::x
|
---|
| 164 | #else
|
---|
| 165 | #define BZ_BLITZ_SCOPE(x) ::x
|
---|
| 166 | #endif
|
---|
| 167 |
|
---|
| 168 | #endif // BZ_COMPILER_H
|
---|
| 169 |
|
---|