So-Bogus
A c++ sparse block matrix library aimed at Second Order cone problems
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
Constants.hpp
1 /*
2  * This file is part of bogus, a C++ sparse block matrix library.
3  *
4  * Copyright 2013 Gilles Daviet <gdaviet@gmail.com>
5  *
6  * This Source Code Form is subject to the terms of the Mozilla Public
7  * License, v. 2.0. If a copy of the MPL was not distributed with this
8  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 */
10 
11 
12 #ifndef BOGUS_BLOCK_CONSTANTS_HPP
13 #define BOGUS_BLOCK_CONSTANTS_HPP
14 
15 #include <cstddef>
16 
17 #if !( defined( _OPENMP ) || defined( BOGUS_DONT_PARALLELIZE ) )
18 #define BOGUS_DONT_PARALLELIZE
19 #endif
20 
21 #ifndef BOGUS_DEFAULT_INDEX_TYPE
22 #define BOGUS_DEFAULT_INDEX_TYPE int
23 #endif
24 
25 #ifndef BOGUS_DEFAULT_BLOCK_PTR_TYPE
26 #define BOGUS_DEFAULT_BLOCK_PTR_TYPE std::size_t
27 #endif
28 
29 #ifndef BOGUS_DEFAULT_DENSE_INDEX_TYPE
30 #ifndef EIGEN_DEFAULT_DENSE_INDEX_TYPE
31 #define BOGUS_DEFAULT_DENSE_INDEX_TYPE int
32 #else
33 #define BOGUS_DEFAULT_DENSE_INDEX_TYPE EIGEN_DEFAULT_DENSE_INDEX_TYPE
34 #endif
35 #endif
36 
37 namespace bogus
38 {
39 
41 
43 namespace flags
44 {
45  enum {
47  NONE = 0,
49 
56  UNCOMPRESSED = 0x1,
58  COL_MAJOR = 0x2,
60 
64  SYMMETRIC = 0x4
65  } ;
66 }
67 // Reduce verbosity of public API
68 using namespace flags ;
69 
70 namespace internal
71 {
73  enum { DYNAMIC = -1 } ;
74 }
75 
76 typedef BOGUS_DEFAULT_DENSE_INDEX_TYPE DenseIndexType ;
77 
78 }
79 
80 #endif
Store only half the matrix, or rather the triangular part for which inner &lt;= outer,.
Definition: Constants.hpp:64
Default value: the matrix will use an uncompressed index, will be row-major, and not symmetric...
Definition: Constants.hpp:47
Use an uncompressed index.
Definition: Constants.hpp:56
Store and index blocks in a column major way.
Definition: Constants.hpp:58