Overview
Selects maximum value from each entry between bVector and aVector and store their results in the cVector.
c[i] = max(a[i], b[i])
Dispatcher Prototype
void volk_64f_x2_max_64f(double* cVector, const double* aVector, const double* bVector,
unsigned int num_points)
Inputs
- aVector: First input vector.
- bVector: Second input vector.
- num_points: The number of values in both input vectors.
Outputs
- cVector: The output vector.
Example
int N = 10;
double* increasing = (
double*)
volk_malloc(
sizeof(
double)*N, alignment);
double* decreasing = (
double*)
volk_malloc(
sizeof(
double)*N, alignment);
double* out = (
double*)
volk_malloc(
sizeof(
double)*N, alignment);
for(unsigned int ii = 0; ii < N; ++ii){
increasing[ii] = (double)ii;
decreasing[ii] = 10.f - (double)ii;
}
volk_64f_x2_max_64f(out, increasing, decreasing, N);
for(unsigned int ii = 0; ii < N; ++ii){
printf("out[%u] = %1.2g\n", ii, out[ii]);
}
size_t volk_get_alignment(void)
Get the machine alignment in bytes.
Definition: volk.tmpl.c:90
__VOLK_DECL_BEGIN VOLK_API void * volk_malloc(size_t size, size_t alignment)
Allocate size bytes of data aligned to alignment.
Definition: volk_malloc.c:38
VOLK_API void volk_free(void *aptr)
Free's memory allocated by volk_malloc.
Definition: volk_malloc.c:80