1 // -*- C++ -*- 2 /*************************************************************************** 3 * blitz/array/types.h Typedefs for various datatypes 4 * 5 * Copyright (C) 2011 Paul P. Hilscher <pphilscher.kyodai@gmail.com> 6 * 7 * This file is a part of Blitz. 8 * 9 * Blitz is free software: you can redistribute it and/or modify 10 * it under the terms of the GNU Lesser General Public License 11 * as published by the Free Software Foundation, either version 3 12 * of the License, or (at your option) any later version. 13 * 14 * Blitz is distributed in the hope that it will be useful, 15 * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 * GNU Lesser General Public License for more details. 18 * 19 * You should have received a copy of the GNU Lesser General Public 20 * License along with Blitz. If not, see <http://www.gnu.org/licenses/>. 21 * 22 * Suggestions: blitz-devel@lists.sourceforge.net 23 * Bugs: blitz-support@lists.sourceforge.net 24 * 25 * For more information, please see the Blitz++ Home Page: 26 * https://sourceforge.net/projects/blitz/ 27 * 28 ***************************************************************************/ 29 30 31 #ifndef BZ_BLITZ_TYPES_H 32 #define BZ_BLITZ_TYPES_H 33 34 35 namespace blitz { 36 37 // Typedefs for vectors 38 39 40 // Typedefs for multi-dimensional arrys 41 42 typedef Array<int, 1> Array1i; 43 typedef Array<int, 2> Array2i; 44 typedef Array<int, 3> Array3i; 45 typedef Array<int, 4> Array4i; 46 typedef Array<int, 5> Array5i; 47 typedef Array<int, 6> Array6i; 48 typedef Array<int, 7> Array7i; 49 typedef Array<int, 8> Array8i; 50 typedef Array<int, 9> Array9i; 51 typedef Array<int,10> Array10i; 52 typedef Array<int,11> Array11i; 53 54 55 typedef Array<unsigned int, 1 > Array1ui; 56 typedef Array<unsigned int, 2 > Array2ui; 57 typedef Array<unsigned int, 3 > Array3ui; 58 typedef Array<unsigned int, 4 > Array4ui; 59 typedef Array<unsigned int, 5 > Array5ui; 60 typedef Array<unsigned int, 6 > Array6ui; 61 typedef Array<unsigned int, 7 > Array7ui; 62 typedef Array<unsigned int, 8 > Array8ui; 63 typedef Array<unsigned int, 9 > Array9ui; 64 typedef Array<unsigned int, 10> Array10ui; 65 typedef Array<unsigned int, 11> Array11ui; 66 67 68 typedef Array<double, 1> Array1d; 69 typedef Array<double, 2> Array2d; 70 typedef Array<double, 3> Array3d; 71 typedef Array<double, 4> Array4d; 72 typedef Array<double, 5> Array5d; 73 typedef Array<double, 6> Array6d; 74 typedef Array<double, 7> Array7d; 75 typedef Array<double, 8> Array8d; 76 typedef Array<double, 9> Array9d; 77 typedef Array<double,10> Array10d; 78 typedef Array<double,11> Array11d; 79 80 typedef Array<float, 1> Array1f; 81 typedef Array<float, 2> Array2f; 82 typedef Array<float, 3> Array3f; 83 typedef Array<float, 4> Array4f; 84 typedef Array<float, 5> Array5f; 85 typedef Array<float, 6> Array6f; 86 typedef Array<float, 7> Array7f; 87 typedef Array<float, 8> Array8f; 88 typedef Array<float, 9> Array9f; 89 typedef Array<float,10> Array10f; 90 typedef Array<float,11> Array11f; 91 92 #ifdef BZ_HAVE_COMPLEX 93 94 typedef std::complex<float> cmplxf; 95 typedef std::complex<double> cmplxd; 96 97 typedef Array<cmplxf, 1> Array1c; 98 typedef Array<cmplxf, 2> Array2c; 99 typedef Array<cmplxf, 3> Array3c; 100 typedef Array<cmplxf, 4> Array4c; 101 typedef Array<cmplxf, 5> Array5c; 102 typedef Array<cmplxf, 6> Array6c; 103 typedef Array<cmplxf, 7> Array7c; 104 typedef Array<cmplxf, 8> Array8c; 105 typedef Array<cmplxf, 9> Array9c; 106 typedef Array<cmplxf,10> Array10c; 107 typedef Array<cmplxf,11> Array11c; 108 109 typedef Array<cmplxd, 1> Array1z; 110 typedef Array<cmplxd, 2> Array2z; 111 typedef Array<cmplxd, 4> Array4z; 112 typedef Array<cmplxd, 3> Array3z; 113 typedef Array<cmplxd, 5> Array5z; 114 typedef Array<cmplxd, 6> Array6z; 115 typedef Array<cmplxd, 7> Array7z; 116 typedef Array<cmplxd, 8> Array8z; 117 typedef Array<cmplxd, 9> Array9z; 118 typedef Array<cmplxd,10> Array10z; 119 typedef Array<cmplxd,11> Array11z; 120 121 122 #endif // BZ_HAVE_COMPLEX 123 124 125 // quad precision 126 /* 127 #ifdef HAS_QUAD 128 // not tested yet 129 typedef __float128 quad; 130 typedef Array<quad, 1> Array1q; 131 typedef Array<quad, 2> Array2q; 132 typedef Array<quad, 4> Array4q; 133 typedef Array<quad, 3> Array3q; 134 typedef Array<quad, 5> Array5q; 135 typedef Array<quad, 6> Array6q; 136 typedef Array<quad, 7> Array7q; 137 typedef Array<quad, 8> Array8q; 138 typedef Array<quad, 9> Array9q; 139 typedef Array<quad,10> Array10q; 140 typedef Array<quad,11> Array11q; 141 #endif 142 */ 143 144 }; 145 146 #endif // BZ_BLITZ_TYPES_H 147