mirror of https://github.com/PentHertz/srsLTE.git
final merging changes
This commit is contained in:
parent
1b4706f510
commit
ec34d56e77
|
@ -195,8 +195,6 @@ endmacro(ADD_CXX_COMPILER_FLAG_IF_AVAILABLE)
|
|||
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=${GCC_ARCH} -Wall -Wno-comment -Wno-reorder -Wno-unused-but-set-variable -Wno-unused-variable -std=c++03")
|
||||
|
||||
find_package(SSE)
|
||||
|
||||
if(${CMAKE_BUILD_TYPE} STREQUAL "Debug")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O0 -DDEBUG_MODE")
|
||||
else(${CMAKE_BUILD_TYPE} STREQUAL "Debug")
|
||||
|
|
|
@ -9,7 +9,6 @@ extern "C" {
|
|||
#include "uhd_c_api.h"
|
||||
}
|
||||
|
||||
/*
|
||||
#if UHD_VERSION < 31100
|
||||
static void (*handler)(const char*);
|
||||
|
||||
|
@ -19,16 +18,13 @@ void translate_handler(uhd::msg::type_t type, const std::string & msg)
|
|||
handler(msg.c_str());
|
||||
}
|
||||
#endif
|
||||
*/
|
||||
|
||||
void rf_uhd_register_msg_handler_c(void (*new_handler)(const char*))
|
||||
{
|
||||
/*
|
||||
#if UHD_VERSION < 31100
|
||||
handler = new_handler;
|
||||
uhd::msg::register_handler(translate_handler);
|
||||
#endif
|
||||
*/
|
||||
}
|
||||
|
||||
void uhd_tx_metadata_set_time_spec(uhd_tx_metadata_handle *md, time_t secs, double frac_secs)
|
||||
|
|
|
@ -57,12 +57,18 @@ int srslte_vec_acc_ii(int *x, uint32_t len) {
|
|||
|
||||
// Used in PRACH detector, AGC and chest_dl for noise averaging
|
||||
float srslte_vec_acc_ff(float *x, uint32_t len) {
|
||||
int i;
|
||||
float z=0;
|
||||
for (i=0;i<len;i++) {
|
||||
z+=x[i];
|
||||
}
|
||||
return z;
|
||||
#ifdef HAVE_VOLK_ACC_FUNCTION
|
||||
float result;
|
||||
volk_32f_accumulator_s32f(&result,x,len);
|
||||
return result;
|
||||
#else
|
||||
int i;
|
||||
float z=0;
|
||||
for (i=0;i<len;i++) {
|
||||
z+=x[i];
|
||||
}
|
||||
return z;
|
||||
#endif
|
||||
}
|
||||
|
||||
void srslte_vec_ema_filter(cf_t *new_data, cf_t *average, cf_t *output, float coeff, uint32_t len) {
|
||||
|
@ -336,7 +342,7 @@ void srslte_vec_deinterleave_real_cf(cf_t *x, float *real, uint32_t len) {
|
|||
*/
|
||||
void *srslte_vec_malloc(uint32_t size) {
|
||||
void *ptr;
|
||||
if (posix_memalign(&ptr,64,size)) {
|
||||
if (posix_memalign(&ptr,256,size)) {
|
||||
return NULL;
|
||||
} else {
|
||||
return ptr;
|
||||
|
|
|
@ -72,7 +72,7 @@ int srslte_vec_dot_prod_sss_sse(short *x, short *y, uint32_t len)
|
|||
}
|
||||
|
||||
short dotProdVector[8];
|
||||
_mm_storeu_si128((__m128i*) dotProdVector, dotProdVal);
|
||||
_mm_store_si128((__m128i*) dotProdVector, dotProdVal);
|
||||
for (int i=0;i<8;i++) {
|
||||
result += dotProdVector[i];
|
||||
}
|
||||
|
@ -140,12 +140,12 @@ void srslte_vec_sum_sss_sse(short *x, short *y, short *z, uint32_t len)
|
|||
__m128i xVal, yVal, zVal;
|
||||
for(;number < points; number++){
|
||||
|
||||
xVal = _mm_loadu_si128(xPtr);
|
||||
yVal = _mm_loadu_si128(yPtr);
|
||||
xVal = _mm_load_si128(xPtr);
|
||||
yVal = _mm_load_si128(yPtr);
|
||||
|
||||
zVal = _mm_add_epi16(xVal, yVal);
|
||||
|
||||
_mm_storeu_si128(zPtr, zVal);
|
||||
_mm_store_si128(zPtr, zVal);
|
||||
|
||||
xPtr ++;
|
||||
yPtr ++;
|
||||
|
|
|
@ -1,84 +0,0 @@
|
|||
#
|
||||
# Copyright 2013-2015 Software Radio Systems Limited
|
||||
#
|
||||
# This file is part of the srsLTE library.
|
||||
#
|
||||
# srsLTE is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of
|
||||
# the License, or (at your option) any later version.
|
||||
#
|
||||
# srsLTE is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# A copy of the GNU Affero General Public License can be found in
|
||||
# the LICENSE file in the top-level directory of this distribution
|
||||
# and at http://www.gnu.org/licenses/.
|
||||
#
|
||||
|
||||
########################################################################
|
||||
# Install headers
|
||||
########################################################################
|
||||
INSTALL(DIRECTORY include/
|
||||
DESTINATION "${INCLUDE_DIR}"
|
||||
FILES_MATCHING PATTERN "*.h"
|
||||
)
|
||||
|
||||
########################################################################
|
||||
# Add headers to cmake project (useful for IDEs)
|
||||
########################################################################
|
||||
set(HEADERS_ALL "")
|
||||
file(GLOB headers *)
|
||||
FOREACH (_header ${headers})
|
||||
if(IS_DIRECTORY ${_header})
|
||||
file(GLOB_RECURSE tmp "${_header}/*.h")
|
||||
list(APPEND HEADERS_ALL ${tmp})
|
||||
endif(IS_DIRECTORY ${_header})
|
||||
ENDFOREACH()
|
||||
add_custom_target (add_srslte_headers SOURCES ${HEADERS_ALL})
|
||||
|
||||
########################################################################
|
||||
# Find Dependencies
|
||||
########################################################################
|
||||
|
||||
find_package(MKL)
|
||||
if(MKL_FOUND)
|
||||
include_directories(${MKL_INCLUDE_DIRS})
|
||||
link_directories(${MKL_LIBRARY_DIRS})
|
||||
else(MKL_FOUND)
|
||||
find_package(FFTW3F REQUIRED)
|
||||
if(FFTW3F_FOUND)
|
||||
include_directories(${FFTW3F_INCLUDE_DIRS})
|
||||
link_directories(${FFTW3F_LIBRARY_DIRS})
|
||||
endif(FFTW3F_FOUND)
|
||||
endif(MKL_FOUND)
|
||||
|
||||
find_package(UHD)
|
||||
if(UHD_FOUND)
|
||||
include_directories(${UHD_INCLUDE_DIRS})
|
||||
link_directories(${UHD_LIBRARY_DIRS})
|
||||
endif(UHD_FOUND)
|
||||
|
||||
if(NOT DisableBladeRF)
|
||||
find_package(bladeRF)
|
||||
if(BLADERF_FOUND)
|
||||
include_directories(${BLADERF_INCLUDE_DIRS})
|
||||
link_directories(${BLADERF_LIBRARY_DIRS})
|
||||
endif(BLADERF_FOUND)
|
||||
endif(NOT DisableBladeRF)
|
||||
|
||||
if(BLADERF_FOUND OR UHD_FOUND)
|
||||
set(RF_FOUND TRUE CACHE INTERNAL "RF frontend found")
|
||||
else(BLADERF_FOUND OR UHD_FOUND)
|
||||
set(RF_FOUND FALSE CACHE INTERNAL "RF frontend found")
|
||||
add_definitions(-DDISABLE_RF)
|
||||
endif(BLADERF_FOUND OR UHD_FOUND)
|
||||
|
||||
########################################################################
|
||||
# Add subdirectories
|
||||
########################################################################
|
||||
add_subdirectory(lib)
|
||||
add_subdirectory(include)
|
||||
add_subdirectory(examples)
|
|
@ -1,86 +0,0 @@
|
|||
/**
|
||||
*
|
||||
* \section COPYRIGHT
|
||||
*
|
||||
* Copyright 2013-2015 Software Radio Systems Limited
|
||||
*
|
||||
* \section LICENSE
|
||||
*
|
||||
* This file is part of the srsLTE library.
|
||||
*
|
||||
* srsLTE is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* srsLTE is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* A copy of the GNU Affero General Public License can be found in
|
||||
* the LICENSE file in the top-level directory of this distribution
|
||||
* and at http://www.gnu.org/licenses/.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef VECTORSIMD_
|
||||
#define VECTORSIMD_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include "srslte/config.h"
|
||||
|
||||
SRSLTE_API int srslte_vec_dot_prod_sss_simd(short *x, short *y, uint32_t len);
|
||||
|
||||
SRSLTE_API void srslte_vec_sum_sss_simd(short *x, short *y, short *z, uint32_t len);
|
||||
|
||||
SRSLTE_API void srslte_vec_sub_sss_simd(short *x, short *y, short *z, uint32_t len);
|
||||
|
||||
SRSLTE_API void srslte_vec_prod_sss_simd(short *x, short *y, short *z, uint32_t len);
|
||||
|
||||
SRSLTE_API void srslte_vec_sc_div2_sss_simd(short *x, int n_rightshift, short *z, uint32_t len);
|
||||
|
||||
SRSLTE_API void srslte_vec_lut_sss_simd(short *x, unsigned short *lut, short *y, uint32_t len);
|
||||
|
||||
SRSLTE_API void srslte_vec_convert_fi_simd(float *x, int16_t *z, float scale, uint32_t len);
|
||||
|
||||
SRSLTE_API void srslte_vec_prod_ccc_simd(cf_t *x,cf_t *y, cf_t *z, uint32_t len);
|
||||
|
||||
SRSLTE_API void srslte_vec_sc_prod_cfc_simd(cf_t *x, float h, cf_t *z, uint32_t len);
|
||||
|
||||
SRSLTE_API void srslte_vec_sc_prod_fff_simd(float *x, float h, float *z, uint32_t len);
|
||||
|
||||
SRSLTE_API void srslte_vec_abs_square_cf_simd(cf_t *x, float *abs_square, uint32_t len);
|
||||
|
||||
SRSLTE_API cf_t srslte_vec_dot_prod_ccc_simd(cf_t *x, cf_t *y, uint32_t len);
|
||||
|
||||
SRSLTE_API void srslte_vec_sum_fff_simd(float *x, float *y, float *z, uint32_t len);
|
||||
|
||||
SRSLTE_API void srslte_vec_sub_fff_simd(float *x, float *h, float *z, uint32_t len);
|
||||
|
||||
SRSLTE_API cf_t srslte_vec_dot_prod_conj_ccc_simd(cf_t *x, cf_t *y, uint32_t len);
|
||||
|
||||
SRSLTE_API void srslte_vec_prod_conj_ccc_simd(cf_t *x,cf_t *y, cf_t *z, uint32_t len);
|
||||
|
||||
SRSLTE_API void srslte_vec_sc_prod_ccc_simd(cf_t *x, cf_t h, cf_t *z, uint32_t len);
|
||||
|
||||
SRSLTE_API cf_t srslte_vec_dot_prod_conj_ccc_simd(cf_t *x, cf_t *y, uint32_t len);
|
||||
|
||||
SRSLTE_API void srslte_vec_sc_prod_cfc_simd(cf_t *x, float h, cf_t *z, uint32_t len);
|
||||
|
||||
SRSLTE_API float srslte_vec_acc_ff_simd(float *x, uint32_t len);
|
||||
|
||||
SRSLTE_API cf_t srslte_vec_dot_prod_cfc_simd(cf_t *x, float *y, uint32_t len);
|
||||
|
||||
SRSLTE_API void srslte_vec_convert_if_simd(int16_t *x, float *z, float scale, uint32_t len);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
Loading…
Reference in New Issue