Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-31 10:25:32

0001 /*  This file is part of the Vc library. {{{
0002 Copyright © 2011-2015 Matthias Kretz <kretz@kde.org>
0003 
0004 Redistribution and use in source and binary forms, with or without
0005 modification, are permitted provided that the following conditions are met:
0006     * Redistributions of source code must retain the above copyright
0007       notice, this list of conditions and the following disclaimer.
0008     * Redistributions in binary form must reproduce the above copyright
0009       notice, this list of conditions and the following disclaimer in the
0010       documentation and/or other materials provided with the distribution.
0011     * Neither the names of contributing organizations nor the
0012       names of its contributors may be used to endorse or promote products
0013       derived from this software without specific prior written permission.
0014 
0015 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
0016 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
0017 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
0018 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY
0019 DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
0020 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
0021 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
0022 ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
0023 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
0024 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
0025 
0026 }}}*/
0027 
0028 #ifndef VC_AVX_HELPERIMPL_H_
0029 #define VC_AVX_HELPERIMPL_H_
0030 
0031 #include "../sse/helperimpl.h"
0032 #include "macros.h"
0033 
0034 namespace Vc_VERSIONED_NAMESPACE
0035 {
0036 namespace Detail
0037 {
0038 template <typename A>
0039 inline void deinterleave(AVX2::float_v &, AVX2::float_v &, const float *, A);
0040 template <typename A>
0041 inline void deinterleave(AVX2::float_v &, AVX2::float_v &, const short *, A);
0042 template <typename A>
0043 inline void deinterleave(AVX2::float_v &, AVX2::float_v &, const ushort *, A);
0044 template <typename A>
0045 inline void deinterleave(AVX2::double_v &, AVX2::double_v &, const double *, A);
0046 template <typename A>
0047 inline void deinterleave(AVX2::int_v &, AVX2::int_v &, const int *, A);
0048 template <typename A>
0049 inline void deinterleave(AVX2::int_v &, AVX2::int_v &, const short *, A);
0050 template <typename A>
0051 inline void deinterleave(AVX2::uint_v &, AVX2::uint_v &, const uint *, A);
0052 template <typename A>
0053 inline void deinterleave(AVX2::uint_v &, AVX2::uint_v &, const ushort *, A);
0054 template <typename A>
0055 inline void deinterleave(AVX2::short_v &, AVX2::short_v &, const short *, A);
0056 template <typename A>
0057 inline void deinterleave(AVX2::ushort_v &, AVX2::ushort_v &, const ushort *, A);
0058 
0059 template <typename T, typename M, typename A>
0060 Vc_ALWAYS_INLINE_L void deinterleave(AVX2::Vector<T> &Vc_RESTRICT a,
0061                                      AVX2::Vector<T> &Vc_RESTRICT b,
0062                                      AVX2::Vector<T> &Vc_RESTRICT c,
0063                                      const M *Vc_RESTRICT memory,
0064                                      A align) Vc_ALWAYS_INLINE_R;
0065 template <typename T, typename M, typename A>
0066 Vc_ALWAYS_INLINE_L void deinterleave(AVX2::Vector<T> &Vc_RESTRICT a,
0067                                      AVX2::Vector<T> &Vc_RESTRICT b,
0068                                      AVX2::Vector<T> &Vc_RESTRICT c,
0069                                      AVX2::Vector<T> &Vc_RESTRICT d,
0070                                      const M *Vc_RESTRICT memory,
0071                                      A align) Vc_ALWAYS_INLINE_R;
0072 template <typename T, typename M, typename A>
0073 Vc_ALWAYS_INLINE_L void deinterleave(AVX2::Vector<T> &Vc_RESTRICT a,
0074                                      AVX2::Vector<T> &Vc_RESTRICT b,
0075                                      AVX2::Vector<T> &Vc_RESTRICT c,
0076                                      AVX2::Vector<T> &Vc_RESTRICT d,
0077                                      AVX2::Vector<T> &Vc_RESTRICT e,
0078                                      const M *Vc_RESTRICT memory,
0079                                      A align) Vc_ALWAYS_INLINE_R;
0080 template <typename T, typename M, typename A>
0081 Vc_ALWAYS_INLINE_L void deinterleave(
0082     AVX2::Vector<T> &Vc_RESTRICT a, AVX2::Vector<T> &Vc_RESTRICT b,
0083     AVX2::Vector<T> &Vc_RESTRICT c, AVX2::Vector<T> &Vc_RESTRICT d,
0084     AVX2::Vector<T> &Vc_RESTRICT e, AVX2::Vector<T> &Vc_RESTRICT f,
0085     const M *Vc_RESTRICT memory, A align) Vc_ALWAYS_INLINE_R;
0086 template <typename T, typename M, typename A>
0087 Vc_ALWAYS_INLINE_L void deinterleave(
0088     AVX2::Vector<T> &Vc_RESTRICT a, AVX2::Vector<T> &Vc_RESTRICT b,
0089     AVX2::Vector<T> &Vc_RESTRICT c, AVX2::Vector<T> &Vc_RESTRICT d,
0090     AVX2::Vector<T> &Vc_RESTRICT e, AVX2::Vector<T> &Vc_RESTRICT f,
0091     AVX2::Vector<T> &Vc_RESTRICT g, AVX2::Vector<T> &Vc_RESTRICT h,
0092     const M *Vc_RESTRICT memory, A align) Vc_ALWAYS_INLINE_R;
0093 
0094 Vc_ALWAYS_INLINE void prefetchForOneRead(const void *addr, VectorAbi::Avx)
0095 {
0096     prefetchForOneRead(addr, VectorAbi::Sse());
0097 }
0098 Vc_ALWAYS_INLINE void prefetchForModify(const void *addr, VectorAbi::Avx)
0099 {
0100     prefetchForModify(addr, VectorAbi::Sse());
0101 }
0102 Vc_ALWAYS_INLINE void prefetchClose(const void *addr, VectorAbi::Avx)
0103 {
0104     prefetchClose(addr, VectorAbi::Sse());
0105 }
0106 Vc_ALWAYS_INLINE void prefetchMid(const void *addr, VectorAbi::Avx)
0107 {
0108     prefetchMid(addr, VectorAbi::Sse());
0109 }
0110 Vc_ALWAYS_INLINE void prefetchFar(const void *addr, VectorAbi::Avx)
0111 {
0112     prefetchFar(addr, VectorAbi::Sse());
0113 }
0114 }  // namespace Detail
0115 }  // namespace Vc
0116 
0117 #include "deinterleave.tcc"
0118 
0119 #endif // VC_AVX_HELPERIMPL_H_