Loading...
Searching...
No Matches
volk_32u_byteswap

Overview

Byteswaps (in-place) an aligned vector of int32_t's.

Dispatcher Prototype

void volk_32u_byteswap(uint32_t* intsToSwap, unsigned int num_points)

Inputs

- intsToSwap: The vector of data to byte swap.
- num_points: The number of data points.

Outputs

- intsToSwap: returns as an in-place calculation.

Example

int N = 10;
unsigned int alignment = volk_get_alignment();
uint32_t bitstring[] = {0x0, 0x1, 0xf, 0xffffffff,
0x5a5a5a5a, 0xa5a5a5a5, 0x2a2a2a2a,
0xffffffff, 0x32, 0x64};
uint32_t hamming_distance = 0;
printf("byteswap vector =\n");
for(unsigned int ii=0; ii<N; ++ii){
printf(" %.8x\n", bitstring[ii]);
}
volk_32u_byteswap(bitstring, N);
printf("byteswapped vector =\n");
for(unsigned int ii=0; ii<N; ++ii){
printf(" %.8x\n", bitstring[ii]);
}