Commit a7c0f0d1 authored by Anatolii Pankevych's avatar Anatolii Pankevych

bugz #124092: [AS] refactor helper functions

parent c5747d16
......@@ -139,13 +139,13 @@ if(EXISTS "/usr/include/atlas/cblas.h" OR EXISTS "/usr/include/cblas.h")
# for ubuntu 17.10, directories are different
elseif(EXISTS "/usr/include/x86_64-linux-gnu/cblas.h")
include_directories("/usr/include/x86_64-linux-gnu")
LINK_DIRECTORIES("/usr/lib/x86_64-linux-gnu")
list(APPEND ATLAS_LIBRARIES cblas)
list(APPEND ATLAS_LIBRARIES atlas)
list(APPEND ATLAS_LIBRARIES lapack)
else()
message("No Blas/Atlas libs found, some targets will fail")
endif()
......@@ -208,7 +208,7 @@ add_list_string_option(CMAKE_BUILD_TYPE "RelWithDebInfo" "Choose the type of bui
# in case /proc/cpuinfo exists we want to inspect available Intrinsics
# -so not to go always through SIMDE emulation
# -so to avoid AVX512 instructions generation by gcc
# -so to avoid AVX512 instructions generation by gcc
execute_process(COMMAND uname -m OUTPUT_VARIABLE CPUARCH OUTPUT_STRIP_TRAILING_WHITESPACE)
message(STATUS "CPUARCH ${CPUARCH}")
if(EXISTS "/proc/cpuinfo")
......@@ -1526,7 +1526,7 @@ set(NR_SDAP_SRC
${OPENAIR2_DIR}/SDAP/nr_sdap/nr_sdap.c
${OPENAIR2_DIR}/SDAP/nr_sdap/nr_sdap_entity.c
)
set(L2_SRC
${PDCP_DIR}/pdcp.c
${PDCP_DIR}/pdcp_fifo.c
......@@ -1825,6 +1825,7 @@ set(SS_SRC
${OPENAIR3_DIR}/SS/ss_gNB_sys_task.c
${OPENAIR3_DIR}/SS/ss_gNB_vtp_task.c
${OPENAIR3_DIR}/SS/ss_gNB_drb_task.c
${OPENAIR3_DIR}/SS/ss_utils.c
)
file(GLOB ss_sidl ${SIDL_CMPLR}/src/*.c)
file(GLOB ss_acp ${SIDL_DIR}/acp/src/*.c)
......
......@@ -50,6 +50,7 @@
#include "acpNrDrb.h"
#include "ss_gNB_context.h"
#include "ss_utils.h"
extern RAN_CONTEXT_t RC;
extern SSConfigContext_t SS_context;
......@@ -66,26 +67,6 @@ enum MsgUserId
MSG_NrDrbProcessToSS_userId,
};
static void bits_copy_from_array(char *dst, int off, const char* src, int len)
{
while (len-- > 0)
{
int bit = *src++ ? 1 : 0;
dst[off / 8] |= bit << (7 - off % 8);
off++;
}
}
static void bits_copy_to_array(char *dst, int off, const char* src, int len)
{
while (len-- > 0)
{
int bit = src[off / 8] & (1 << (7 - off % 8));
*dst++ = bit ? 0x01 : 0x00;
off++;
}
}
static void ss_send_drb_data(ss_drb_pdu_ind_t *pdu_ind)
{
struct NR_DRB_COMMON_IND ind = {};
......
#include "ss_utils.h"
void bits_copy_from_array(char *dst, int off, const char* src, int len)
{
while (len-- > 0)
{
int bit = *src++ ? 1 : 0;
dst[off / 8] |= bit << (7 - off % 8);
off++;
}
}
void bits_copy_to_array(char *dst, int off, const char* src, int len)
{
while (len-- > 0)
{
int bit = src[off / 8] & (1 << (7 - off % 8));
*dst++ = bit ? 0x01 : 0x00;
off++;
}
}
#ifndef SS_UTILS_H_
#define SS_UTILS_H_
void bits_copy_from_array(char *dst, int off, const char* src, int len);
void bits_copy_to_array(char *dst, int off, const char* src, int len);
#endif // SS_UTILS_H_
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment