Skip to content

Commit

Permalink
volk_32f{c}_index_max_16u: changed output variable from unsigned int …
Browse files Browse the repository at this point in the history
…to unsigned short to match the function name.
  • Loading branch information
trondeau committed Apr 10, 2016
1 parent f1c4b55 commit cb83e1c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
16 changes: 8 additions & 8 deletions kernels/volk/volk_32f_index_max_16u.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
*
* <b>Dispatcher Prototype</b>
* \code
* void volk_32f_index_max_16u_a_sse4_1(unsigned int* target, const float* src0, unsigned int num_points)
* void volk_32f_index_max_16u(unsigned short* target, const float* src0, unsigned int num_points)
* \endcode
*
* \b Inputs
Expand All @@ -44,7 +44,7 @@
* int N = 10;
* unsigned int alignment = volk_get_alignment();
* float* in = (float*)volk_malloc(sizeof(float)*N, alignment);
* uint32_t* out = (uint32_t*)volk_malloc(sizeof(uint32_t), alignment);
* uint16_t* out = (uint16_t*)volk_malloc(sizeof(uint16_t), alignment);
*
* for(unsigned int ii = 0; ii < N; ++ii){
* float x = (float)ii;
Expand Down Expand Up @@ -73,7 +73,7 @@
#include<smmintrin.h>

static inline void
volk_32f_index_max_16u_a_sse4_1(unsigned int* target, const float* src0, unsigned int num_points)
volk_32f_index_max_16u_a_sse4_1(unsigned short* target, const float* src0, unsigned int num_points)
{
if(num_points > 0){
unsigned int number = 0;
Expand Down Expand Up @@ -123,7 +123,7 @@ volk_32f_index_max_16u_a_sse4_1(unsigned int* target, const float* src0, unsigne
max = src0[number];
}
}
target[0] = (unsigned int)index;
target[0] = (unsigned short)index;
}
}

Expand All @@ -135,7 +135,7 @@ volk_32f_index_max_16u_a_sse4_1(unsigned int* target, const float* src0, unsigne
#include<xmmintrin.h>

static inline void
volk_32f_index_max_16u_a_sse(unsigned int* target, const float* src0, unsigned int num_points)
volk_32f_index_max_16u_a_sse(unsigned short* target, const float* src0, unsigned int num_points)
{
if(num_points > 0){
unsigned int number = 0;
Expand Down Expand Up @@ -186,7 +186,7 @@ volk_32f_index_max_16u_a_sse(unsigned int* target, const float* src0, unsigned i
max = src0[number];
}
}
target[0] = (unsigned int)index;
target[0] = (unsigned short)index;
}
}

Expand All @@ -196,11 +196,11 @@ volk_32f_index_max_16u_a_sse(unsigned int* target, const float* src0, unsigned i
#ifdef LV_HAVE_GENERIC

static inline void
volk_32f_index_max_16u_generic(unsigned int* target, const float* src0, unsigned int num_points)
volk_32f_index_max_16u_generic(unsigned short* target, const float* src0, unsigned int num_points)
{
if(num_points > 0){
float max = src0[0];
unsigned int index = 0;
unsigned short index = 0;

unsigned int i = 1;

Expand Down
10 changes: 5 additions & 5 deletions kernels/volk/volk_32fc_index_max_16u.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
*
* <b>Dispatcher Prototype</b>
* \code
* void volk_32fc_index_max_16u_a_sse3(unsigned int* target, lv_32fc_t* src0, unsigned int num_points)
* void volk_32fc_index_max_16u(unsigned short* target, lv_32fc_t* src0, unsigned int num_points)
* \endcode
*
* \b Inputs
Expand All @@ -47,7 +47,7 @@
* int N = 10;
* unsigned int alignment = volk_get_alignment();
* lv_32fc_t* in = (lv_32fc_t*)volk_malloc(sizeof(lv_32fc_t)*N, alignment);
* uint32_t* max = (uint32_t*)volk_malloc(sizeof(uint32_t), alignment);
* uint16_t* max = (uint16_t*)volk_malloc(sizeof(uint16_t), alignment);
*
* for(unsigned int ii = 0; ii < N/2; ++ii){
* float real = 2.f * ((float)ii / (float)N) - 1.f;
Expand Down Expand Up @@ -80,7 +80,7 @@
#include<pmmintrin.h>

static inline void
volk_32fc_index_max_16u_a_sse3(unsigned int* target, lv_32fc_t* src0,
volk_32fc_index_max_16u_a_sse3(unsigned short* target, lv_32fc_t* src0,
unsigned int num_points)
{
const unsigned int num_bytes = num_points*8;
Expand Down Expand Up @@ -227,14 +227,14 @@ volk_32fc_index_max_16u_a_sse3(unsigned int* target, lv_32fc_t* src0,

#ifdef LV_HAVE_GENERIC
static inline void
volk_32fc_index_max_16u_generic(unsigned int* target, lv_32fc_t* src0,
volk_32fc_index_max_16u_generic(unsigned short* target, lv_32fc_t* src0,
unsigned int num_points)
{
const unsigned int num_bytes = num_points*8;

float sq_dist = 0.0;
float max = 0.0;
unsigned int index = 0;
unsigned short index = 0;

unsigned int i = 0;

Expand Down

0 comments on commit cb83e1c

Please sign in to comment.