blob: 1e1e736c13aa38423871f37d07ec0ea0ad6735ed [file] [log] [blame]
/* Copyright (c) 2013 Julien Pommier ( pommier@modartt.com )
Redistribution and use of the Software in source and binary forms,
with or without modification, is permitted provided that the
following conditions are met:
- Neither the names of NCAR's Computational and Information Systems
Laboratory, the University Corporation for Atmospheric Research,
nor the names of its sponsors or contributors may be used to
endorse or promote products derived from this Software without
specific prior written permission.
- Redistributions of source code must retain the above copyright
notices, this list of conditions, and the disclaimer below.
- Redistributions in binary form must reproduce the above copyright
notice, this list of conditions, and the disclaimer below in the
documentation and/or other materials provided with the
distribution.
THIS 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 CONTRIBUTORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL 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 WITH THE
SOFTWARE.
*/
#ifndef PF_SCAL_FLT_H
#define PF_SCAL_FLT_H
/*
fallback mode for situations where SSE/Altivec are not available, use scalar mode instead
*/
#ifdef PFFFT_SIMD_DISABLE
typedef float v4sf;
# define SIMD_SZ 1
# define VREQUIRES_ALIGN 0
# define VZERO() 0.f
# define VMUL(a,b) ((a)*(b))
# define VADD(a,b) ((a)+(b))
# define VMADD(a,b,c) ((a)*(b)+(c))
# define VSUB(a,b) ((a)-(b))
# define LD_PS1(p) (p)
# define VLOAD_UNALIGNED(ptr) (*(ptr))
# define VLOAD_ALIGNED(ptr) (*(ptr))
# define VALIGNED(ptr) ((((uintptr_t)(ptr)) & 0x3) == 0)
#endif
#endif /* PF_SCAL_FLT_H */