| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | /* -*- c++ -*- */ | ||
| 2 | /* | ||
| 3 | * Copyright 2014 Free Software Foundation, Inc. | ||
| 4 | * | ||
| 5 | * This file is part of VOLK | ||
| 6 | * | ||
| 7 | * SPDX-License-Identifier: LGPL-3.0-or-later | ||
| 8 | */ | ||
| 9 | |||
| 10 | #ifndef INCLUDED_volk_64u_popcntpuppet_64u_H | ||
| 11 | #define INCLUDED_volk_64u_popcntpuppet_64u_H | ||
| 12 | |||
| 13 | #include <stdint.h> | ||
| 14 | #include <string.h> | ||
| 15 | #include <volk/volk_64u_popcnt.h> | ||
| 16 | |||
| 17 | #ifdef LV_HAVE_GENERIC | ||
| 18 | 2 | static inline void volk_64u_popcntpuppet_64u_generic(uint64_t* outVector, | |
| 19 | const uint64_t* inVector, | ||
| 20 | unsigned int num_points) | ||
| 21 | { | ||
| 22 | unsigned int ii; | ||
| 23 |
2/2✓ Branch 0 taken 262142 times.
✓ Branch 1 taken 2 times.
|
262144 | for (ii = 0; ii < num_points; ++ii) { |
| 24 | 262142 | volk_64u_popcnt_generic(outVector + ii, num_points); | |
| 25 | } | ||
| 26 | 2 | memcpy((void*)outVector, (void*)inVector, num_points * sizeof(uint64_t)); | |
| 27 | 2 | } | |
| 28 | #endif /* LV_HAVE_GENERIC */ | ||
| 29 | |||
| 30 | #if LV_HAVE_SSE4_2 && LV_HAVE_64 | ||
| 31 | 2 | static inline void volk_64u_popcntpuppet_64u_a_sse4_2(uint64_t* outVector, | |
| 32 | const uint64_t* inVector, | ||
| 33 | unsigned int num_points) | ||
| 34 | { | ||
| 35 | unsigned int ii; | ||
| 36 |
2/2✓ Branch 0 taken 262142 times.
✓ Branch 1 taken 2 times.
|
262144 | for (ii = 0; ii < num_points; ++ii) { |
| 37 | 262142 | volk_64u_popcnt_a_sse4_2(outVector + ii, num_points); | |
| 38 | } | ||
| 39 | 2 | memcpy((void*)outVector, (void*)inVector, num_points * sizeof(uint64_t)); | |
| 40 | 2 | } | |
| 41 | #endif /* LV_HAVE_SSE4_2 */ | ||
| 42 | |||
| 43 | #ifdef LV_HAVE_NEON | ||
| 44 | static inline void volk_64u_popcntpuppet_64u_neon(uint64_t* outVector, | ||
| 45 | const uint64_t* inVector, | ||
| 46 | unsigned int num_points) | ||
| 47 | { | ||
| 48 | unsigned int ii; | ||
| 49 | for (ii = 0; ii < num_points; ++ii) { | ||
| 50 | volk_64u_popcnt_neon(outVector + ii, num_points); | ||
| 51 | } | ||
| 52 | memcpy((void*)outVector, (void*)inVector, num_points * sizeof(uint64_t)); | ||
| 53 | } | ||
| 54 | #endif /* LV_HAVE_NEON */ | ||
| 55 | |||
| 56 | #endif /* INCLUDED_volk_32fc_s32fc_rotatorpuppet_32fc_a_H */ | ||
| 57 |