]> Dogcows Code - chaz/yoink/blob - src/moof/cml/core/common.h
fixes for newer versions of g++
[chaz/yoink] / src / moof / cml / core / common.h
1 /* -*- C++ -*- ------------------------------------------------------------
2
3 Copyright (c) 2007 Jesse Anders and Demian Nave http://cmldev.net/
4
5 The Configurable Math Library (CML) is distributed under the terms of the
6 Boost Software License, v1.0 (see cml/LICENSE for details).
7
8 *-----------------------------------------------------------------------*/
9 /** @file
10 * @brief
11 */
12
13 #ifndef core_common_h
14 #define core_common_h
15
16 // XXX This isn't really the right place for this.
17 #if defined(_MSC_VER)
18 #include <cstdlib>
19 #ifndef _SSIZE_T_DEFINED
20 #ifdef _WIN64
21 typedef __int64 ssize_t;
22 #else
23 typedef _W64 int ssize_t;
24 #endif
25 #define _SSIZE_T_DEFINED
26 #endif
27 #endif
28
29 #include <cstddef> // for size_t
30 #include <utility> // for std::pair<>
31 #include <cml/defaults.h>
32
33 namespace cml {
34
35 /** 1D tag (to select array shape). */
36 struct oned_tag {};
37
38 /** 2D tag (to select array shape). */
39 struct twod_tag {};
40
41 /** Statically-allocated memory tag. */
42 struct fixed_memory_tag {};
43
44 /** Dynamically-allocated memory tag. */
45 struct dynamic_memory_tag {};
46
47 /** Externally-allocated memory tag. */
48 struct external_memory_tag {};
49
50 /** Statically-sized tag. */
51 struct fixed_size_tag {};
52
53 /** Runtime-sized tag. */
54 struct dynamic_size_tag {};
55
56 /** Resizable tag. */
57 struct resizable_tag {};
58
59 /** Not resizable tag. */
60 struct not_resizable_tag {};
61
62 /** Unit-sized tag. */
63 struct unit_size_tag {};
64
65 /** Row-major storage tag. */
66 struct row_major {};
67
68 /** Col-major storage tag. */
69 struct col_major {};
70
71 /** Row-vector matrix basis tag. */
72 struct row_basis {};
73
74 /** Column-vector matrix basis tag. */
75 struct col_basis {};
76
77 /* This is the pair returned from the matrix size() method, as well as from
78 * the matrix expression size checking code:
79 */
80 typedef std::pair<size_t,size_t> matrix_size;
81
82 } // namespace cml
83
84 #endif
85
86 // -------------------------------------------------------------------------
87 // vim:ft=cpp
This page took 0.038144 seconds and 4 git commands to generate.