/* Copyright (c) 2009, 2010, 2011 STMicroelectronics Written by Christophe Lyon Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #ifndef _STM_ARM_NEON_REF_H_ #define _STM_ARM_NEON_REF_H_ #include #include #include #define xSTR(X) #X #define STR(X) xSTR(X) #define xNAME1(V,T) V ## _ ## T #define xNAME(V,T) xNAME1(V,T) #define VAR(V,T,W) xNAME(V,T##W) #define VAR_DECL(V, T, W) T##W##_t VAR(V,T,W) #define VECT_NAME(T, W, N) T##W##x##N #define VECT_ARRAY_NAME(T, W, N, L) T##W##x##N##x##L #define VECT_TYPE(T, W, N) xNAME(VECT_NAME(T,W,N),t) #define VECT_ARRAY_TYPE(T, W, N, L) xNAME(VECT_ARRAY_NAME(T,W,N,L),t) #define VECT_VAR(V,T,W,N) xNAME(V,VECT_NAME(T,W,N)) #define VECT_VAR_DECL(V, T, W, N) T##W##_t VECT_VAR(V,T,W,N) #define VECT_VAR_DECL_INIT(V, T, W, N) T##W##_t VECT_VAR(V,T,W,N) INIT_TAB(T##W##_t) #define ARRAY(V, T, W, N) VECT_VAR_DECL(V,T,W,N)[N] #define VECT_ARRAY_VAR(V,T,W,N,L) xNAME(V,VECT_ARRAY_NAME(T,W,N,L)) static int result_idx = 0; #define DUMP(MSG,T,W,N,FMT) \ fprintf(ref_file, "%s:%d:%s [] = { ", MSG, result_idx++, \ STR(VECT_VAR(result, T, W, N))); \ for(i=0; i