@@ -27,7 +27,7 @@ static inline __m512i loadu_epi16_avx512(const void* mem_address)
2727// / \brief Compresses samples of a single resource block using AVX512 intrinsics.
2828// /
2929// / \param[out] compressed_prb Compressed PRB (stores compressed packed values).
30- // / \param[in] uncompr_samples Pointer to an array of uncompressed 16bit samples.
30+ // / \param[in] uncompr_samples Pointer to an array of uncompressed 16-bit samples.
3131// / \param[in] exponent Exponent used in BFP compression.
3232// / \param[in] data_width Bit width of resulting compressed samples.
3333static void
@@ -46,7 +46,7 @@ compress_prb_avx512(compressed_prb& c_prb, const int16_t* uncompr_samples, uint8
4646}
4747
4848void iq_compression_bfp_avx512::compress (span<compressed_prb> output,
49- span<const cf_t > input,
49+ span<const cbf16_t > input,
5050 const ru_compression_params& params)
5151{
5252 // Use generic implementation if AVX512 utils don't support requested bit width.
@@ -55,22 +55,22 @@ void iq_compression_bfp_avx512::compress(span<compressed_prb> output,
5555 return ;
5656 }
5757
58- // AVX512 register size in a number of 16bit words.
58+ // AVX512 register size in a number of 16-bit words.
5959 static constexpr size_t AVX512_REG_SIZE = 32 ;
6060
6161 // Auxiliary arrays used for float to fixed point conversion of the input data.
6262 std::array<int16_t , NOF_SAMPLES_PER_PRB * MAX_NOF_PRBS> input_quantized;
6363
64- span<const float > float_samples_span (reinterpret_cast <const float *>(input.data ()), input.size () * 2U );
65- span<int16_t > input_quantized_span (input_quantized.data (), input .size () * 2U );
66- // Performs conversion of input complex float values to signed 16bit integers.
64+ span<const bf16_t > float_samples_span (reinterpret_cast <const bf16_t *>(input.data ()), input.size () * 2U );
65+ span<int16_t > input_quantized_span (input_quantized.data (), float_samples_span .size ());
66+ // Performs conversion of input brain float values to signed 16-bit integers.
6767 quantize_input (input_quantized_span, float_samples_span);
6868
6969 // Compression algorithm implemented according to Annex A.1.2 in O-RAN.WG4.CUS.
7070 unsigned sample_idx = 0 ;
7171 unsigned rb = 0 ;
7272
73- // With 3 AVX512 registers we can process 4 PRBs at a time (48 16bit IQ pairs).
73+ // With 3 AVX512 registers we can process 4 PRBs at a time (48 16-bit IQ pairs).
7474 for (size_t rb_index_end = (output.size () / 4 ) * 4 ; rb != rb_index_end; rb += 4 ) {
7575 // Load input.
7676 __m512i r0_epi16 = loadu_epi16_avx512 (&input_quantized[sample_idx]);
0 commit comments