Vector Optimized Library of Kernels  2.4
Architecture-tuned implementations of math kernels
volk_32f_x2_max_32f.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2012, 2014 Free Software Foundation, Inc.
4  *
5  * This file is part of GNU Radio
6  *
7  * GNU Radio is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 3, or (at your option)
10  * any later version.
11  *
12  * GNU Radio is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with GNU Radio; see the file COPYING. If not, write to
19  * the Free Software Foundation, Inc., 51 Franklin Street,
20  * Boston, MA 02110-1301, USA.
21  */
22 
71 #ifndef INCLUDED_volk_32f_x2_max_32f_a_H
72 #define INCLUDED_volk_32f_x2_max_32f_a_H
73 
74 #include <inttypes.h>
75 #include <stdio.h>
76 
77 #ifdef LV_HAVE_AVX512F
78 #include <immintrin.h>
79 
80 static inline void volk_32f_x2_max_32f_a_avx512f(float* cVector,
81  const float* aVector,
82  const float* bVector,
83  unsigned int num_points)
84 {
85  unsigned int number = 0;
86  const unsigned int sixteenthPoints = num_points / 16;
87 
88  float* cPtr = cVector;
89  const float* aPtr = aVector;
90  const float* bPtr = bVector;
91 
92  __m512 aVal, bVal, cVal;
93  for (; number < sixteenthPoints; number++) {
94  aVal = _mm512_load_ps(aPtr);
95  bVal = _mm512_load_ps(bPtr);
96 
97  cVal = _mm512_max_ps(aVal, bVal);
98 
99  _mm512_store_ps(cPtr, cVal); // Store the results back into the C container
100 
101  aPtr += 16;
102  bPtr += 16;
103  cPtr += 16;
104  }
105 
106  number = sixteenthPoints * 16;
107  for (; number < num_points; number++) {
108  const float a = *aPtr++;
109  const float b = *bPtr++;
110  *cPtr++ = (lb ? alrd">const float b = *bPtr++;
109  const float b = *bPtr++;
110  *cPtr++ = (lb ? alrd">const
109  const float b = *bPtr++;
110
4/span>&ass="comment"> */
float* cVector,
69 #ifndef INCLUDED_volk_32f_stddev_and_mean_32f_x2_a_H
70 #define INCLUDED_volk_32f_std /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ $(document).ready(function() { iniocessor">#include <math.h>
74 #include <stdio.h>
75 s="lineno"> 102  l#af8ae7a>__VOLK_ATTR_ALIGNED(16) float outputFloatBuffer[4];
541 
542
89  const>  const float* aPtr = input;
525  const float* bPtr = taps;
526 
527  __m128 a0Val, a1Val, a2Val, a3Val;
507  r = max_val;
508  > 106  complexVectorPtr +160;
* bPtr = taps;
525  const float* bPtr = taps;
507  r = max_val;
an> /*OnSearchSelectKey(event)">
static void volk_32f_x2_dot_prod_32f_a_generic ( float *  result,
const float *  input,
em">="liclass="memtitle">◆ volk_32f_x2_dot_prod_32f_a_generic()