amino
Lightweight Robot Utility Library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
def.h
1 #if 0
2 /* Copyright (c) 2012, Georgia Tech Research Corporation
3  * All rights reserved.
4  *
5  * Author(s): Neil T. Dantam <ntd@gatech.edu>
6  * Georgia Tech Humanoid Robotics Lab
7  * Under Direction of Prof. Mike Stilman <mstilman@cc.gatech.edu>
8  *
9  *
10  * This file is provided under the following "BSD-style" License:
11  *
12  *
13  * Redistribution and use in source and binary forms, with or
14  * without modification, are permitted provided that the following
15  * conditions are met:
16  *
17  * * Redistributions of source code must retain the above copyright
18  * notice, this list of conditions and the following disclaimer.
19  *
20  * * Redistributions in binary form must reproduce the above
21  * copyright notice, this list of conditions and the following
22  * disclaimer in the documentation and/or other materials provided
23  * with the distribution.
24  *
25  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
26  * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
27  * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
28  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
29  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
30  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
31  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
32  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
33  * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
34  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
35  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
36  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
37  * POSSIBILITY OF SUCH DAMAGE.
38  *
39  */
40 #endif
41 
42 #include "amino/mangle.h"
43 
44 #if defined AA_TYPE_DOUBLE
45 
46 #define AA_TYPE double
47 #define AA_CBLAS_NAME( name ) AA_MANGLE_CBLAS_NAME( d, name )
48 #define AA_LAPACK_NAME( name ) AA_MANGLE_LAPACK_NAME( d, name )
49 #define AA_CLA_NAME( name ) AA_MANGLE_CLA_NAME( d, name )
50 #define AA_LAPACK_PREFIX_STR "D"
51 
52 #define AA_NAME( prefix, name ) AA_MANGLE_NAME( d, prefix, name )
53 #define AA_FMOD( prefix, name ) AA_MANGLE_FMOD( d, prefix, name )
54 #define AA_FMOD_F( prefix, name ) AA_MANGLE_FMOD_F( d, prefix, name )
55 #define AA_FMOD_C_BEGIN( prefix, name, ... ) AA_MANGLE_FMOD_BIND_C( d, prefix, name, __VA_ARGS__ )
56 #define AA_FMOD_C_END( prefix, name ) AA_MANGLE_FMOD_C( d, prefix, name )
57 
58 #elif defined AA_TYPE_FLOAT
59 
60 #define AA_TYPE float
61 #define AA_CBLAS_NAME( name ) AA_MANGLE_CBLAS_NAME( s, name )
62 #define AA_LAPACK_NAME( name ) AA_MANGLE_LAPACK_NAME( s, name )
63 #define AA_CLA_NAME( name ) AA_MANGLE_CLA_NAME( s, name )
64 #define AA_LAPACK_PREFIX_STR "S"
65 
66 #define AA_NAME( prefix, name ) AA_MANGLE_NAME( s, prefix, name )
67 #define AA_FMOD( prefix, name ) AA_MANGLE_FMOD( s, prefix, name )
68 #define AA_FMOD_F( prefix, name ) AA_MANGLE_FMOD_F( s, prefix, name )
69 #define AA_FMOD_C_BEGIN( prefix, name, ... ) AA_MANGLE_FMOD_BIND_C( s, prefix, name, __VA_ARGS__ )
70 #define AA_FMOD_C_END( prefix, name ) AA_MANGLE_FMOD_C( s, prefix, name )
71 
72 #elif defined AA_TYPE_INT
73 
74 #define AA_TYPE int32_t
75 #define AA_NAME( prefix, name ) AA_MANGLE_NAME( i32, prefix, name )
76 #define AA_FMOD( prefix, name ) AA_MANGLE_FMOD( i32, prefix, name )
77 #define AA_FMOD_F( prefix, name ) AA_MANGLE_FMOD_F( i32, prefix, name )
78 #define AA_FMOD_C_BEGIN( prefix, name, ... ) AA_MANGLE_FMOD_BIND_C( i32, prefix, name, __VA_ARGS__ )
79 #define AA_FMOD_C_END( prefix, name ) AA_MANGLE_FMOD_C( i32, prefix, name )
80 
81 #elif defined AA_TYPE_LONG
82 
83 #define AA_TYPE int64_t
84 #define AA_NAME( prefix, name ) AA_MANGLE_NAME( i64, prefix, name )
85 #define AA_FMOD( prefix, name ) AA_MANGLE_FMOD( i64, prefix, name )
86 #define AA_FMOD_F( prefix, name ) AA_MANGLE_FMOD_F( i64, prefix, name )
87 #define AA_FMOD_C_BEGIN( prefix, name, ... ) AA_MANGLE_FMOD_BIND_C( i64, prefix, name, __VA_ARGS__ )
88 #define AA_FMOD_C_END( prefix, name ) AA_MANGLE_FMOD_C( i64, prefix, name )
89 
90 
91 #elif defined AA_TYPE_FLOGICAL1
92 
93 #define AA_TYPE bool
94 #define AA_NAME( prefix, name ) AA_MANGLE_NAME( l8, prefix, name )
95 #define AA_FMOD( prefix, name ) AA_MANGLE_FMOD( l8, prefix, name )
96 #define AA_FMOD_F( prefix, name ) AA_MANGLE_FMOD_F( l8, prefix, name )
97 #define AA_FMOD_C_BEGIN( prefix, name, ... ) AA_MANGLE_FMOD_BIND_C( l8, prefix, name, __VA_ARGS__ )
98 #define AA_FMOD_C_END( prefix, name ) AA_MANGLE_FMOD_C( l8, prefix, name )
99 
100 #elif defined AA_TYPE_FLOGICAL4
101 
102 #define AA_TYPE bool
103 #define AA_NAME( prefix, name ) AA_MANGLE_NAME( l32, prefix, name )
104 #define AA_FMOD( prefix, name ) AA_MANGLE_FMOD( l32, prefix, name )
105 #define AA_FMOD_F( prefix, name ) AA_MANGLE_FMOD_F( l32, prefix, name )
106 #define AA_FMOD_C_BEGIN( prefix, name, ... ) AA_MANGLE_FMOD_BIND_C( l32, prefix, name, __VA_ARGS__ )
107 #define AA_FMOD_C_END( prefix, name ) AA_MANGLE_FMOD_C( l32, prefix, name )
108 
109 
110 #else
111 
112 #error "Need to define AA_TYPE_?"
113 
114 #endif
115 
116 
117 #if 0
118 /* Declarations for fortran-defined functions.
119  */
120 #endif
121 
122 #define AA_FDEC( rettype, prefix, name, ... ) \
123  AA_API rettype AA_NAME( prefix, name ) ( __VA_ARGS__ );