o-du/phy
Intel O-RAN/X-RAN Generated Doxygen Documentation
|
#include "xran_compression.hpp"
#include "xran_compression.h"
#include <complex>
#include <algorithm>
#include <immintrin.h>
#include <limits.h>
#include <cstring>
Go to the source code of this file.
Macros | |
#define | RB_NUM_ROUNDUP(rb) (BlockFloatCompander::k_numRB * ((rb + BlockFloatCompander::k_numRB - 1) / BlockFloatCompander::k_numRB)) |
Typedefs | |
typedef void(* | xran_bfp_compress_fn) (const BlockFloatCompander::ExpandedData &dataIn, BlockFloatCompander::CompressedData *dataOut) |
typedef void(* | xran_bfp_compress_bfw_fn) (const BlockFloatCompanderBFW::ExpandedData &dataIn, BlockFloatCompanderBFW::CompressedData *dataOut) |
typedef void(* | xran_bfp_decompress_fn) (const BlockFloatCompander::CompressedData &dataIn, BlockFloatCompander::ExpandedData *dataOut) |
Functions | |
void | computeExponent (const BlockFloatCompander::ExpandedData &dataIn, int8_t *expStore) |
Compute exponent value for a set of RB from the maximum absolute value. More... | |
__m512i | networkBytePack9b (const __m512i compData) |
__m512i | networkBytePack10b (const __m512i compData) |
__m512i | networkBytePack12b (const __m512i compData) |
__m512i | networkByteUnpack9b (const uint8_t *inData) |
__m512i | networkByteUnpack10b (const uint8_t *inData) |
__m512i | networkByteUnpack12b (const uint8_t *inData) |
int32_t | xranlib_compress_avx512 (const struct xranlib_compress_request *request, struct xranlib_compress_response *response) |
int32_t | xranlib_compress_avx512_bfw (const struct xranlib_compress_request *request, struct xranlib_compress_response *response) |
int32_t | xranlib_decompress_avx512 (const struct xranlib_decompress_request *request, struct xranlib_decompress_response *response) |
#define RB_NUM_ROUNDUP | ( | rb | ) | (BlockFloatCompander::k_numRB * ((rb + BlockFloatCompander::k_numRB - 1) / BlockFloatCompander::k_numRB)) |
Definition at line 720 of file xran_compression.cpp.
typedef void(* xran_bfp_compress_bfw_fn) (const BlockFloatCompanderBFW::ExpandedData &dataIn, BlockFloatCompanderBFW::CompressedData *dataOut) |
callback function type for Symbol packet
Definition at line 780 of file xran_compression.cpp.
typedef void(* xran_bfp_compress_fn) (const BlockFloatCompander::ExpandedData &dataIn, BlockFloatCompander::CompressedData *dataOut) |
callback function type for Symbol packet
Definition at line 725 of file xran_compression.cpp.
typedef void(* xran_bfp_decompress_fn) (const BlockFloatCompander::CompressedData &dataIn, BlockFloatCompander::ExpandedData *dataOut) |
callback function type for Symbol packet
Definition at line 830 of file xran_compression.cpp.
void computeExponent | ( | const BlockFloatCompander::ExpandedData & | dataIn, |
int8_t * | expStore | ||
) |
Compute exponent value for a set of RB from the maximum absolute value.
Load data and find max(abs(RB))
Re-order the next 4RB in input data into 3 registers Input SIMD vectors are: [A A A A A A A A A A A A B B B B] [B B B B B B B B C C C C C C C C] [C C C C D D D D D D D D D D D D] Re-ordered SIMD vectors are: [A A A A B B B B C C C C D D D D] [A A A A B B B B C C C C D D D D] [A A A A B B B B C C C C D D D D]
Perform max abs on these 3 registers
Perform horizontal max over each lane Swap 64b in each lane and compute max
Swap each pair of 32b in each lane and compute max
Swap each IQ pair in each lane (via 32b rotation) and compute max
Insert values into maxAbs Use sliding mask to insert wanted values into maxAbs Pairs of values will be inserted and corrected outside of loop
Convert to 32b by removing repeated values in maxAbs
Compute and store exponent
Definition at line 44 of file xran_compression.cpp.
__m512i networkBytePack10b | ( | const __m512i | compData | ) |
Pack compressed 10 bit data in network byte order See https://soco.intel.com/docs/DOC-2665619
Logical shift left to align network order byte parts
First epi8 shuffle of even indexed samples
Second epi8 shuffle of odd indexed samples
Ternary blend of the two shuffled results
Definition at line 164 of file xran_compression.cpp.
__m512i networkBytePack12b | ( | const __m512i | compData | ) |
Pack compressed 12 bit data in network byte order See https://soco.intel.com/docs/DOC-2665619
Logical shift left to align network order byte parts
First epi8 shuffle of even indexed samples
Second epi8 shuffle of odd indexed samples
Ternary blend of the two shuffled results
Definition at line 201 of file xran_compression.cpp.
__m512i networkBytePack9b | ( | const __m512i | compData | ) |
Pack compressed 9 bit data in network byte order See https://soco.intel.com/docs/DOC-2665619
Logical shift left to align network order byte parts
First epi8 shuffle of even indexed samples
Second epi8 shuffle of odd indexed samples
Ternary blend of the two shuffled results
Definition at line 127 of file xran_compression.cpp.
__m512i networkByteUnpack10b | ( | const uint8_t * | inData | ) |
Unpack compressed 10 bit data in network byte order See https://soco.intel.com/docs/DOC-2665619
Align chunks of compressed bytes into lanes to allow for expansion
Byte shuffle to get all bits for each sample into 16b chunks Due to previous permute to get chunks of bytes into each lane, lanes 0 and 2 happen to be aligned, but lane 1 is offset by 2 bytes
Logical shift left to set sign bit
Mask to zero unwanted bits
Definition at line 271 of file xran_compression.cpp.
__m512i networkByteUnpack12b | ( | const uint8_t * | inData | ) |
Unpack compressed 12 bit data in network byte order See https://soco.intel.com/docs/DOC-2665619
Align chunks of compressed bytes into lanes to allow for expansion
Byte shuffle to get all bits for each sample into 16b chunks For 12b mantissa all lanes post-permute are aligned and require same shuffle offset
Logical shift left to set sign bit
Mask to zero unwanted bits
Definition at line 304 of file xran_compression.cpp.
__m512i networkByteUnpack9b | ( | const uint8_t * | inData | ) |
Unpack compressed 9 bit data in network byte order See https://soco.intel.com/docs/DOC-2665619
Align chunks of compressed bytes into lanes to allow for expansion
Byte shuffle to get all bits for each sample into 16b chunks Due to previous permute to get chunks of bytes into each lane, there is a different shuffle offset in each lane
Logical shift left to set sign bit
Mask to zero unwanted bits
Definition at line 238 of file xran_compression.cpp.
int32_t xranlib_compress_avx512 | ( | const struct xranlib_compress_request * | request, |
struct xranlib_compress_response * | response | ||
) |
Definition at line 729 of file xran_compression.cpp.
int32_t xranlib_compress_avx512_bfw | ( | const struct xranlib_compress_request * | request, |
struct xranlib_compress_response * | response | ||
) |
Definition at line 783 of file xran_compression.cpp.
int32_t xranlib_decompress_avx512 | ( | const struct xranlib_decompress_request * | request, |
struct xranlib_decompress_response * | response | ||
) |
Definition at line 834 of file xran_compression.cpp.