Loading...
Searching...
No Matches
volk_32i_x2_and_32i

Overview

Computes the Boolean AND operation between two input 32-bit integer vectors.

Dispatcher Prototype

void volk_32i_x2_and_32i(int32_t* cVector, const int32_t* aVector, const int32_t*
bVector, unsigned int num_points)

Inputs

- aVector: Input vector of samples.
- bVector: Input vector of samples.
- num_points: The number of values.

Outputs

- cVector: The output vector.

Example This example generates a Karnaugh map for the lower two bits of x AND y.

int N = 1<<4;
unsigned int alignment = volk_get_alignment();
int32_t* x = (int32_t*)volk_malloc(N*sizeof(int32_t), alignment);
int32_t* y = (int32_t*)volk_malloc(N*sizeof(int32_t), alignment);
int32_t* z = (int32_t*)volk_malloc(N*sizeof(int32_t), alignment);
int32_t in_seq[] = {0,1,3,2};
unsigned int jj=0;
for(unsigned int ii=0; ii<N; ++ii){
x[ii] = in_seq[ii%4];
y[ii] = in_seq[jj];
if(((ii+1) % 4) == 0) jj++;
}
volk_32i_x2_and_32i(z, x, y, N);
printf("Karnaugh map for x AND y\n");
printf("y\\x|");
for(unsigned int ii=0; ii<4; ++ii){
printf(" %.2x ", in_seq[ii]);
}
printf("\n---|---------------\n");
jj = 0;
for(unsigned int ii=0; ii<N; ++ii){
if(((ii+1) % 4) == 1){
printf("%.2x | ", in_seq[jj++]);
}
printf("%.2x ", z[ii]);
if(!((ii+1) % 4)){
printf("\n");
}
}