]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - dense-linear-algebra-libraries/linalg.git/blob - blis/frame/include/level0/old/bli_copynzjs.h
Consolidate all git repos of linalg into one.
[dense-linear-algebra-libraries/linalg.git] / blis / frame / include / level0 / old / bli_copynzjs.h
1 /*
3    BLIS    
4    An object-based framework for developing high-performance BLAS-like
5    libraries.
7    Copyright (C) 2014, The University of Texas at Austin
9    Redistribution and use in source and binary forms, with or without
10    modification, are permitted provided that the following conditions are
11    met:
12     - Redistributions of source code must retain the above copyright
13       notice, this list of conditions and the following disclaimer.
14     - Redistributions in binary form must reproduce the above copyright
15       notice, this list of conditions and the following disclaimer in the
16       documentation and/or other materials provided with the distribution.
17     - Neither the name of The University of Texas at Austin nor the names
18       of its contributors may be used to endorse or promote products
19       derived from this software without specific prior written permission.
21    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22    "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23    LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
24    A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
25    HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
26    SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
27    LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28    DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29    THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30    (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31    OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */
35 #ifndef BLIS_COPYNZJS_H
36 #define BLIS_COPYNZJS_H
38 // copynzjs
40 // Notes:
41 // - The first char encodes the type of x.
42 // - The second char encodes the type of y.
43 // - x is copied in conjugated form.
45 #define bli_sscopynzjs( x, y ) \
46 { \
47         (y) = ( float  ) (x); \
48 }
49 #define bli_dscopynzjs( x, y ) \
50 { \
51         (y) = ( float  ) (x); \
52 }
53 #define bli_cscopynzjs( x, y ) \
54 { \
55         (y) = ( float  ) (x).real; \
56 }
57 #define bli_zscopynzjs( x, y ) \
58 { \
59         (y) = ( float  ) (x).real; \
60 }
62 #define bli_sdcopynzjs( x, y ) \
63 { \
64         (y) = ( double ) (x); \
65 }
66 #define bli_ddcopynzjs( x, y ) \
67 { \
68         (y) = ( double ) (x); \
69 }
70 #define bli_cdcopynzjs( x, y ) \
71 { \
72         (y) = ( double ) (x).real; \
73 }
74 #define bli_zdcopynzjs( x, y ) \
75 { \
76         (y) = ( double ) (x).real; \
77 }
79 #define bli_sccopynzjs( x, y ) \
80 { \
81         (y).real = ( float  ) (x); \
82         /* (y).imag = 0.0F; (SKIP COPYING OF ZERO) */ \
83 }
84 #define bli_dccopynzjs( x, y ) \
85 { \
86         (y).real = ( float  ) (x); \
87         /* (y).imag = 0.0F; (SKIP COPYING OF ZERO) */ \
88 }
89 #define bli_cccopynzjs( x, y ) \
90 { \
91         (y).real = ( float  )  (x).real; \
92         (y).imag = ( float  ) -(x).imag; \
93 }
94 #define bli_zccopynzjs( x, y ) \
95 { \
96         (y).real = ( float  )  (x).real; \
97         (y).imag = ( float  ) -(x).imag; \
98 }
100 #define bli_szcopynzjs( x, y ) \
101 { \
102         (y).real = ( double ) (x); \
103         /* (y).imag = 0.0; (SKIP COPYING OF ZERO) */ \
105 #define bli_dzcopynzjs( x, y ) \
106 { \
107         (y).real = ( double ) (x); \
108         /* (y).imag = 0.0; (SKIP COPYING OF ZERO) */ \
110 #define bli_czcopynzjs( x, y ) \
111 { \
112         (y).real = ( double )  (x).real; \
113         (y).imag = ( double ) -(x).imag; \
115 #define bli_zzcopynzjs( x, y ) \
116 { \
117         (y).real = ( double )  (x).real; \
118         (y).imag = ( double ) -(x).imag; \
122 #define bli_scopynzjs( x, y ) \
123 { \
124         bli_sscopynzjs( x, y ); \
126 #define bli_dcopynzjs( x, y ) \
127 { \
128         bli_ddcopynzjs( x, y ); \
130 #define bli_ccopynzjs( x, y ) \
131 { \
132         bli_cccopynzjs( x, y ); \
134 #define bli_zcopynzjs( x, y ) \
135 { \
136         bli_zzcopynzjs( x, y ); \
140 #endif