Vector Optimized Library of Kernels 3.1.0
Architecture-tuned implementations of math kernels
volk_64u_popcntpuppet_64u.h
Go to the documentation of this file.
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>
16
17#ifdef LV_HAVE_GENERIC
18static 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 for (ii = 0; ii < num_points; ++ii) {
24 volk_64u_popcnt_generic(outVector + ii, num_points);
25 }
26 memcpy((void*)outVector, (void*)inVector, num_points * sizeof(uint64_t));
27}
28#endif /* LV_HAVE_GENERIC */
29
30#if LV_HAVE_SSE4_2 && LV_HAVE_64
31static 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 for (ii = 0; ii < num_points; ++ii) {
37 volk_64u_popcnt_a_sse4_2(outVector + ii, num_points);
38 }
39 memcpy((void*)outVector, (void*)inVector, num_points * sizeof(uint64_t));
40}
41#endif /* LV_HAVE_SSE4_2 */
42
43#ifdef LV_HAVE_NEON
44static 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 */