author
int64 658
755k
| date
stringlengths 19
19
| timezone
int64 -46,800
43.2k
| hash
stringlengths 40
40
| message
stringlengths 5
490
| mods
list | language
stringclasses 20
values | license
stringclasses 3
values | repo
stringlengths 5
68
| original_message
stringlengths 12
491
|
---|---|---|---|---|---|---|---|---|---|
8,490 |
06.11.2018 12:14:00
| -3,600 |
f8682f3a4ddf644523f0da2fa495e18e06f5182e
|
Improve CMakeList to manage exact git tag version.
|
[
{
"change_type": "MODIFY",
"old_path": "CMakeLists.txt",
"new_path": "CMakeLists.txt",
"diff": "@@ -73,19 +73,27 @@ string(REGEX REPLACE \"-.*\" \"\" GIT_VERSION_MMP ${GIT_VERSION_\nstring(REGEX REPLACE \"^.*-\" \"\" GIT_HASH ${GIT_VERSION_RMV})\nstring( REPLACE \"-\" \"\" GIT_BUILD ${GIT_VERSION_RMV})\nstring( REPLACE \"${GIT_VERSION_MMP}\" \"\" GIT_BUILD ${GIT_BUILD})\n-string( REPLACE \"${GIT_HASH}\" \"\" GIT_BUILD ${GIT_BUILD})\nstring(REGEX REPLACE \"[.].*\" \"\" GIT_VERSION_MAJOR ${GIT_VERSION_MMP})\nstring( REPLACE \"${GIT_VERSION_MAJOR}.\" \"\" GIT_VERSION_MINOR ${GIT_VERSION_MMP})\nstring(REGEX REPLACE \"[.].*\" \"\" GIT_VERSION_MINOR ${GIT_VERSION_MINOR})\nstring( REPLACE \"${GIT_VERSION_MAJOR}.\" \"\" GIT_VERSION_PATCH ${GIT_VERSION_MMP})\nstring( REPLACE \"${GIT_VERSION_MINOR}.\" \"\" GIT_VERSION_PATCH ${GIT_VERSION_PATCH})\nstring(REGEX REPLACE \"[.].*\" \"\" GIT_VERSION_PATCH ${GIT_VERSION_PATCH})\n+if (NOT \"${GIT_BUILD}\" STREQUAL \"\")\n+ string( REPLACE \"${GIT_HASH}\" \"\" GIT_BUILD ${GIT_BUILD})\n+else()\n+ set(GIT_HASH \"\")\n+endif()\nmessage(STATUS \"AFF3CT - Git Version: ${GIT_VERSION_MAJOR}.${GIT_VERSION_MINOR}.${GIT_VERSION_PATCH}\")\n+if (NOT \"${GIT_BUILD}\" STREQUAL \"\")\nmessage(STATUS \"AFF3CT - Git Build: ${GIT_BUILD}\")\n+endif()\n+if (NOT \"${GIT_HASH}\" STREQUAL \"\")\nmessage(STATUS \"AFF3CT - Git Hash: ${GIT_HASH}\")\n+endif()\n-if((\"GIT_BUILD\" STREQUAL \"\") OR (\"GIT_HASH\" STREQUAL \"\"))\n+if((\"${GIT_BUILD}\" STREQUAL \"\") OR (\"${GIT_HASH}\" STREQUAL \"\"))\nset(GIT_TAIL \"\")\nelse()\nset(GIT_TAIL \"-${GIT_BUILD}-${GIT_HASH}\")\n"
}
] |
C++
|
MIT License
|
aff3ct/aff3ct
|
Improve CMakeList to manage exact git tag version.
|
8,483 |
06.11.2018 14:33:39
| -3,600 |
16cb4231680b3da7509a58c0dbefd396c6ca3563
|
Deactivate CI pipeline, as code is not modified.
|
[
{
"change_type": "MODIFY",
"old_path": ".gitlab-ci.yml",
"new_path": ".gitlab-ci.yml",
"diff": "@@ -24,528 +24,528 @@ analysis-cppcheck:\nscript:\n- ./ci/analysis-cppcheck.sh\n-build-linux-gcc-nointr:\n- stage: build\n- tags:\n- - linux\n- - gcc\n- - cmake\n- - gsl\n- - x86\n- artifacts:\n- name: build-linux-gcc-nointr\n- paths:\n- - build_linux_gcc_nointr\n- script:\n- - export CC=\"gcc\"\n- - export CXX=\"g++\"\n- - export CFLAGS=\"-DMIPP_NO_INTRINSICS\"\n- - export LFLAGS=\"-static -static-libgcc -static-libstdc++ -Wl,--whole-archive -lpthread -Wl,--no-whole-archive\"\n- - export CMAKE_OPT=\"-DAFF3CT_COMPILE_EXE=ON -DAFF3CT_COMPILE_STATIC_LIB=ON -DAFF3CT_COMPILE_SHARED_LIB=ON -DAFF3CT_PREC=MULTI -DAFF3CT_LINK_GSL=ON\"\n- - export NAME=\"build_linux_gcc_nointr\"\n- - source ./ci/tools/threads.sh\n- - ./ci/build-linux-macos.sh\n+# build-linux-gcc-nointr:\n+# stage: build\n+# tags:\n+# - linux\n+# - gcc\n+# - cmake\n+# - gsl\n+# - x86\n+# artifacts:\n+# name: build-linux-gcc-nointr\n+# paths:\n+# - build_linux_gcc_nointr\n+# script:\n+# - export CC=\"gcc\"\n+# - export CXX=\"g++\"\n+# - export CFLAGS=\"-DMIPP_NO_INTRINSICS\"\n+# - export LFLAGS=\"-static -static-libgcc -static-libstdc++ -Wl,--whole-archive -lpthread -Wl,--no-whole-archive\"\n+# - export CMAKE_OPT=\"-DAFF3CT_COMPILE_EXE=ON -DAFF3CT_COMPILE_STATIC_LIB=ON -DAFF3CT_COMPILE_SHARED_LIB=ON -DAFF3CT_PREC=MULTI -DAFF3CT_LINK_GSL=ON\"\n+# - export NAME=\"build_linux_gcc_nointr\"\n+# - source ./ci/tools/threads.sh\n+# - ./ci/build-linux-macos.sh\n-build-linux-gcc-x64-sse4.2:\n- stage: build\n- tags:\n- - linux\n- - gcc\n- - cmake\n- - gsl\n- - x86\n- - 64-bit\n- artifacts:\n- name: build-linux-gcc-x64-sse4.2\n- paths:\n- - build_linux_gcc_x64_sse4.2\n- script:\n- - export CC=\"gcc\"\n- - export CXX=\"g++\"\n- - export CFLAGS=\"-m64 -msse4.2\"\n- - export LFLAGS=\"-static -static-libgcc -static-libstdc++ -Wl,--whole-archive -lpthread -Wl,--no-whole-archive\"\n- - export CMAKE_OPT=\"-DAFF3CT_COMPILE_EXE=ON -DAFF3CT_COMPILE_STATIC_LIB=ON -DAFF3CT_COMPILE_SHARED_LIB=ON -DAFF3CT_PREC=MULTI -DAFF3CT_LINK_GSL=ON\"\n- - export NAME=\"build_linux_gcc_x64_sse4.2\"\n- - source ./ci/tools/threads.sh\n- - ./ci/build-linux-macos.sh\n+# build-linux-gcc-x64-sse4.2:\n+# stage: build\n+# tags:\n+# - linux\n+# - gcc\n+# - cmake\n+# - gsl\n+# - x86\n+# - 64-bit\n+# artifacts:\n+# name: build-linux-gcc-x64-sse4.2\n+# paths:\n+# - build_linux_gcc_x64_sse4.2\n+# script:\n+# - export CC=\"gcc\"\n+# - export CXX=\"g++\"\n+# - export CFLAGS=\"-m64 -msse4.2\"\n+# - export LFLAGS=\"-static -static-libgcc -static-libstdc++ -Wl,--whole-archive -lpthread -Wl,--no-whole-archive\"\n+# - export CMAKE_OPT=\"-DAFF3CT_COMPILE_EXE=ON -DAFF3CT_COMPILE_STATIC_LIB=ON -DAFF3CT_COMPILE_SHARED_LIB=ON -DAFF3CT_PREC=MULTI -DAFF3CT_LINK_GSL=ON\"\n+# - export NAME=\"build_linux_gcc_x64_sse4.2\"\n+# - source ./ci/tools/threads.sh\n+# - ./ci/build-linux-macos.sh\n-build-linux-gcc-x64-avx2:\n- stage: build\n- tags:\n- - linux\n- - gcc\n- - cmake\n- - gsl\n- - x86\n- - 64-bit\n- artifacts:\n- name: build-linux-gcc-x64-avx2\n- paths:\n- - build_linux_gcc_x64_avx2\n- script:\n- - export CC=\"gcc\"\n- - export CXX=\"g++\"\n- - export CFLAGS=\"-m64 -mavx2 -mfma\"\n- - export LFLAGS=\"-static -static-libgcc -static-libstdc++ -Wl,--whole-archive -lpthread -Wl,--no-whole-archive\"\n- - export CMAKE_OPT=\"-DAFF3CT_COMPILE_EXE=ON -DAFF3CT_COMPILE_STATIC_LIB=ON -DAFF3CT_COMPILE_SHARED_LIB=ON -DAFF3CT_PREC=MULTI -DAFF3CT_LINK_GSL=ON\"\n- - export NAME=\"build_linux_gcc_x64_avx2\"\n- - source ./ci/tools/threads.sh\n- - ./ci/build-linux-macos.sh\n+# build-linux-gcc-x64-avx2:\n+# stage: build\n+# tags:\n+# - linux\n+# - gcc\n+# - cmake\n+# - gsl\n+# - x86\n+# - 64-bit\n+# artifacts:\n+# name: build-linux-gcc-x64-avx2\n+# paths:\n+# - build_linux_gcc_x64_avx2\n+# script:\n+# - export CC=\"gcc\"\n+# - export CXX=\"g++\"\n+# - export CFLAGS=\"-m64 -mavx2 -mfma\"\n+# - export LFLAGS=\"-static -static-libgcc -static-libstdc++ -Wl,--whole-archive -lpthread -Wl,--no-whole-archive\"\n+# - export CMAKE_OPT=\"-DAFF3CT_COMPILE_EXE=ON -DAFF3CT_COMPILE_STATIC_LIB=ON -DAFF3CT_COMPILE_SHARED_LIB=ON -DAFF3CT_PREC=MULTI -DAFF3CT_LINK_GSL=ON\"\n+# - export NAME=\"build_linux_gcc_x64_avx2\"\n+# - source ./ci/tools/threads.sh\n+# - ./ci/build-linux-macos.sh\n-build-linux-gcc-8-bit:\n- stage: build\n- tags:\n- - linux\n- - gcc\n- - arm\n- - cmake\n- - gsl\n- artifacts:\n- name: build-linux-gcc-8-bit\n- paths:\n- - build_linux_gcc_8_bit\n- script:\n- - export CC=\"gcc\"\n- - export CXX=\"g++\"\n- - export CFLAGS=\"-march=native\"\n- - export CMAKE_OPT=\"-DAFF3CT_COMPILE_EXE=ON -DAFF3CT_COMPILE_STATIC_LIB=ON -DAFF3CT_COMPILE_SHARED_LIB=ON -DAFF3CT_PREC=8 -DAFF3CT_LINK_GSL=ON\"\n- - export NAME=\"build_linux_gcc_8_bit\"\n- - source ./ci/tools/threads.sh\n- - ./ci/build-linux-macos.sh\n+# build-linux-gcc-8-bit:\n+# stage: build\n+# tags:\n+# - linux\n+# - gcc\n+# - arm\n+# - cmake\n+# - gsl\n+# artifacts:\n+# name: build-linux-gcc-8-bit\n+# paths:\n+# - build_linux_gcc_8_bit\n+# script:\n+# - export CC=\"gcc\"\n+# - export CXX=\"g++\"\n+# - export CFLAGS=\"-march=native\"\n+# - export CMAKE_OPT=\"-DAFF3CT_COMPILE_EXE=ON -DAFF3CT_COMPILE_STATIC_LIB=ON -DAFF3CT_COMPILE_SHARED_LIB=ON -DAFF3CT_PREC=8 -DAFF3CT_LINK_GSL=ON\"\n+# - export NAME=\"build_linux_gcc_8_bit\"\n+# - source ./ci/tools/threads.sh\n+# - ./ci/build-linux-macos.sh\n-build-linux-gcc-mpi:\n- stage: build\n- tags:\n- - linux\n- - gcc\n- - mpi\n- - cmake\n- - gsl\n- artifacts:\n- name: build-linux-gcc-mpi\n- paths:\n- - build_linux_gcc_mpi\n- script:\n- - export CC=\"gcc\"\n- - export CXX=\"g++\"\n- - export CFLAGS=\"-march=native\"\n- - export CMAKE_OPT=\"-DAFF3CT_COMPILE_EXE=ON -DAFF3CT_COMPILE_STATIC_LIB=ON -DAFF3CT_COMPILE_SHARED_LIB=ON -DAFF3CT_PREC=MULTI -DAFF3CT_LINK_GSL=ON -DAFF3CT_MPI=ON\"\n- - export NAME=\"build_linux_gcc_mpi\"\n- - source ./ci/tools/threads.sh\n- - ./ci/build-linux-macos.sh\n+# build-linux-gcc-mpi:\n+# stage: build\n+# tags:\n+# - linux\n+# - gcc\n+# - mpi\n+# - cmake\n+# - gsl\n+# artifacts:\n+# name: build-linux-gcc-mpi\n+# paths:\n+# - build_linux_gcc_mpi\n+# script:\n+# - export CC=\"gcc\"\n+# - export CXX=\"g++\"\n+# - export CFLAGS=\"-march=native\"\n+# - export CMAKE_OPT=\"-DAFF3CT_COMPILE_EXE=ON -DAFF3CT_COMPILE_STATIC_LIB=ON -DAFF3CT_COMPILE_SHARED_LIB=ON -DAFF3CT_PREC=MULTI -DAFF3CT_LINK_GSL=ON -DAFF3CT_MPI=ON\"\n+# - export NAME=\"build_linux_gcc_mpi\"\n+# - source ./ci/tools/threads.sh\n+# - ./ci/build-linux-macos.sh\n-build-linux-gcc-systemc:\n- stage: build\n- tags:\n- - linux\n- - gcc\n- - systemc\n- - cmake\n- artifacts:\n- name: build-linux-gcc-systemc\n- paths:\n- - build_linux_gcc_systemc\n- script:\n- - cp $SYSTEMC_HOME/FindSystemC.cmake cmake/Modules/\n- - cp $SYSTEMC_HOME/FindTLM.cmake cmake/Modules/\n- - export CC=\"gcc\"\n- - export CXX=\"g++\"\n- - export CFLAGS=\"-march=native -Wno-deprecated-declarations\"\n- - export CMAKE_OPT=\"-DAFF3CT_COMPILE_EXE=ON -DAFF3CT_PREC=MULTI -DAFF3CT_SYSTEMC_SIMU=ON\"\n- - export NAME=\"build_linux_gcc_systemc\"\n- - source ./ci/tools/threads.sh\n- - ./ci/build-linux-macos.sh\n+# build-linux-gcc-systemc:\n+# stage: build\n+# tags:\n+# - linux\n+# - gcc\n+# - systemc\n+# - cmake\n+# artifacts:\n+# name: build-linux-gcc-systemc\n+# paths:\n+# - build_linux_gcc_systemc\n+# script:\n+# - cp $SYSTEMC_HOME/FindSystemC.cmake cmake/Modules/\n+# - cp $SYSTEMC_HOME/FindTLM.cmake cmake/Modules/\n+# - export CC=\"gcc\"\n+# - export CXX=\"g++\"\n+# - export CFLAGS=\"-march=native -Wno-deprecated-declarations\"\n+# - export CMAKE_OPT=\"-DAFF3CT_COMPILE_EXE=ON -DAFF3CT_PREC=MULTI -DAFF3CT_SYSTEMC_SIMU=ON\"\n+# - export NAME=\"build_linux_gcc_systemc\"\n+# - source ./ci/tools/threads.sh\n+# - ./ci/build-linux-macos.sh\n-build-linux-clang:\n- stage: build\n- tags:\n- - linux\n- - clang\n- - cmake\n- - gsl\n- artifacts:\n- name: build-linux-clang\n- paths:\n- - build_linux_clang\n- script:\n- - export CC=\"clang\"\n- - export CXX=\"clang++\"\n- - export CFLAGS=\"\"\n- - export CMAKE_OPT=\"-DAFF3CT_COMPILE_EXE=ON -DAFF3CT_COMPILE_STATIC_LIB=ON -DAFF3CT_COMPILE_SHARED_LIB=ON -DAFF3CT_PREC=MULTI -DAFF3CT_LINK_GSL=ON\"\n- - export NAME=\"build_linux_clang\"\n- - source ./ci/tools/threads.sh\n- - ./ci/build-linux-macos.sh\n+# build-linux-clang:\n+# stage: build\n+# tags:\n+# - linux\n+# - clang\n+# - cmake\n+# - gsl\n+# artifacts:\n+# name: build-linux-clang\n+# paths:\n+# - build_linux_clang\n+# script:\n+# - export CC=\"clang\"\n+# - export CXX=\"clang++\"\n+# - export CFLAGS=\"\"\n+# - export CMAKE_OPT=\"-DAFF3CT_COMPILE_EXE=ON -DAFF3CT_COMPILE_STATIC_LIB=ON -DAFF3CT_COMPILE_SHARED_LIB=ON -DAFF3CT_PREC=MULTI -DAFF3CT_LINK_GSL=ON\"\n+# - export NAME=\"build_linux_clang\"\n+# - source ./ci/tools/threads.sh\n+# - ./ci/build-linux-macos.sh\n-build-linux-gcc-4.8:\n- stage: build\n- tags:\n- - linux\n- - gcc-4.8\n- - cmake\n- - gsl\n- artifacts:\n- name: build-linux-gcc-4.8\n- paths:\n- - build_linux_gcc-4.8\n- script:\n- - export CC=\"gcc-4.8\"\n- - export CXX=\"g++-4.8\"\n- - export CFLAGS=\"-march=native\"\n- - export CMAKE_OPT=\"-DAFF3CT_COMPILE_EXE=ON -DAFF3CT_COMPILE_STATIC_LIB=ON -DAFF3CT_COMPILE_SHARED_LIB=ON -DAFF3CT_PREC=MULTI -DAFF3CT_LINK_GSL=ON\"\n- - export NAME=\"build_linux_gcc-4.8\"\n- - source ./ci/tools/threads.sh\n- - ./ci/build-linux-macos.sh\n+# build-linux-gcc-4.8:\n+# stage: build\n+# tags:\n+# - linux\n+# - gcc-4.8\n+# - cmake\n+# - gsl\n+# artifacts:\n+# name: build-linux-gcc-4.8\n+# paths:\n+# - build_linux_gcc-4.8\n+# script:\n+# - export CC=\"gcc-4.8\"\n+# - export CXX=\"g++-4.8\"\n+# - export CFLAGS=\"-march=native\"\n+# - export CMAKE_OPT=\"-DAFF3CT_COMPILE_EXE=ON -DAFF3CT_COMPILE_STATIC_LIB=ON -DAFF3CT_COMPILE_SHARED_LIB=ON -DAFF3CT_PREC=MULTI -DAFF3CT_LINK_GSL=ON\"\n+# - export NAME=\"build_linux_gcc-4.8\"\n+# - source ./ci/tools/threads.sh\n+# - ./ci/build-linux-macos.sh\n-build-linux-icpc:\n- stage: build\n- tags:\n- - linux\n- - icpc\n- - cmake\n- - mkl\n- - gsl\n- - x86\n- artifacts:\n- name: build-linux-icpc\n- paths:\n- - build_linux_icpc\n- script:\n- - source /opt/intel/vars-intel.sh\n- - export CC=\"icc\"\n- - export CXX=\"icpc\"\n- - export CFLAGS=\"-march=native -std=c++11\"\n- - export CMAKE_OPT=\"-DAFF3CT_COMPILE_EXE=ON -DAFF3CT_COMPILE_STATIC_LIB=ON -DAFF3CT_COMPILE_SHARED_LIB=ON -DAFF3CT_PREC=MULTI -DAFF3CT_LINK_GSL=ON -DAFF3CT_LINK_MKL=ON\"\n- - export NAME=\"build_linux_icpc\"\n- - source ./ci/tools/threads.sh\n- - ./ci/build-linux-macos.sh\n+# build-linux-icpc:\n+# stage: build\n+# tags:\n+# - linux\n+# - icpc\n+# - cmake\n+# - mkl\n+# - gsl\n+# - x86\n+# artifacts:\n+# name: build-linux-icpc\n+# paths:\n+# - build_linux_icpc\n+# script:\n+# - source /opt/intel/vars-intel.sh\n+# - export CC=\"icc\"\n+# - export CXX=\"icpc\"\n+# - export CFLAGS=\"-march=native -std=c++11\"\n+# - export CMAKE_OPT=\"-DAFF3CT_COMPILE_EXE=ON -DAFF3CT_COMPILE_STATIC_LIB=ON -DAFF3CT_COMPILE_SHARED_LIB=ON -DAFF3CT_PREC=MULTI -DAFF3CT_LINK_GSL=ON -DAFF3CT_LINK_MKL=ON\"\n+# - export NAME=\"build_linux_icpc\"\n+# - source ./ci/tools/threads.sh\n+# - ./ci/build-linux-macos.sh\n-build-windows-gcc-x86-sse4.2:\n- stage: build\n- tags:\n- - windows\n- - gcc\n- - cmake\n- - x86\n- - 32-bit\n- artifacts:\n- name: build-windows-gcc-x86-sse4.2\n- paths:\n- - build_windows_gcc_x86_sse4.2\n- script:\n- - set \"CFLAGS=-m32 -msse4.2\"\n- - set \"LFLAGS=-static -static-libgcc -static-libstdc++\"\n- - set \"CMAKE_OPT=-DAFF3CT_COMPILE_EXE=ON -DAFF3CT_COMPILE_STATIC_LIB=ON -DAFF3CT_PREC=MULTI\"\n- - set \"NAME=build_windows_gcc_x86_sse4.2\"\n- - call ./ci/tools/threads.bat\n- - ./ci/build-windows-gcc.bat\n+# build-windows-gcc-x86-sse4.2:\n+# stage: build\n+# tags:\n+# - windows\n+# - gcc\n+# - cmake\n+# - x86\n+# - 32-bit\n+# artifacts:\n+# name: build-windows-gcc-x86-sse4.2\n+# paths:\n+# - build_windows_gcc_x86_sse4.2\n+# script:\n+# - set \"CFLAGS=-m32 -msse4.2\"\n+# - set \"LFLAGS=-static -static-libgcc -static-libstdc++\"\n+# - set \"CMAKE_OPT=-DAFF3CT_COMPILE_EXE=ON -DAFF3CT_COMPILE_STATIC_LIB=ON -DAFF3CT_PREC=MULTI\"\n+# - set \"NAME=build_windows_gcc_x86_sse4.2\"\n+# - call ./ci/tools/threads.bat\n+# - ./ci/build-windows-gcc.bat\n-build-windows-gcc-x64-avx2:\n- stage: build\n- tags:\n- - windows\n- - 64-bit\n- - gcc\n- - cmake\n- - x86\n- artifacts:\n- name: build-windows-gcc-x64-avx2\n- paths:\n- - build_windows_gcc_x64_avx2\n- script:\n- - set \"CFLAGS=-m64 -mavx2\"\n- - set \"LFLAGS=-static -static-libgcc -static-libstdc++\"\n- - set \"CMAKE_OPT=-DAFF3CT_COMPILE_EXE=ON -DAFF3CT_COMPILE_STATIC_LIB=ON -DAFF3CT_PREC=MULTI\"\n- - set \"NAME=build_windows_gcc_x64_avx2\"\n- - call ./ci/tools/threads.bat\n- - ./ci/build-windows-gcc.bat\n+# build-windows-gcc-x64-avx2:\n+# stage: build\n+# tags:\n+# - windows\n+# - 64-bit\n+# - gcc\n+# - cmake\n+# - x86\n+# artifacts:\n+# name: build-windows-gcc-x64-avx2\n+# paths:\n+# - build_windows_gcc_x64_avx2\n+# script:\n+# - set \"CFLAGS=-m64 -mavx2\"\n+# - set \"LFLAGS=-static -static-libgcc -static-libstdc++\"\n+# - set \"CMAKE_OPT=-DAFF3CT_COMPILE_EXE=ON -DAFF3CT_COMPILE_STATIC_LIB=ON -DAFF3CT_PREC=MULTI\"\n+# - set \"NAME=build_windows_gcc_x64_avx2\"\n+# - call ./ci/tools/threads.bat\n+# - ./ci/build-windows-gcc.bat\n-build-windows-msvc-avx:\n- stage: build\n- tags:\n- - windows\n- - msvc\n- - cmake\n- - x86\n- artifacts:\n- name: build-windows-msvc-avx\n- paths:\n- - build_windows_msvc_avx\n- script:\n- - set \"CFLAGS=/arch:AVX\"\n- - set \"CMAKE_OPT=-DAFF3CT_COMPILE_EXE=ON -DAFF3CT_COMPILE_STATIC_LIB=ON -DAFF3CT_PREC=MULTI\"\n- - set \"NAME=build_windows_msvc_avx\"\n- - call ./ci/tools/threads.bat\n- - ./ci/build-windows-msvc.bat\n+# build-windows-msvc-avx:\n+# stage: build\n+# tags:\n+# - windows\n+# - msvc\n+# - cmake\n+# - x86\n+# artifacts:\n+# name: build-windows-msvc-avx\n+# paths:\n+# - build_windows_msvc_avx\n+# script:\n+# - set \"CFLAGS=/arch:AVX\"\n+# - set \"CMAKE_OPT=-DAFF3CT_COMPILE_EXE=ON -DAFF3CT_COMPILE_STATIC_LIB=ON -DAFF3CT_PREC=MULTI\"\n+# - set \"NAME=build_windows_msvc_avx\"\n+# - call ./ci/tools/threads.bat\n+# - ./ci/build-windows-msvc.bat\n-build-macos-clang-x64-sse4.2:\n- stage: build\n- tags:\n- - macos\n- - apple-clang\n- - cmake\n- - x86\n- artifacts:\n- name: build-macos-clang-x64-sse4.2\n- paths:\n- - build_macos_clang_x64_sse4.2\n- script:\n- - export CC=\"clang\"\n- - export CXX=\"clang++\"\n- - export CFLAGS=\"-m64 -msse4.2\"\n- - export CMAKE_OPT=\"-DAFF3CT_COMPILE_EXE=ON -DAFF3CT_COMPILE_STATIC_LIB=ON -DAFF3CT_COMPILE_SHARED_LIB=ON -DAFF3CT_PREC=MULTI\"\n- - export NAME=\"build_macos_clang_x64_sse4.2\"\n- - source ./ci/tools/threads.sh\n- - ./ci/build-linux-macos.sh\n+# build-macos-clang-x64-sse4.2:\n+# stage: build\n+# tags:\n+# - macos\n+# - apple-clang\n+# - cmake\n+# - x86\n+# artifacts:\n+# name: build-macos-clang-x64-sse4.2\n+# paths:\n+# - build_macos_clang_x64_sse4.2\n+# script:\n+# - export CC=\"clang\"\n+# - export CXX=\"clang++\"\n+# - export CFLAGS=\"-m64 -msse4.2\"\n+# - export CMAKE_OPT=\"-DAFF3CT_COMPILE_EXE=ON -DAFF3CT_COMPILE_STATIC_LIB=ON -DAFF3CT_COMPILE_SHARED_LIB=ON -DAFF3CT_PREC=MULTI\"\n+# - export NAME=\"build_macos_clang_x64_sse4.2\"\n+# - source ./ci/tools/threads.sh\n+# - ./ci/build-linux-macos.sh\n-test-regression-bch:\n- stage: test\n- retry: 1\n- dependencies:\n- - build-linux-gcc-x64-sse4.2\n- tags:\n- - linux\n- - x86\n- - 64-bit\n- - sse4.2\n- - python\n- artifacts:\n- name: test-regression-results-bch\n- when: always\n- paths:\n- - test-regression-results-bch/\n- script:\n- - source ./ci/tools/threads.sh\n- - ./ci/test-regression.py --refs-path refs/BCH --results-path test-regression-results-bch --build-path build_linux_gcc_x64_sse4.2 --max-snr-time 5 --sensibility 2.5 --weak-rate 0.9 --verbose 1 --n-threads $THREADS\n+# test-regression-bch:\n+# stage: test\n+# retry: 1\n+# dependencies:\n+# - build-linux-gcc-x64-sse4.2\n+# tags:\n+# - linux\n+# - x86\n+# - 64-bit\n+# - sse4.2\n+# - python\n+# artifacts:\n+# name: test-regression-results-bch\n+# when: always\n+# paths:\n+# - test-regression-results-bch/\n+# script:\n+# - source ./ci/tools/threads.sh\n+# - ./ci/test-regression.py --refs-path refs/BCH --results-path test-regression-results-bch --build-path build_linux_gcc_x64_sse4.2 --max-snr-time 5 --sensibility 2.5 --weak-rate 0.9 --verbose 1 --n-threads $THREADS\n-test-regression-ldpc:\n- stage: test\n- retry: 1\n- dependencies:\n- - build-linux-gcc-x64-sse4.2\n- tags:\n- - linux\n- - x86\n- - 64-bit\n- - sse4.2\n- - powerful\n- - python\n- artifacts:\n- name: test-regression-results-ldpc\n- when: always\n- paths:\n- - test-regression-results-ldpc/\n- script:\n- - source ./ci/tools/threads.sh\n- - ./ci/test-regression.py --refs-path refs/LDPC --results-path test-regression-results-ldpc --build-path build_linux_gcc_x64_sse4.2 --max-snr-time 5 --sensibility 2.5 --weak-rate 0.9 --verbose 1 --n-threads $THREADS\n+# test-regression-ldpc:\n+# stage: test\n+# retry: 1\n+# dependencies:\n+# - build-linux-gcc-x64-sse4.2\n+# tags:\n+# - linux\n+# - x86\n+# - 64-bit\n+# - sse4.2\n+# - powerful\n+# - python\n+# artifacts:\n+# name: test-regression-results-ldpc\n+# when: always\n+# paths:\n+# - test-regression-results-ldpc/\n+# script:\n+# - source ./ci/tools/threads.sh\n+# - ./ci/test-regression.py --refs-path refs/LDPC --results-path test-regression-results-ldpc --build-path build_linux_gcc_x64_sse4.2 --max-snr-time 5 --sensibility 2.5 --weak-rate 0.9 --verbose 1 --n-threads $THREADS\n-test-regression-polar:\n- stage: test\n- retry: 1\n- dependencies:\n- - build-linux-gcc-x64-sse4.2\n- tags:\n- - linux\n- - x86\n- - 64-bit\n- - sse4.2\n- - powerful\n- - python\n- artifacts:\n- name: test-regression-results-polar\n- when: always\n- paths:\n- - test-regression-results-polar/\n- script:\n- - source ./ci/tools/threads.sh\n- - ./ci/test-regression.py --refs-path refs/POLAR --results-path test-regression-results-polar --build-path build_linux_gcc_x64_sse4.2 --max-snr-time 5 --sensibility 2.5 --weak-rate 0.9 --verbose 1 --n-threads $THREADS\n+# test-regression-polar:\n+# stage: test\n+# retry: 1\n+# dependencies:\n+# - build-linux-gcc-x64-sse4.2\n+# tags:\n+# - linux\n+# - x86\n+# - 64-bit\n+# - sse4.2\n+# - powerful\n+# - python\n+# artifacts:\n+# name: test-regression-results-polar\n+# when: always\n+# paths:\n+# - test-regression-results-polar/\n+# script:\n+# - source ./ci/tools/threads.sh\n+# - ./ci/test-regression.py --refs-path refs/POLAR --results-path test-regression-results-polar --build-path build_linux_gcc_x64_sse4.2 --max-snr-time 5 --sensibility 2.5 --weak-rate 0.9 --verbose 1 --n-threads $THREADS\n-test-regression-rs:\n- stage: test\n- retry: 1\n- dependencies:\n- - build-linux-gcc-x64-sse4.2\n- tags:\n- - linux\n- - x86\n- - 64-bit\n- - sse4.2\n- - python\n- artifacts:\n- name: test-regression-results-rs\n- when: always\n- paths:\n- - test-regression-results-rs/\n- script:\n- - source ./ci/tools/threads.sh\n- - ./ci/test-regression.py --refs-path refs/RS --results-path test-regression-results-rs --build-path build_linux_gcc_x64_sse4.2 --max-snr-time 5 --sensibility 2.5 --weak-rate 0.9 --verbose 1 --n-threads $THREADS\n+# test-regression-rs:\n+# stage: test\n+# retry: 1\n+# dependencies:\n+# - build-linux-gcc-x64-sse4.2\n+# tags:\n+# - linux\n+# - x86\n+# - 64-bit\n+# - sse4.2\n+# - python\n+# artifacts:\n+# name: test-regression-results-rs\n+# when: always\n+# paths:\n+# - test-regression-results-rs/\n+# script:\n+# - source ./ci/tools/threads.sh\n+# - ./ci/test-regression.py --refs-path refs/RS --results-path test-regression-results-rs --build-path build_linux_gcc_x64_sse4.2 --max-snr-time 5 --sensibility 2.5 --weak-rate 0.9 --verbose 1 --n-threads $THREADS\n-test-regression-turbo:\n- stage: test\n- retry: 1\n- dependencies:\n- - build-linux-gcc-x64-sse4.2\n- tags:\n- - linux\n- - x86\n- - 64-bit\n- - sse4.2\n- - powerful\n- - python\n- artifacts:\n- name: test-regression-results-turbo\n- when: always\n- paths:\n- - test-regression-results-turbo/\n- script:\n- - source ./ci/tools/threads.sh\n- - ./ci/test-regression.py --refs-path refs/TURBO --results-path test-regression-results-turbo --build-path build_linux_gcc_x64_sse4.2 --max-snr-time 5 --sensibility 2.5 --weak-rate 0.9 --verbose 1 --n-threads $THREADS\n+# test-regression-turbo:\n+# stage: test\n+# retry: 1\n+# dependencies:\n+# - build-linux-gcc-x64-sse4.2\n+# tags:\n+# - linux\n+# - x86\n+# - 64-bit\n+# - sse4.2\n+# - powerful\n+# - python\n+# artifacts:\n+# name: test-regression-results-turbo\n+# when: always\n+# paths:\n+# - test-regression-results-turbo/\n+# script:\n+# - source ./ci/tools/threads.sh\n+# - ./ci/test-regression.py --refs-path refs/TURBO --results-path test-regression-results-turbo --build-path build_linux_gcc_x64_sse4.2 --max-snr-time 5 --sensibility 2.5 --weak-rate 0.9 --verbose 1 --n-threads $THREADS\n-test-regression-turbo-db:\n- stage: test\n- retry: 1\n- dependencies:\n- - build-linux-gcc-x64-sse4.2\n- tags:\n- - linux\n- - x86\n- - 64-bit\n- - sse4.2\n- - powerful\n- - python\n- artifacts:\n- name: test-regression-results-turbo-db\n- when: always\n- paths:\n- - test-regression-results-turbo-db/\n- script:\n- - source ./ci/tools/threads.sh\n- - ./ci/test-regression.py --refs-path refs/TURBO_DB --results-path test-regression-results-turbo-db --build-path build_linux_gcc_x64_sse4.2 --max-snr-time 5 --sensibility 2.5 --weak-rate 0.9 --verbose 1 --n-threads $THREADS\n+# test-regression-turbo-db:\n+# stage: test\n+# retry: 1\n+# dependencies:\n+# - build-linux-gcc-x64-sse4.2\n+# tags:\n+# - linux\n+# - x86\n+# - 64-bit\n+# - sse4.2\n+# - powerful\n+# - python\n+# artifacts:\n+# name: test-regression-results-turbo-db\n+# when: always\n+# paths:\n+# - test-regression-results-turbo-db/\n+# script:\n+# - source ./ci/tools/threads.sh\n+# - ./ci/test-regression.py --refs-path refs/TURBO_DB --results-path test-regression-results-turbo-db --build-path build_linux_gcc_x64_sse4.2 --max-snr-time 5 --sensibility 2.5 --weak-rate 0.9 --verbose 1 --n-threads $THREADS\n-test-regression-turbo-prod:\n- stage: test\n- retry: 1\n- dependencies:\n- - build-linux-gcc-x64-sse4.2\n- tags:\n- - linux\n- - x86\n- - 64-bit\n- - sse4.2\n- - powerful\n- - python\n- artifacts:\n- name: test-regression-results-turbo-prod\n- when: always\n- paths:\n- - test-regression-results-turbo-prod/\n- script:\n- - source ./ci/tools/threads.sh\n- - ./ci/test-regression.py --refs-path refs/TURBO_PROD --results-path test-regression-results-turbo-prod --build-path build_linux_gcc_x64_sse4.2 --max-snr-time 30 --sensibility 2.5 --weak-rate 0.9 --verbose 1 --n-threads $THREADS\n+# test-regression-turbo-prod:\n+# stage: test\n+# retry: 1\n+# dependencies:\n+# - build-linux-gcc-x64-sse4.2\n+# tags:\n+# - linux\n+# - x86\n+# - 64-bit\n+# - sse4.2\n+# - powerful\n+# - python\n+# artifacts:\n+# name: test-regression-results-turbo-prod\n+# when: always\n+# paths:\n+# - test-regression-results-turbo-prod/\n+# script:\n+# - source ./ci/tools/threads.sh\n+# - ./ci/test-regression.py --refs-path refs/TURBO_PROD --results-path test-regression-results-turbo-prod --build-path build_linux_gcc_x64_sse4.2 --max-snr-time 30 --sensibility 2.5 --weak-rate 0.9 --verbose 1 --n-threads $THREADS\n-test-regression-uncoded:\n- stage: test\n- retry: 1\n- dependencies:\n- - build-linux-gcc-x64-sse4.2\n- tags:\n- - linux\n- - x86\n- - 64-bit\n- - sse4.2\n- - python\n- artifacts:\n- name: test-regression-results-uncoded\n- when: always\n- paths:\n- - test-regression-results-uncoded/\n- script:\n- - source ./ci/tools/threads.sh\n- - ./ci/test-regression.py --refs-path refs/UNCODED --results-path test-regression-results-uncoded --build-path build_linux_gcc_x64_sse4.2 --max-snr-time 5 --sensibility 2.5 --weak-rate 0.9 --verbose 1 --n-threads $THREADS\n+# test-regression-uncoded:\n+# stage: test\n+# retry: 1\n+# dependencies:\n+# - build-linux-gcc-x64-sse4.2\n+# tags:\n+# - linux\n+# - x86\n+# - 64-bit\n+# - sse4.2\n+# - python\n+# artifacts:\n+# name: test-regression-results-uncoded\n+# when: always\n+# paths:\n+# - test-regression-results-uncoded/\n+# script:\n+# - source ./ci/tools/threads.sh\n+# - ./ci/test-regression.py --refs-path refs/UNCODED --results-path test-regression-results-uncoded --build-path build_linux_gcc_x64_sse4.2 --max-snr-time 5 --sensibility 2.5 --weak-rate 0.9 --verbose 1 --n-threads $THREADS\n-test-build-coverage-regression:\n- stage: test\n- tags:\n- - linux\n- - gcc\n- - lcov\n- - sse4.2\n- - powerful\n- artifacts:\n- name: code-coverage-files\n- when: always\n- paths:\n- - code_coverage_files/\n- script:\n- - source ./ci/tools/threads.sh\n- - ./ci/test-build-coverage-regression.sh\n+# test-build-coverage-regression:\n+# stage: test\n+# tags:\n+# - linux\n+# - gcc\n+# - lcov\n+# - sse4.2\n+# - powerful\n+# artifacts:\n+# name: code-coverage-files\n+# when: always\n+# paths:\n+# - code_coverage_files/\n+# script:\n+# - source ./ci/tools/threads.sh\n+# - ./ci/test-build-coverage-regression.sh\n-coverage-linux:\n- stage: coverage\n- dependencies:\n- - test-build-coverage-regression\n- tags:\n- - linux\n- - lcov\n- - lcov_cobertura\n- coverage: '/.*lines\\.*: (\\d+.\\d+\\%)/'\n- artifacts:\n- name: code-coverage-report\n- when: always\n- paths:\n- - code_coverage_report/\n- script:\n- - ./ci/coverage-linux.sh\n+# coverage-linux:\n+# stage: coverage\n+# dependencies:\n+# - test-build-coverage-regression\n+# tags:\n+# - linux\n+# - lcov\n+# - lcov_cobertura\n+# coverage: '/.*lines\\.*: (\\d+.\\d+\\%)/'\n+# artifacts:\n+# name: code-coverage-report\n+# when: always\n+# paths:\n+# - code_coverage_report/\n+# script:\n+# - ./ci/coverage-linux.sh\n-deploy-sonarqube-linux:\n- stage: deploy\n- dependencies:\n- - analysis-cppcheck\n- - coverage-linux\n- tags:\n- - sonarqube\n- only:\n- - master\n- - development\n- script:\n- - source ./ci/tools/git-tag.sh\n- - source ./ci/tools/git-branch.sh\n- - ./ci/deploy-sonarqube-linux.sh\n+# deploy-sonarqube-linux:\n+# stage: deploy\n+# dependencies:\n+# - analysis-cppcheck\n+# - coverage-linux\n+# tags:\n+# - sonarqube\n+# only:\n+# - master\n+# - development\n+# script:\n+# - source ./ci/tools/git-tag.sh\n+# - source ./ci/tools/git-branch.sh\n+# - ./ci/deploy-sonarqube-linux.sh\n-deploy-builds-linux:\n- stage: deploy\n- dependencies:\n- - build-linux-gcc-x64-sse4.2\n- - build-linux-gcc-x64-avx2\n- - build-windows-gcc-x86-sse4.2\n- - build-windows-gcc-x64-avx2\n- - build-macos-clang-x64-sse4.2\n- tags:\n- - linux\n- - github\n- - git-lfs\n- only:\n- - master\n- - development\n- script:\n- - source ./ci/tools/git-branch.sh\n- - source ./ci/tools/git-tag.sh\n- - source ./ci/tools/git-hash.sh\n- - source ./ci/tools/git-date.sh\n- - source ./ci/tools/git-message.sh\n- - source ./ci/tools/git-author.sh\n- - ./ci/deploy-builds-linux.sh build_linux_gcc_x64_sse4.2 build_linux_gcc_x64_avx2 build_windows_gcc_x86_sse4.2 build_windows_gcc_x64_avx2 build_macos_clang_x64_sse4.2\n+# deploy-builds-linux:\n+# stage: deploy\n+# dependencies:\n+# - build-linux-gcc-x64-sse4.2\n+# - build-linux-gcc-x64-avx2\n+# - build-windows-gcc-x86-sse4.2\n+# - build-windows-gcc-x64-avx2\n+# - build-macos-clang-x64-sse4.2\n+# tags:\n+# - linux\n+# - github\n+# - git-lfs\n+# only:\n+# - master\n+# - development\n+# script:\n+# - source ./ci/tools/git-branch.sh\n+# - source ./ci/tools/git-tag.sh\n+# - source ./ci/tools/git-hash.sh\n+# - source ./ci/tools/git-date.sh\n+# - source ./ci/tools/git-message.sh\n+# - source ./ci/tools/git-author.sh\n+# - ./ci/deploy-builds-linux.sh build_linux_gcc_x64_sse4.2 build_linux_gcc_x64_avx2 build_windows_gcc_x86_sse4.2 build_windows_gcc_x64_avx2 build_macos_clang_x64_sse4.2\n-pages:\n- stage: deploy\n- tags:\n- - linux\n- dependencies:\n- - coverage-linux\n- script:\n- - mv code_coverage_report/ public/\n- artifacts:\n- paths:\n- - public\n- expire_in: 30 days\n- only:\n- - development\n+# pages:\n+# stage: deploy\n+# tags:\n+# - linux\n+# dependencies:\n+# - coverage-linux\n+# script:\n+# - mv code_coverage_report/ public/\n+# artifacts:\n+# paths:\n+# - public\n+# expire_in: 30 days\n+# only:\n+# - development\n"
}
] |
C++
|
MIT License
|
aff3ct/aff3ct
|
Deactivate CI pipeline, as code is not modified.
|
8,483 |
06.11.2018 16:02:20
| -3,600 |
58d38e1010be7029a28f1e4d17f1985e1eb6d1c1
|
Rename Codebook's attributes and methods about resource/user tables.
|
[
{
"change_type": "MODIFY",
"old_path": "refs",
"new_path": "refs",
"diff": "-Subproject commit 7f32c432d86f7b11f49e396415865a814d0aac3d\n+Subproject commit 94af1080719a0b616d00ea2a1694f5d0526d08a4\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Module/Modem/SCMA/Modem_SCMA.hxx",
"new_path": "src/Module/Modem/SCMA/Modem_SCMA.hxx",
"diff": "@@ -231,25 +231,25 @@ void Modem_SCMA<B,R,Q,PSI>\nthrow tools::runtime_error(__FILE__, __LINE__, __func__, \"No noise has been set\");\n// declarations\n- Q msg_user_res[6][4][4] = {};\n+ Q msg_user_to_resources[6][4][4] = {};\nQ msg_res_user[4][6][4] = {};\nQ guess[6][4] = {};\n// initial probability of each codeword/user\nfor (auto i = 0; i < CB.get_codebook_size(); i++)\n{\n- msg_user_res[0][CB.get_user_re(0,0)][i] = (Q)0.25;\n- msg_user_res[0][CB.get_user_re(0,1)][i] = (Q)0.25;\n- msg_user_res[1][CB.get_user_re(1,0)][i] = (Q)0.25;\n- msg_user_res[1][CB.get_user_re(1,1)][i] = (Q)0.25;\n- msg_user_res[2][CB.get_user_re(2,0)][i] = (Q)0.25;\n- msg_user_res[2][CB.get_user_re(2,1)][i] = (Q)0.25;\n- msg_user_res[3][CB.get_user_re(3,0)][i] = (Q)0.25;\n- msg_user_res[3][CB.get_user_re(3,1)][i] = (Q)0.25;\n- msg_user_res[4][CB.get_user_re(4,0)][i] = (Q)0.25;\n- msg_user_res[4][CB.get_user_re(4,1)][i] = (Q)0.25;\n- msg_user_res[5][CB.get_user_re(5,0)][i] = (Q)0.25;\n- msg_user_res[5][CB.get_user_re(5,1)][i] = (Q)0.25;\n+ msg_user_to_resources[0][CB.get_user_to_resource(0,0)][i] = (Q)0.25;\n+ msg_user_to_resources[0][CB.get_user_to_resource(0,1)][i] = (Q)0.25;\n+ msg_user_to_resources[1][CB.get_user_to_resource(1,0)][i] = (Q)0.25;\n+ msg_user_to_resources[1][CB.get_user_to_resource(1,1)][i] = (Q)0.25;\n+ msg_user_to_resources[2][CB.get_user_to_resource(2,0)][i] = (Q)0.25;\n+ msg_user_to_resources[2][CB.get_user_to_resource(2,1)][i] = (Q)0.25;\n+ msg_user_to_resources[3][CB.get_user_to_resource(3,0)][i] = (Q)0.25;\n+ msg_user_to_resources[3][CB.get_user_to_resource(3,1)][i] = (Q)0.25;\n+ msg_user_to_resources[4][CB.get_user_to_resource(4,0)][i] = (Q)0.25;\n+ msg_user_to_resources[4][CB.get_user_to_resource(4,1)][i] = (Q)0.25;\n+ msg_user_to_resources[5][CB.get_user_to_resource(5,0)][i] = (Q)0.25;\n+ msg_user_to_resources[5][CB.get_user_to_resource(5,1)][i] = (Q)0.25;\n}\n// starting iteration\n@@ -259,18 +259,18 @@ void Modem_SCMA<B,R,Q,PSI>\n// initialization\nfor (auto i = 0; i < CB.get_number_of_orthogonal_resources(); i++)\n{\n- msg_res_user[0][CB.get_re_user(0,0)][i] = (Q)0;\n- msg_res_user[0][CB.get_re_user(0,1)][i] = (Q)0;\n- msg_res_user[0][CB.get_re_user(0,2)][i] = (Q)0;\n- msg_res_user[1][CB.get_re_user(1,0)][i] = (Q)0;\n- msg_res_user[1][CB.get_re_user(1,1)][i] = (Q)0;\n- msg_res_user[1][CB.get_re_user(1,2)][i] = (Q)0;\n- msg_res_user[2][CB.get_re_user(2,0)][i] = (Q)0;\n- msg_res_user[2][CB.get_re_user(2,1)][i] = (Q)0;\n- msg_res_user[2][CB.get_re_user(2,2)][i] = (Q)0;\n- msg_res_user[3][CB.get_re_user(3,0)][i] = (Q)0;\n- msg_res_user[3][CB.get_re_user(3,1)][i] = (Q)0;\n- msg_res_user[3][CB.get_re_user(3,2)][i] = (Q)0;\n+ msg_res_user[0][CB.get_resource_to_user(0,0)][i] = (Q)0;\n+ msg_res_user[0][CB.get_resource_to_user(0,1)][i] = (Q)0;\n+ msg_res_user[0][CB.get_resource_to_user(0,2)][i] = (Q)0;\n+ msg_res_user[1][CB.get_resource_to_user(1,0)][i] = (Q)0;\n+ msg_res_user[1][CB.get_resource_to_user(1,1)][i] = (Q)0;\n+ msg_res_user[1][CB.get_resource_to_user(1,2)][i] = (Q)0;\n+ msg_res_user[2][CB.get_resource_to_user(2,0)][i] = (Q)0;\n+ msg_res_user[2][CB.get_resource_to_user(2,1)][i] = (Q)0;\n+ msg_res_user[2][CB.get_resource_to_user(2,2)][i] = (Q)0;\n+ msg_res_user[3][CB.get_resource_to_user(3,0)][i] = (Q)0;\n+ msg_res_user[3][CB.get_resource_to_user(3,1)][i] = (Q)0;\n+ msg_res_user[3][CB.get_resource_to_user(3,2)][i] = (Q)0;\n}\nfor (auto i = 0; i < CB.get_codebook_size(); i++) // codeword index\n@@ -278,83 +278,83 @@ void Modem_SCMA<B,R,Q,PSI>\nfor (auto k = 0; k < CB.get_codebook_size(); k++)\nfor(auto re = 0; re < CB.get_number_of_orthogonal_resources(); re++)\n{\n- msg_res_user[re][CB.get_re_user(re,0)][i] = msg_res_user[re][CB.get_re_user(re,0)][i]\n+ msg_res_user[re][CB.get_resource_to_user(re,0)][i] = msg_res_user[re][CB.get_resource_to_user(re,0)][i]\n+ arr_phi[re][i][j][k]\n- * msg_user_res[CB.get_re_user(re,1)][re][j]\n- * msg_user_res[CB.get_re_user(re,2)][re][k];\n- msg_res_user[re][CB.get_re_user(re,1)][i] = msg_res_user[re][CB.get_re_user(re,1)][i]\n+ * msg_user_to_resources[CB.get_resource_to_user(re,1)][re][j]\n+ * msg_user_to_resources[CB.get_resource_to_user(re,2)][re][k];\n+ msg_res_user[re][CB.get_resource_to_user(re,1)][i] = msg_res_user[re][CB.get_resource_to_user(re,1)][i]\n+ arr_phi[re][j][i][k]\n- * msg_user_res[CB.get_re_user(re,0)][re][j]\n- * msg_user_res[CB.get_re_user(re,2)][re][k];\n- msg_res_user[re][CB.get_re_user(re,2)][i] = msg_res_user[re][CB.get_re_user(re,2)][i]\n+ * msg_user_to_resources[CB.get_resource_to_user(re,0)][re][j]\n+ * msg_user_to_resources[CB.get_resource_to_user(re,2)][re][k];\n+ msg_res_user[re][CB.get_resource_to_user(re,2)][i] = msg_res_user[re][CB.get_resource_to_user(re,2)][i]\n+ arr_phi[re][j][k][i]\n- * msg_user_res[CB.get_re_user(re,0)][re][j]\n- * msg_user_res[CB.get_re_user(re,1)][re][k];\n+ * msg_user_to_resources[CB.get_resource_to_user(re,0)][re][j]\n+ * msg_user_to_resources[CB.get_resource_to_user(re,1)][re][k];\n}\n// user to resource messaging\nfor (auto i = 0; i < CB.get_number_of_orthogonal_resources(); i++)\n{\n- msg_user_res[0][CB.get_user_re(0,0)][i] = msg_res_user[CB.get_user_re(0,1)][0][i] /\n- (msg_res_user[CB.get_user_re(0,1)][0][0] +\n- msg_res_user[CB.get_user_re(0,1)][0][1] +\n- msg_res_user[CB.get_user_re(0,1)][0][2] +\n- msg_res_user[CB.get_user_re(0,1)][0][3]);\n- msg_user_res[0][CB.get_user_re(0,1)][i] = msg_res_user[CB.get_user_re(0,0)][0][i] /\n- (msg_res_user[CB.get_user_re(0,0)][0][0] +\n- msg_res_user[CB.get_user_re(0,0)][0][1] +\n- msg_res_user[CB.get_user_re(0,0)][0][2] +\n- msg_res_user[CB.get_user_re(0,0)][0][3]);\n- msg_user_res[1][CB.get_user_re(1,0)][i] = msg_res_user[CB.get_user_re(1,1)][1][i] /\n- (msg_res_user[CB.get_user_re(1,1)][1][0] +\n- msg_res_user[CB.get_user_re(1,1)][1][1] +\n- msg_res_user[CB.get_user_re(1,1)][1][2] +\n- msg_res_user[CB.get_user_re(1,1)][1][3]);\n- msg_user_res[1][CB.get_user_re(1,1)][i] = msg_res_user[CB.get_user_re(1,0)][1][i] /\n- (msg_res_user[CB.get_user_re(1,0)][1][0] +\n- msg_res_user[CB.get_user_re(1,0)][1][1] +\n- msg_res_user[CB.get_user_re(1,0)][1][2] +\n- msg_res_user[CB.get_user_re(1,0)][1][3]);\n- msg_user_res[2][CB.get_user_re(2,0)][i] = msg_res_user[CB.get_user_re(2,1)][2][i] /\n- (msg_res_user[CB.get_user_re(2,1)][2][0] +\n- msg_res_user[CB.get_user_re(2,1)][2][1] +\n- msg_res_user[CB.get_user_re(2,1)][2][2] +\n- msg_res_user[CB.get_user_re(2,1)][2][3]);\n- msg_user_res[2][CB.get_user_re(2,1)][i] = msg_res_user[CB.get_user_re(2,0)][2][i] /\n- (msg_res_user[CB.get_user_re(2,0)][2][0] +\n- msg_res_user[CB.get_user_re(2,0)][2][1] +\n- msg_res_user[CB.get_user_re(2,0)][2][2] +\n- msg_res_user[CB.get_user_re(2,0)][2][3]);\n- msg_user_res[3][CB.get_user_re(3,0)][i] = msg_res_user[CB.get_user_re(3,1)][3][i] /\n- (msg_res_user[CB.get_user_re(3,1)][3][0] +\n- msg_res_user[CB.get_user_re(3,1)][3][1] +\n- msg_res_user[CB.get_user_re(3,1)][3][2] +\n- msg_res_user[CB.get_user_re(3,1)][3][3]);\n- msg_user_res[3][CB.get_user_re(3,1)][i] = msg_res_user[CB.get_user_re(3,0)][3][i] /\n- (msg_res_user[CB.get_user_re(3,0)][3][0] +\n- msg_res_user[CB.get_user_re(3,0)][3][1] +\n- msg_res_user[CB.get_user_re(3,0)][3][2] +\n- msg_res_user[CB.get_user_re(3,0)][3][3]);\n- msg_user_res[4][CB.get_user_re(4,0)][i] = msg_res_user[CB.get_user_re(4,1)][4][i] /\n- (msg_res_user[CB.get_user_re(4,1)][4][0] +\n- msg_res_user[CB.get_user_re(4,1)][4][1] +\n- msg_res_user[CB.get_user_re(4,1)][4][2] +\n- msg_res_user[CB.get_user_re(4,1)][4][3]);\n- msg_user_res[4][CB.get_user_re(4,1)][i] = msg_res_user[CB.get_user_re(4,0)][4][i] /\n- (msg_res_user[CB.get_user_re(4,0)][4][0] +\n- msg_res_user[CB.get_user_re(4,0)][4][1] +\n- msg_res_user[CB.get_user_re(4,0)][4][2] +\n- msg_res_user[CB.get_user_re(4,0)][4][3]);\n- msg_user_res[5][CB.get_user_re(5,0)][i] = msg_res_user[CB.get_user_re(5,1)][5][i] /\n- (msg_res_user[CB.get_user_re(5,1)][5][0] +\n- msg_res_user[CB.get_user_re(5,1)][5][1] +\n- msg_res_user[CB.get_user_re(5,1)][5][2] +\n- msg_res_user[CB.get_user_re(5,1)][5][3]);\n- msg_user_res[5][CB.get_user_re(5,1)][i] = msg_res_user[CB.get_user_re(5,0)][5][i] /\n- (msg_res_user[CB.get_user_re(5,0)][5][0] +\n- msg_res_user[CB.get_user_re(5,0)][5][1] +\n- msg_res_user[CB.get_user_re(5,0)][5][2] +\n- msg_res_user[CB.get_user_re(5,0)][5][3]);\n+ msg_user_to_resources[0][CB.get_user_to_resource(0,0)][i] = msg_res_user[CB.get_user_to_resource(0,1)][0][i] /\n+ (msg_res_user[CB.get_user_to_resource(0,1)][0][0] +\n+ msg_res_user[CB.get_user_to_resource(0,1)][0][1] +\n+ msg_res_user[CB.get_user_to_resource(0,1)][0][2] +\n+ msg_res_user[CB.get_user_to_resource(0,1)][0][3]);\n+ msg_user_to_resources[0][CB.get_user_to_resource(0,1)][i] = msg_res_user[CB.get_user_to_resource(0,0)][0][i] /\n+ (msg_res_user[CB.get_user_to_resource(0,0)][0][0] +\n+ msg_res_user[CB.get_user_to_resource(0,0)][0][1] +\n+ msg_res_user[CB.get_user_to_resource(0,0)][0][2] +\n+ msg_res_user[CB.get_user_to_resource(0,0)][0][3]);\n+ msg_user_to_resources[1][CB.get_user_to_resource(1,0)][i] = msg_res_user[CB.get_user_to_resource(1,1)][1][i] /\n+ (msg_res_user[CB.get_user_to_resource(1,1)][1][0] +\n+ msg_res_user[CB.get_user_to_resource(1,1)][1][1] +\n+ msg_res_user[CB.get_user_to_resource(1,1)][1][2] +\n+ msg_res_user[CB.get_user_to_resource(1,1)][1][3]);\n+ msg_user_to_resources[1][CB.get_user_to_resource(1,1)][i] = msg_res_user[CB.get_user_to_resource(1,0)][1][i] /\n+ (msg_res_user[CB.get_user_to_resource(1,0)][1][0] +\n+ msg_res_user[CB.get_user_to_resource(1,0)][1][1] +\n+ msg_res_user[CB.get_user_to_resource(1,0)][1][2] +\n+ msg_res_user[CB.get_user_to_resource(1,0)][1][3]);\n+ msg_user_to_resources[2][CB.get_user_to_resource(2,0)][i] = msg_res_user[CB.get_user_to_resource(2,1)][2][i] /\n+ (msg_res_user[CB.get_user_to_resource(2,1)][2][0] +\n+ msg_res_user[CB.get_user_to_resource(2,1)][2][1] +\n+ msg_res_user[CB.get_user_to_resource(2,1)][2][2] +\n+ msg_res_user[CB.get_user_to_resource(2,1)][2][3]);\n+ msg_user_to_resources[2][CB.get_user_to_resource(2,1)][i] = msg_res_user[CB.get_user_to_resource(2,0)][2][i] /\n+ (msg_res_user[CB.get_user_to_resource(2,0)][2][0] +\n+ msg_res_user[CB.get_user_to_resource(2,0)][2][1] +\n+ msg_res_user[CB.get_user_to_resource(2,0)][2][2] +\n+ msg_res_user[CB.get_user_to_resource(2,0)][2][3]);\n+ msg_user_to_resources[3][CB.get_user_to_resource(3,0)][i] = msg_res_user[CB.get_user_to_resource(3,1)][3][i] /\n+ (msg_res_user[CB.get_user_to_resource(3,1)][3][0] +\n+ msg_res_user[CB.get_user_to_resource(3,1)][3][1] +\n+ msg_res_user[CB.get_user_to_resource(3,1)][3][2] +\n+ msg_res_user[CB.get_user_to_resource(3,1)][3][3]);\n+ msg_user_to_resources[3][CB.get_user_to_resource(3,1)][i] = msg_res_user[CB.get_user_to_resource(3,0)][3][i] /\n+ (msg_res_user[CB.get_user_to_resource(3,0)][3][0] +\n+ msg_res_user[CB.get_user_to_resource(3,0)][3][1] +\n+ msg_res_user[CB.get_user_to_resource(3,0)][3][2] +\n+ msg_res_user[CB.get_user_to_resource(3,0)][3][3]);\n+ msg_user_to_resources[4][CB.get_user_to_resource(4,0)][i] = msg_res_user[CB.get_user_to_resource(4,1)][4][i] /\n+ (msg_res_user[CB.get_user_to_resource(4,1)][4][0] +\n+ msg_res_user[CB.get_user_to_resource(4,1)][4][1] +\n+ msg_res_user[CB.get_user_to_resource(4,1)][4][2] +\n+ msg_res_user[CB.get_user_to_resource(4,1)][4][3]);\n+ msg_user_to_resources[4][CB.get_user_to_resource(4,1)][i] = msg_res_user[CB.get_user_to_resource(4,0)][4][i] /\n+ (msg_res_user[CB.get_user_to_resource(4,0)][4][0] +\n+ msg_res_user[CB.get_user_to_resource(4,0)][4][1] +\n+ msg_res_user[CB.get_user_to_resource(4,0)][4][2] +\n+ msg_res_user[CB.get_user_to_resource(4,0)][4][3]);\n+ msg_user_to_resources[5][CB.get_user_to_resource(5,0)][i] = msg_res_user[CB.get_user_to_resource(5,1)][5][i] /\n+ (msg_res_user[CB.get_user_to_resource(5,1)][5][0] +\n+ msg_res_user[CB.get_user_to_resource(5,1)][5][1] +\n+ msg_res_user[CB.get_user_to_resource(5,1)][5][2] +\n+ msg_res_user[CB.get_user_to_resource(5,1)][5][3]);\n+ msg_user_to_resources[5][CB.get_user_to_resource(5,1)][i] = msg_res_user[CB.get_user_to_resource(5,0)][5][i] /\n+ (msg_res_user[CB.get_user_to_resource(5,0)][5][0] +\n+ msg_res_user[CB.get_user_to_resource(5,0)][5][1] +\n+ msg_res_user[CB.get_user_to_resource(5,0)][5][2] +\n+ msg_res_user[CB.get_user_to_resource(5,0)][5][3]);\n}\n}\n// end of iterations\n@@ -362,12 +362,12 @@ void Modem_SCMA<B,R,Q,PSI>\n// guess at each user\nfor (auto i = 0; i < CB.get_codebook_size(); i++) //codeword index\n{\n- guess[0][i] = msg_res_user[CB.get_user_re(0,0)][0][i] * msg_res_user[CB.get_user_re(0,1)][0][i];\n- guess[1][i] = msg_res_user[CB.get_user_re(1,0)][1][i] * msg_res_user[CB.get_user_re(1,1)][1][i];\n- guess[2][i] = msg_res_user[CB.get_user_re(2,0)][2][i] * msg_res_user[CB.get_user_re(2,1)][2][i];\n- guess[3][i] = msg_res_user[CB.get_user_re(3,0)][3][i] * msg_res_user[CB.get_user_re(3,1)][3][i];\n- guess[4][i] = msg_res_user[CB.get_user_re(4,0)][4][i] * msg_res_user[CB.get_user_re(4,1)][4][i];\n- guess[5][i] = msg_res_user[CB.get_user_re(5,0)][5][i] * msg_res_user[CB.get_user_re(5,1)][5][i];\n+ guess[0][i] = msg_res_user[CB.get_user_to_resource(0,0)][0][i] * msg_res_user[CB.get_user_to_resource(0,1)][0][i];\n+ guess[1][i] = msg_res_user[CB.get_user_to_resource(1,0)][1][i] * msg_res_user[CB.get_user_to_resource(1,1)][1][i];\n+ guess[2][i] = msg_res_user[CB.get_user_to_resource(2,0)][2][i] * msg_res_user[CB.get_user_to_resource(2,1)][2][i];\n+ guess[3][i] = msg_res_user[CB.get_user_to_resource(3,0)][3][i] * msg_res_user[CB.get_user_to_resource(3,1)][3][i];\n+ guess[4][i] = msg_res_user[CB.get_user_to_resource(4,0)][4][i] * msg_res_user[CB.get_user_to_resource(4,1)][4][i];\n+ guess[5][i] = msg_res_user[CB.get_user_to_resource(5,0)][5][i] * msg_res_user[CB.get_user_to_resource(5,1)][5][i];\n}\n// LLRs computation\n@@ -398,9 +398,9 @@ Q Modem_SCMA<B,R,Q,PSI>\nauto Y_N = std::complex<Q>(Y_N1[batch *8 + 2*re], Y_N1[batch*8 + 2*re +1]);\n- const auto CB0 = std::complex<Q>((Q)CB(CB.get_re_user(re,0), re, i).real(), (Q)CB(CB.get_re_user(re,0), re, i).imag());\n- const auto CB1 = std::complex<Q>((Q)CB(CB.get_re_user(re,1), re, j).real(), (Q)CB(CB.get_re_user(re,1), re, j).imag());\n- const auto CB2 = std::complex<Q>((Q)CB(CB.get_re_user(re,2), re, k).real(), (Q)CB(CB.get_re_user(re,2), re, k).imag());\n+ const auto CB0 = std::complex<Q>((Q)CB(CB.get_resource_to_user(re,0), re, i).real(), (Q)CB(CB.get_resource_to_user(re,0), re, i).imag());\n+ const auto CB1 = std::complex<Q>((Q)CB(CB.get_resource_to_user(re,1), re, j).real(), (Q)CB(CB.get_resource_to_user(re,1), re, j).imag());\n+ const auto CB2 = std::complex<Q>((Q)CB(CB.get_resource_to_user(re,2), re, k).real(), (Q)CB(CB.get_resource_to_user(re,2), re, k).imag());\ntmp = Y_N - (CB0 + CB1 + CB2);\n@@ -419,16 +419,16 @@ Q Modem_SCMA<B,R,Q,PSI>\nconst auto Y_N = std::complex<Q>(Y_N1[batch *8 + 2*re], Y_N1[batch*8 + 2*re +1]);\n- const auto H_N0 = std::complex<Q>((Q)H_N[CB.get_re_user(re,0) * Nmod + 8 * batch + 2 * re ],\n- (Q)H_N[CB.get_re_user(re,0) * Nmod + 8 * batch + 2 * re +1]);\n- const auto H_N1 = std::complex<Q>((Q)H_N[CB.get_re_user(re,1) * Nmod + 8 * batch + 2 * re ],\n- (Q)H_N[CB.get_re_user(re,1) * Nmod + 8 * batch + 2 * re +1]);\n- const auto H_N2 = std::complex<Q>((Q)H_N[CB.get_re_user(re,2) * Nmod + 8 * batch + 2 * re ],\n- (Q)H_N[CB.get_re_user(re,2) * Nmod + 8 * batch + 2 * re +1]);\n+ const auto H_N0 = std::complex<Q>((Q)H_N[CB.get_resource_to_user(re,0) * Nmod + 8 * batch + 2 * re ],\n+ (Q)H_N[CB.get_resource_to_user(re,0) * Nmod + 8 * batch + 2 * re +1]);\n+ const auto H_N1 = std::complex<Q>((Q)H_N[CB.get_resource_to_user(re,1) * Nmod + 8 * batch + 2 * re ],\n+ (Q)H_N[CB.get_resource_to_user(re,1) * Nmod + 8 * batch + 2 * re +1]);\n+ const auto H_N2 = std::complex<Q>((Q)H_N[CB.get_resource_to_user(re,2) * Nmod + 8 * batch + 2 * re ],\n+ (Q)H_N[CB.get_resource_to_user(re,2) * Nmod + 8 * batch + 2 * re +1]);\n- const auto CB0 = std::complex<Q>((Q)CB(CB.get_re_user(re,0), re, i).real(), (Q)CB(CB.get_re_user(re,0), re, i).imag());\n- const auto CB1 = std::complex<Q>((Q)CB(CB.get_re_user(re,1), re, j).real(), (Q)CB(CB.get_re_user(re,1), re, j).imag());\n- const auto CB2 = std::complex<Q>((Q)CB(CB.get_re_user(re,2), re, k).real(), (Q)CB(CB.get_re_user(re,2), re, k).imag());\n+ const auto CB0 = std::complex<Q>((Q)CB(CB.get_resource_to_user(re,0), re, i).real(), (Q)CB(CB.get_resource_to_user(re,0), re, i).imag());\n+ const auto CB1 = std::complex<Q>((Q)CB(CB.get_resource_to_user(re,1), re, j).real(), (Q)CB(CB.get_resource_to_user(re,1), re, j).imag());\n+ const auto CB2 = std::complex<Q>((Q)CB(CB.get_resource_to_user(re,2), re, k).real(), (Q)CB(CB.get_resource_to_user(re,2), re, k).imag());\ntmp = Y_N - (H_N0 * CB0 + H_N1 * CB1 + H_N2 * CB2);\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Tools/Code/SCMA/Codebook.hpp",
"new_path": "src/Tools/Code/SCMA/Codebook.hpp",
"diff": "@@ -22,18 +22,17 @@ public:\nint get_number_of_users() const;\nint get_number_of_orthogonal_resources() const;\nint get_codebook_size() const;\n- int get_re_user(int r, int u) const;\n- int get_user_re(int u, int r) const;\n+ int get_resource_to_user(int r, int u) const;\n+ int get_user_to_resource(int u, int r) const;\nprivate:\n- std::vector<std::vector<std::vector<std::complex<R>>>> data;\n-\nint number_of_users;\nint number_of_orthogonal_resources;\nint codebook_size;\n- int re_user[4][3];\n- int user_re[6][2];\n+ std::vector<std::vector<std::vector<std::complex<R>>>> data;\n+ std::vector<std::vector<int>> resource_to_user;\n+ std::vector<std::vector<int>> user_to_resource;\nvoid read_codebook(const std::string& codebook_path);\n};\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Tools/Code/SCMA/Codebook.hxx",
"new_path": "src/Tools/Code/SCMA/Codebook.hxx",
"diff": "@@ -98,7 +98,7 @@ void Codebook<R>\n{\nif (F[r][u] == 1)\n{\n- re_user[r][idx] = u;\n+ resource_to_user[r][idx] = u;\nidx++;\n}\n}\n@@ -111,7 +111,7 @@ void Codebook<R>\n{\nif (F[r][u] == 1)\n{\n- user_re[u][idx] = r;\n+ user_to_resource[u][idx] = r;\nidx++;\n}\n}\n@@ -150,16 +150,16 @@ inline int Codebook<R>\ntemplate <typename R>\ninline int Codebook<R>\n-::get_re_user(int r, int u) const\n+::get_resource_to_user(int r, int u) const\n{\n- return re_user[r][u];\n+ return resource_to_user[r][u];\n}\ntemplate <typename R>\ninline int Codebook<R>\n-::get_user_re(int u, int r) const\n+::get_user_to_resource(int u, int r) const\n{\n- return user_re[u][r];\n+ return user_to_resource[u][r];\n}\n}\n"
}
] |
C++
|
MIT License
|
aff3ct/aff3ct
|
Rename Codebook's attributes and methods about resource/user tables.
|
8,490 |
07.11.2018 10:31:16
| -3,600 |
dfeb51bc599b90b24b3cacf8d063c27dc906dae5
|
CI: remove useless definitions + put the compile options in the yml file.
|
[
{
"change_type": "MODIFY",
"old_path": ".gitlab-ci.yml",
"new_path": ".gitlab-ci.yml",
"diff": "@@ -39,7 +39,7 @@ build-linux-gcc-nointr:\nscript:\n- export CC=\"gcc\"\n- export CXX=\"g++\"\n- - export CFLAGS=\"-DMIPP_NO_INTRINSICS\"\n+ - export CFLAGS=\"-Wall -funroll-loops -DMIPP_NO_INTRINSICS\"\n- export LFLAGS=\"-static -static-libgcc -static-libstdc++ -Wl,--whole-archive -lpthread -Wl,--no-whole-archive\"\n- export CMAKE_OPT=\"-DAFF3CT_COMPILE_EXE=ON -DAFF3CT_COMPILE_STATIC_LIB=ON -DAFF3CT_COMPILE_SHARED_LIB=ON -DAFF3CT_PREC=MULTI -DAFF3CT_LINK_GSL=ON\"\n- export NAME=\"build_linux_gcc_nointr\"\n@@ -62,7 +62,7 @@ build-linux-gcc-x64-sse4.2:\nscript:\n- export CC=\"gcc\"\n- export CXX=\"g++\"\n- - export CFLAGS=\"-m64 -msse4.2\"\n+ - export CFLAGS=\"-Wall -funroll-loops -m64 -msse4.2\"\n- export LFLAGS=\"-static -static-libgcc -static-libstdc++ -Wl,--whole-archive -lpthread -Wl,--no-whole-archive\"\n- export CMAKE_OPT=\"-DAFF3CT_COMPILE_EXE=ON -DAFF3CT_COMPILE_STATIC_LIB=ON -DAFF3CT_COMPILE_SHARED_LIB=ON -DAFF3CT_PREC=MULTI -DAFF3CT_LINK_GSL=ON\"\n- export NAME=\"build_linux_gcc_x64_sse4.2\"\n@@ -85,7 +85,7 @@ build-linux-gcc-x64-avx2:\nscript:\n- export CC=\"gcc\"\n- export CXX=\"g++\"\n- - export CFLAGS=\"-m64 -mavx2 -mfma\"\n+ - export CFLAGS=\"-Wall -funroll-loops -m64 -mavx2 -mfma\"\n- export LFLAGS=\"-static -static-libgcc -static-libstdc++ -Wl,--whole-archive -lpthread -Wl,--no-whole-archive\"\n- export CMAKE_OPT=\"-DAFF3CT_COMPILE_EXE=ON -DAFF3CT_COMPILE_STATIC_LIB=ON -DAFF3CT_COMPILE_SHARED_LIB=ON -DAFF3CT_PREC=MULTI -DAFF3CT_LINK_GSL=ON\"\n- export NAME=\"build_linux_gcc_x64_avx2\"\n@@ -107,7 +107,7 @@ build-linux-gcc-8-bit:\nscript:\n- export CC=\"gcc\"\n- export CXX=\"g++\"\n- - export CFLAGS=\"-march=native\"\n+ - export CFLAGS=\"-Wall -funroll-loops -march=native\"\n- export CMAKE_OPT=\"-DAFF3CT_COMPILE_EXE=ON -DAFF3CT_COMPILE_STATIC_LIB=ON -DAFF3CT_COMPILE_SHARED_LIB=ON -DAFF3CT_PREC=8 -DAFF3CT_LINK_GSL=ON\"\n- export NAME=\"build_linux_gcc_8_bit\"\n- source ./ci/tools/threads.sh\n@@ -128,7 +128,7 @@ build-linux-gcc-mpi:\nscript:\n- export CC=\"gcc\"\n- export CXX=\"g++\"\n- - export CFLAGS=\"-march=native\"\n+ - export CFLAGS=\"-Wall -funroll-loops -march=native\"\n- export CMAKE_OPT=\"-DAFF3CT_COMPILE_EXE=ON -DAFF3CT_COMPILE_STATIC_LIB=ON -DAFF3CT_COMPILE_SHARED_LIB=ON -DAFF3CT_PREC=MULTI -DAFF3CT_LINK_GSL=ON -DAFF3CT_MPI=ON\"\n- export NAME=\"build_linux_gcc_mpi\"\n- source ./ci/tools/threads.sh\n@@ -150,7 +150,7 @@ build-linux-gcc-systemc:\n- cp $SYSTEMC_HOME/FindTLM.cmake cmake/Modules/\n- export CC=\"gcc\"\n- export CXX=\"g++\"\n- - export CFLAGS=\"-march=native -Wno-deprecated-declarations\"\n+ - export CFLAGS=\"-Wall -funroll-loops -march=native -Wno-deprecated-declarations\"\n- export CMAKE_OPT=\"-DAFF3CT_COMPILE_EXE=ON -DAFF3CT_PREC=MULTI -DAFF3CT_SYSTEMC_SIMU=ON\"\n- export NAME=\"build_linux_gcc_systemc\"\n- source ./ci/tools/threads.sh\n@@ -170,7 +170,7 @@ build-linux-clang:\nscript:\n- export CC=\"clang\"\n- export CXX=\"clang++\"\n- - export CFLAGS=\"\"\n+ - export CFLAGS=\"-Wall -funroll-loops\"\n- export CMAKE_OPT=\"-DAFF3CT_COMPILE_EXE=ON -DAFF3CT_COMPILE_STATIC_LIB=ON -DAFF3CT_COMPILE_SHARED_LIB=ON -DAFF3CT_PREC=MULTI -DAFF3CT_LINK_GSL=ON\"\n- export NAME=\"build_linux_clang\"\n- source ./ci/tools/threads.sh\n@@ -190,7 +190,7 @@ build-linux-gcc-4.8:\nscript:\n- export CC=\"gcc-4.8\"\n- export CXX=\"g++-4.8\"\n- - export CFLAGS=\"-march=native\"\n+ - export CFLAGS=\"-Wall -funroll-loops -march=native\"\n- export CMAKE_OPT=\"-DAFF3CT_COMPILE_EXE=ON -DAFF3CT_COMPILE_STATIC_LIB=ON -DAFF3CT_COMPILE_SHARED_LIB=ON -DAFF3CT_PREC=MULTI -DAFF3CT_LINK_GSL=ON\"\n- export NAME=\"build_linux_gcc-4.8\"\n- source ./ci/tools/threads.sh\n@@ -213,7 +213,7 @@ build-linux-icpc:\n- source /opt/intel/vars-intel.sh\n- export CC=\"icc\"\n- export CXX=\"icpc\"\n- - export CFLAGS=\"-march=native -std=c++11\"\n+ - export CFLAGS=\"-Wall -funroll-loops -march=native -std=c++11\"\n- export CMAKE_OPT=\"-DAFF3CT_COMPILE_EXE=ON -DAFF3CT_COMPILE_STATIC_LIB=ON -DAFF3CT_COMPILE_SHARED_LIB=ON -DAFF3CT_PREC=MULTI -DAFF3CT_LINK_GSL=ON -DAFF3CT_LINK_MKL=ON\"\n- export NAME=\"build_linux_icpc\"\n- source ./ci/tools/threads.sh\n@@ -232,7 +232,7 @@ build-windows-gcc-x86-sse4.2:\npaths:\n- build_windows_gcc_x86_sse4.2\nscript:\n- - set \"CFLAGS=-m32 -msse4.2\"\n+ - set \"CFLAGS=-Wall -funroll-loops -Wno-misleading-indentation -m32 -msse4.2\"\n- set \"LFLAGS=-static -static-libgcc -static-libstdc++\"\n- set \"CMAKE_OPT=-DAFF3CT_COMPILE_EXE=ON -DAFF3CT_COMPILE_STATIC_LIB=ON -DAFF3CT_PREC=MULTI\"\n- set \"NAME=build_windows_gcc_x86_sse4.2\"\n@@ -252,7 +252,7 @@ build-windows-gcc-x64-avx2:\npaths:\n- build_windows_gcc_x64_avx2\nscript:\n- - set \"CFLAGS=-m64 -mavx2\"\n+ - set \"CFLAGS=-Wall -funroll-loops -Wno-misleading-indentation -m64 -mavx2\"\n- set \"LFLAGS=-static -static-libgcc -static-libstdc++\"\n- set \"CMAKE_OPT=-DAFF3CT_COMPILE_EXE=ON -DAFF3CT_COMPILE_STATIC_LIB=ON -DAFF3CT_PREC=MULTI\"\n- set \"NAME=build_windows_gcc_x64_avx2\"\n@@ -271,7 +271,7 @@ build-windows-msvc-avx:\npaths:\n- build_windows_msvc_avx\nscript:\n- - set \"CFLAGS=/arch:AVX\"\n+ - set \"CFLAGS=-D_CRT_SECURE_NO_DEPRECATE /MT /EHsc /arch:AVX\"\n- set \"CMAKE_OPT=-DAFF3CT_COMPILE_EXE=ON -DAFF3CT_COMPILE_STATIC_LIB=ON -DAFF3CT_PREC=MULTI\"\n- set \"NAME=build_windows_msvc_avx\"\n- call ./ci/tools/threads.bat\n@@ -291,7 +291,7 @@ build-macos-clang-x64-sse4.2:\nscript:\n- export CC=\"clang\"\n- export CXX=\"clang++\"\n- - export CFLAGS=\"-m64 -msse4.2\"\n+ - export CFLAGS=\"-Wall -funroll-loops -m64 -msse4.2\"\n- export CMAKE_OPT=\"-DAFF3CT_COMPILE_EXE=ON -DAFF3CT_COMPILE_STATIC_LIB=ON -DAFF3CT_COMPILE_SHARED_LIB=ON -DAFF3CT_PREC=MULTI\"\n- export NAME=\"build_macos_clang_x64_sse4.2\"\n- source ./ci/tools/threads.sh\n"
},
{
"change_type": "MODIFY",
"old_path": "README.md",
"new_path": "README.md",
"diff": "@@ -24,7 +24,7 @@ Open a terminal and type (from the `AFF3CT` root folder):\n$ mkdir build\n$ cd build\n- $ cmake .. -G\"Unix Makefiles\" -DCMAKE_CXX_COMPILER=g++ -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS=\"-funroll-loops -march=native -DMULTI_PREC\"\n+ $ cmake .. -G\"Unix Makefiles\" -DCMAKE_CXX_COMPILER=g++ -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS=\"-funroll-loops -march=native\"\n## Compile the Code with the Makefile\n"
},
{
"change_type": "MODIFY",
"old_path": "ci/build-linux-macos.sh",
"new_path": "ci/build-linux-macos.sh",
"diff": "@@ -31,12 +31,12 @@ fi\nif [ -z \"$LFLAGS\" ]\nthen\ncmake .. -G\"Unix Makefiles\" -DCMAKE_CXX_COMPILER=$CC -DCMAKE_CXX_COMPILER=$CXX \\\n- -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS=\"-Wall -funroll-loops $CFLAGS\" \\\n+ -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS=\"$CFLAGS\" \\\n$CMAKE_OPT\nrc=$?; if [[ $rc != 0 ]]; then exit $rc; fi\nelse\ncmake .. -G\"Unix Makefiles\" -DCMAKE_CXX_COMPILER=$CC -DCMAKE_CXX_COMPILER=$CXX \\\n- -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS=\"-Wall -funroll-loops $CFLAGS\" \\\n+ -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS=\"$CFLAGS\" \\\n-DCMAKE_EXE_LINKER_FLAGS=\"$LFLAGS\" \\\n$CMAKE_OPT\nrc=$?; if [[ $rc != 0 ]]; then exit $rc; fi\n"
},
{
"change_type": "MODIFY",
"old_path": "ci/build-windows-gcc.bat",
"new_path": "ci/build-windows-gcc.bat",
"diff": "mkdir build\ncd build\n-cmake .. -G\"MinGW Makefiles\" -DCMAKE_CXX_COMPILER=g++.exe -DCMAKE_BUILD_TYPE=Release %CMAKE_OPT% -DCMAKE_CXX_FLAGS=\"-Wall -Wno-misleading-indentation -funroll-loops %CFLAGS%\" -DCMAKE_EXE_LINKER_FLAGS=\"%LFLAGS%\"\n+cmake .. -G\"MinGW Makefiles\" -DCMAKE_CXX_COMPILER=g++.exe -DCMAKE_BUILD_TYPE=Release %CMAKE_OPT% -DCMAKE_CXX_FLAGS=\"%CFLAGS%\" -DCMAKE_EXE_LINKER_FLAGS=\"%LFLAGS%\"\nif %ERRORLEVEL% neq 0 exit /B %ERRORLEVEL%\nmingw32-make -j %THREADS%\nif %ERRORLEVEL% neq 0 exit /B %ERRORLEVEL%\n"
},
{
"change_type": "MODIFY",
"old_path": "ci/build-windows-msvc.bat",
"new_path": "ci/build-windows-msvc.bat",
"diff": "@@ -5,7 +5,7 @@ call \"%VS_PATH%\\VC\\Auxiliary\\Build\\vcvars64.bat\"\nmkdir build\ncd build\n-cmake .. -G\"Visual Studio 15 2017 Win64\" %CMAKE_OPT% -DCMAKE_CXX_FLAGS=\"-D_CRT_SECURE_NO_DEPRECATE /MT /EHsc /MP%THREADS% %CFLAGS%\"\n+cmake .. -G\"Visual Studio 15 2017 Win64\" %CMAKE_OPT% -DCMAKE_CXX_FLAGS=\"%CFLAGS% /MP%THREADS%\"\nif %ERRORLEVEL% neq 0 exit /B %ERRORLEVEL%\ndevenv /build Release aff3ct.sln\nrem msbuild aff3ct.sln /t:Build /p:Configuration=Release\n"
},
{
"change_type": "MODIFY",
"old_path": "ci/test-build-coverage-regression.sh",
"new_path": "ci/test-build-coverage-regression.sh",
"diff": "@@ -14,7 +14,7 @@ function compile {\nbuild=$1\nmkdir $build\ncd $build\n- cmake .. -G\"Unix Makefiles\" -DCMAKE_CXX_COMPILER=g++ -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS_DEBUG=\"-O0\" -DCMAKE_CXX_FLAGS=\"-Wall -funroll-loops -msse4.2 -DMULTI_PREC -DENABLE_COOL_BASH --coverage\" -DCMAKE_EXE_LINKER_FLAGS=\"--coverage\"\n+ cmake .. -G\"Unix Makefiles\" -DCMAKE_CXX_COMPILER=g++ -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS_DEBUG=\"-O0\" -DCMAKE_CXX_FLAGS=\"-Wall -funroll-loops -msse4.2 --coverage\" -DCMAKE_EXE_LINKER_FLAGS=\"--coverage\" -DAFF3CT_COMPILE_EXE=\"ON\" -DAFF3CT_PREC=\"MULTI\"\nrc=$?; if [[ $rc != 0 ]]; then exit $rc; fi\nmake -j $THREADS\nrc=$?; if [[ $rc != 0 ]]; then exit $rc; fi\n"
}
] |
C++
|
MIT License
|
aff3ct/aff3ct
|
CI: remove useless definitions + put the compile options in the yml file.
|
8,483 |
07.11.2018 11:52:58
| -3,600 |
9b09aed20b76c037a4dcaaae038c2af9ea209c8a
|
Cosmetics and fix user_to_resource and resource_to_user fixed dimensions.
|
[
{
"change_type": "MODIFY",
"old_path": "src/Factory/Module/Modem/Modem.cpp",
"new_path": "src/Factory/Module/Modem/Modem.cpp",
"diff": "@@ -258,6 +258,7 @@ void Modem::parameters\n{\nheaders[p].push_back(std::make_pair(\"Number of iterations\", demod_ite));\nheaders[p].push_back(std::make_pair(\"Psi function\", demod_psi));\n+ headers[p].push_back(std::make_pair(\"codebook\", codebook ));\n}\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Tools/Code/SCMA/Codebook.hxx",
"new_path": "src/Tools/Code/SCMA/Codebook.hxx",
"diff": "@@ -46,6 +46,13 @@ void Codebook<R>\n{\nstd::ifstream file(codebook_path);\n+ if (file.bad())\n+ {\n+ std::stringstream message;\n+ message << \"Can't open '\" + codebook_path + \"' codebook file.\";\n+ throw tools::invalid_argument(__FILE__, __LINE__, __func__, message.str());\n+ }\n+\nfile >> number_of_users >> number_of_orthogonal_resources >> codebook_size;\ndata.resize(number_of_users);\n@@ -74,7 +81,7 @@ void Codebook<R>\n}\n// Factor graph calculation TODO: Now constants and fixed size (-> dynamic allocation later)\n- int F[4][6] = {};\n+ int F[number_of_orthogonal_resources][number_of_users];\nfor (int u = 0; u < number_of_users; ++u)\n{\n@@ -82,7 +89,7 @@ void Codebook<R>\n{\nfor (int c = 0; c < codebook_size; ++c)\n{\n- if ((data[u][r][c].real() != 0.0) || (data[u][r][c].imag() != 0.0))\n+ if ((data[u][r][c].real() != (R)0.0) || (data[u][r][c].imag() != (R)0.0))\n{\nF[r][u] = 1;\nbreak;\n@@ -91,8 +98,10 @@ void Codebook<R>\n}\n}\n+ resource_to_user.resize(4);\nfor (int r = 0; r < number_of_orthogonal_resources; ++r)\n{\n+ resource_to_user[r].resize(3);\nint idx = 0;\nfor (int u = 0; u < number_of_users; ++u)\n{\n@@ -104,8 +113,10 @@ void Codebook<R>\n}\n}\n+ user_to_resource.resize(6);\nfor (int u = 0; u < number_of_users; ++u)\n{\n+ user_to_resource[u].resize(2);\nint idx = 0;\nfor (int r = 0; r < number_of_orthogonal_resources; ++r)\n{\n"
}
] |
C++
|
MIT License
|
aff3ct/aff3ct
|
Cosmetics and fix user_to_resource and resource_to_user fixed dimensions.
|
8,483 |
07.11.2018 15:59:28
| -3,600 |
6afe1dd2d97a61684df91c666e54dbea6706408f
|
Set inter frame F by default to the SCMA number of users according to the codebook.
|
[
{
"change_type": "MODIFY",
"old_path": "src/Factory/Module/Modem/Modem.cpp",
"new_path": "src/Factory/Module/Modem/Modem.cpp",
"diff": "@@ -149,6 +149,7 @@ void Modem::parameters\nif(vals.exist({p+\"-type\" })) this->type = vals.at({p+\"-type\" });\nif(vals.exist({p+\"-implem\" })) this->implem = vals.at({p+\"-implem\" });\nif(vals.exist({p+\"-cpm-std\" })) this->cpm_std = vals.at({p+\"-cpm-std\" });\n+ if(vals.exist({p+\"-codebook\"})) this->codebook = vals.at({p+\"-codebook\"});\nif (this->type == \"CPM\")\n{\n@@ -173,12 +174,19 @@ void Modem::parameters\n}\n}\n+\n+ if (this->type == \"SCMA\")\n+ {\n+ this->bps = 3; // set by default the number of bits per symbol to 3 when SCMA mod\n+ this->n_frames = tools::Codebook<float>(this->codebook).get_number_of_users();\n+ }\n+\n+\nif(vals.exist({p+\"-fra-size\", \"N\"})) this->N = vals.to_int({p+\"-fra-size\", \"N\"});\nif(vals.exist({p+\"-fra\", \"F\"})) this->n_frames = vals.to_int({p+\"-fra\", \"F\"});\nif(vals.exist({p+\"-bps\" })) this->bps = vals.to_int({p+\"-bps\" });\nif(vals.exist({p+\"-ups\" })) this->upf = vals.to_int({p+\"-ups\" });\nif(vals.exist({p+\"-const-path\" })) this->const_path = vals.at ({p+\"-const-path\" });\n- if(vals.exist({p+\"-codebook\" })) this->codebook = vals.at ({p+\"-codebook\" });\nif(vals.exist({p+\"-cpm-L\" })) this->cpm_L = vals.to_int({p+\"-cpm-L\" });\nif(vals.exist({p+\"-cpm-p\" })) this->cpm_p = vals.to_int({p+\"-cpm-p\" });\nif(vals.exist({p+\"-cpm-k\" })) this->cpm_k = vals.to_int({p+\"-cpm-k\" });\n@@ -188,9 +196,8 @@ void Modem::parameters\n// force the number of bits per symbol to 1 when BPSK mod\nif (this->type == \"BPSK\" || this->type == \"OOK\")\nthis->bps = 1;\n- // force the number of bits per symbol to 3 when SCMA mod\n- if (this->type == \"SCMA\")\n- this->bps = 3;\n+\n+\nthis->complex = is_complex_mod(this->type, this->bps);\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Launcher/Simulation/BFER_std.cpp",
"new_path": "src/Launcher/Simulation/BFER_std.cpp",
"diff": "@@ -174,6 +174,10 @@ void BFER_std<B,R,Q>\nparams.cdc->enc->seed = params.local_seed;\n+\n+ if (!this->arg_vals.exist({psrc+\"-fra\", \"F\"}) && params.mdm->type == \"SCMA\")\n+ params.src->n_frames = params.mdm->n_frames;\n+\nparams.crc ->n_frames = params.src->n_frames;\nparams.mdm ->n_frames = params.src->n_frames;\nparams.chn ->n_frames = params.src->n_frames;\n"
}
] |
C++
|
MIT License
|
aff3ct/aff3ct
|
Set inter frame F by default to the SCMA number of users according to the codebook.
|
8,483 |
07.11.2018 18:22:36
| -3,600 |
f0568d30f2924d2e1c52a0643f71c420cb8d1fdc
|
Compute in Codebook the number of users per resources and vice versa
|
[
{
"change_type": "MODIFY",
"old_path": "conf",
"new_path": "conf",
"diff": "-Subproject commit b53be8355eeff5abc8e528c52a1d6ead685d1f74\n+Subproject commit 94af1080719a0b616d00ea2a1694f5d0526d08a4\n"
},
{
"change_type": "MODIFY",
"old_path": "refs",
"new_path": "refs",
"diff": "-Subproject commit 94af1080719a0b616d00ea2a1694f5d0526d08a4\n+Subproject commit a99b415683b105215c1395cc6d2f73fbac767950\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Tools/Code/SCMA/Codebook.hpp",
"new_path": "src/Tools/Code/SCMA/Codebook.hpp",
"diff": "@@ -10,7 +10,7 @@ namespace aff3ct\nnamespace tools\n{\n-template <typename R>\n+template <typename R = float>\nclass Codebook\n{\npublic:\n@@ -20,14 +20,18 @@ public:\nconst std::complex<R>& operator() (int u, int o, int c) const;\nint get_number_of_users() const;\n+ int get_number_of_resources_per_user() const;\n+ int get_number_of_users_per_resource() const;\nint get_number_of_orthogonal_resources() const;\nint get_codebook_size() const;\n- int get_resource_to_user(int r, int u) const;\n- int get_user_to_resource(int u, int r) const;\n+ int get_resource_to_user(int r, int idx) const;\n+ int get_user_to_resource(int u, int idx) const;\nprivate:\nint number_of_users;\nint number_of_orthogonal_resources;\n+ int number_of_resources_per_user;\n+ int number_of_users_per_resource;\nint codebook_size;\nstd::vector<std::vector<std::vector<std::complex<R>>>> data;\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Tools/Code/SCMA/Codebook.hxx",
"new_path": "src/Tools/Code/SCMA/Codebook.hxx",
"diff": "@@ -80,32 +80,74 @@ void Codebook<R>\n}\n}\n- // Factor graph calculation TODO: Now constants and fixed size (-> dynamic allocation later)\n- int F[number_of_orthogonal_resources][number_of_users];\n+ // Factor graph calculation\n+ std::vector<std::vector<bool>> F(number_of_orthogonal_resources, std::vector<bool>(number_of_users, false));\n- for (int u = 0; u < number_of_users; ++u)\n- {\nfor (int r = 0; r < number_of_orthogonal_resources; ++r)\n+ {\n+ F[r].resize(number_of_users, false);\n+ for (int u = 0; u < number_of_users; ++u)\n{\nfor (int c = 0; c < codebook_size; ++c)\n{\nif ((data[u][r][c].real() != (R)0.0) || (data[u][r][c].imag() != (R)0.0))\n{\n- F[r][u] = 1;\n+ F[r][u] = true;\nbreak;\n}\n}\n}\n}\n- resource_to_user.resize(4);\n+\n+ int number_of_resources_per_user = 0; // number of resources per user\n+ int number_of_users_per_resource = 0; // number of users per resource\n+\n+ for (int r = 0; r < number_of_orthogonal_resources; ++r)\n+ {\n+ int n = 0; // number of users on this resource\n+ for (int u = 0; u < number_of_users; ++u)\n+ if (F[r][u])\n+ n++;\n+\n+ if (r == 0)\n+ number_of_users_per_resource = n;\n+\n+ else if (number_of_users_per_resource != n)\n+ {\n+ std::stringstream message;\n+ message << \"All resources do not have the same number of users (the first one have \" << number_of_users_per_resource << \" of them).\";\n+ throw tools::invalid_argument(__FILE__, __LINE__, __func__, message.str());\n+ }\n+ }\n+\n+ for (int u = 0; u < number_of_users; ++u)\n+ {\n+ int n = 0; // number of resources used by this user\n+ for (int r = 0; r < number_of_orthogonal_resources; ++r)\n+ if (F[r][u])\n+ n++;\n+\n+ if (u == 0)\n+ number_of_resources_per_user = n;\n+\n+ else if (number_of_resources_per_user != n)\n+ {\n+ std::stringstream message;\n+ message << \"All users do not use the same number of resources (the first one use \" << number_of_resources_per_user << \" of them).\";\n+ throw tools::invalid_argument(__FILE__, __LINE__, __func__, message.str());\n+ }\n+ }\n+\n+\n+ resource_to_user.resize(number_of_orthogonal_resources);\nfor (int r = 0; r < number_of_orthogonal_resources; ++r)\n{\n- resource_to_user[r].resize(3);\n+ resource_to_user[r].resize(number_of_users_per_resource);\nint idx = 0;\nfor (int u = 0; u < number_of_users; ++u)\n{\n- if (F[r][u] == 1)\n+ if (F[r][u])\n{\nresource_to_user[r][idx] = u;\nidx++;\n@@ -113,14 +155,14 @@ void Codebook<R>\n}\n}\n- user_to_resource.resize(6);\n+ user_to_resource.resize(number_of_users);\nfor (int u = 0; u < number_of_users; ++u)\n{\n- user_to_resource[u].resize(2);\n+ user_to_resource[u].resize(number_of_resources_per_user);\nint idx = 0;\nfor (int r = 0; r < number_of_orthogonal_resources; ++r)\n{\n- if (F[r][u] == 1)\n+ if (F[r][u])\n{\nuser_to_resource[u][idx] = r;\nidx++;\n@@ -145,6 +187,19 @@ inline int Codebook<R>\nreturn number_of_users;\n}\n+template <typename R>\n+inline int Codebook<R>\n+::get_number_of_resources_per_user() const\n+{\n+ return number_of_resources_per_user;\n+}\n+template <typename R>\n+inline int Codebook<R>\n+::get_number_of_users_per_resource() const\n+{\n+ return number_of_users_per_resource;\n+}\n+\ntemplate <typename R>\ninline int Codebook<R>\n::get_number_of_orthogonal_resources() const\n"
}
] |
C++
|
MIT License
|
aff3ct/aff3ct
|
Compute in Codebook the number of users per resources and vice versa
|
8,483 |
07.11.2018 18:46:43
| -3,600 |
e4f7110bc030c087b06a5831e28335560c2bef72
|
Added Vector 2->4D classes upon one dimensional vector; Use Vecotr_4D in modem_SCMA
|
[
{
"change_type": "MODIFY",
"old_path": "src/Module/Modem/SCMA/Modem_SCMA.hpp",
"new_path": "src/Module/Modem/SCMA/Modem_SCMA.hpp",
"diff": "#include \"Tools/Code/SCMA/modem_SCMA_functions.hpp\"\n#include \"Tools/Code/SCMA/Codebook.hpp\"\n+#include \"Tools/Algo/Multidimensional_vector/Vector_4D.hpp\"\n#include \"../Modem.hpp\"\n@@ -20,7 +21,7 @@ class Modem_SCMA : public Modem<B,R,Q>\n{\nprivate:\nconst tools::Codebook<R> CB;\n- Q arr_phi[4][4][4][4] = {}; // probability functions\n+ tools::Vector_4D<Q> arr_phi;\nconst bool disable_sig2;\nR n0; // 1 / n0 = 179.856115108\nconst int n_ite;\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Module/Modem/SCMA/Modem_SCMA.hxx",
"new_path": "src/Module/Modem/SCMA/Modem_SCMA.hxx",
"diff": "@@ -62,6 +62,7 @@ Modem_SCMA<B,R,Q,PSI>\nnoise,\nn_frames),\nCB (codebook_path),\n+ arr_phi (CB.get_codebook_size(), CB.get_codebook_size(), CB.get_codebook_size(), CB.get_codebook_size(), (Q)0),\ndisable_sig2(disable_sig2 ),\nn_ite (n_ite ),\nbps (bps )\n@@ -178,7 +179,7 @@ void Modem_SCMA<B,R,Q,PSI>\nfor (auto j = 0; j < CB.get_codebook_size(); j++)\nfor (auto k = 0; k < CB.get_codebook_size(); k++)\nfor (auto re = 0; re < CB.get_number_of_orthogonal_resources(); re++)\n- arr_phi[re][i][j][k] = phi(Y_N1, i, j, k, re, batch, H_N);\n+ arr_phi(re,i,j,k) = phi(Y_N1, i, j, k, re, batch, H_N);\ndemodulate_batch(Y_N1,Y_N2,batch);\n}\n@@ -211,7 +212,7 @@ void Modem_SCMA<B,R,Q,PSI>\nfor (auto j = 0; j < CB.get_codebook_size(); j++)\nfor (auto k = 0; k < CB.get_codebook_size(); k++)\nfor (auto re = 0; re < CB.get_number_of_orthogonal_resources(); re++)\n- arr_phi[re][i][j][k] = phi(Y_N1, i, j, k, re, batch);\n+ arr_phi(re,i,j,k) = phi(Y_N1, i, j, k, re, batch);\ndemodulate_batch(Y_N1,Y_N2,batch);\n}\n@@ -279,15 +280,15 @@ void Modem_SCMA<B,R,Q,PSI>\nfor(auto re = 0; re < CB.get_number_of_orthogonal_resources(); re++)\n{\nmsg_res_user[re][CB.get_resource_to_user(re,0)][i] = msg_res_user[re][CB.get_resource_to_user(re,0)][i]\n- + arr_phi[re][i][j][k]\n+ + arr_phi(re,i,j,k)\n* msg_user_to_resources[CB.get_resource_to_user(re,1)][re][j]\n* msg_user_to_resources[CB.get_resource_to_user(re,2)][re][k];\nmsg_res_user[re][CB.get_resource_to_user(re,1)][i] = msg_res_user[re][CB.get_resource_to_user(re,1)][i]\n- + arr_phi[re][j][i][k]\n+ + arr_phi(re,j,i,k)\n* msg_user_to_resources[CB.get_resource_to_user(re,0)][re][j]\n* msg_user_to_resources[CB.get_resource_to_user(re,2)][re][k];\nmsg_res_user[re][CB.get_resource_to_user(re,2)][i] = msg_res_user[re][CB.get_resource_to_user(re,2)][i]\n- + arr_phi[re][j][k][i]\n+ + arr_phi(re,j,k,i)\n* msg_user_to_resources[CB.get_resource_to_user(re,0)][re][j]\n* msg_user_to_resources[CB.get_resource_to_user(re,1)][re][k];\n}\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "src/Tools/Algo/Multidimensional_vector/Vector_2D.hpp",
"diff": "+#ifndef VECTOR_2D_HPP_\n+#define VECTOR_2D_HPP_\n+\n+#include <vector>\n+\n+namespace aff3ct\n+{\n+namespace tools\n+{\n+\n+template <typename T>\n+class Vector_2D\n+{\n+public:\n+ explicit Vector_2D(size_t d1=0, size_t d2=0, T const & t=T()) :\n+ d1(d1), d2(d2), data(d1*d2, t)\n+ {}\n+\n+ T & operator()(size_t i, size_t j)\n+ {\n+ return data[i*d2 + j];\n+ }\n+\n+ T const & operator()(size_t i, size_t j) const\n+ {\n+ return data[i*d2 + j];\n+ }\n+\n+private:\n+ const size_t d1, d2;\n+ std::vector<T> data;\n+};\n+\n+}\n+}\n+\n+#endif // VECTOR_2D_HPP_\n\\ No newline at end of file\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "src/Tools/Algo/Multidimensional_vector/Vector_3D.hpp",
"diff": "+#ifndef VECTOR_3D_HPP_\n+#define VECTOR_3D_HPP_\n+\n+#include <vector>\n+\n+namespace aff3ct\n+{\n+namespace tools\n+{\n+\n+template <typename T>\n+class Vector_3D\n+{\n+public:\n+ explicit Vector_3D(size_t d1=0, size_t d2=0, size_t d3=0, T const & t=T()) :\n+ d1(d1), d2(d2), d3(d3), d23(d2*d3), data(d1*d23, t)\n+ {}\n+\n+ T & operator()(size_t i, size_t j, size_t k)\n+ {\n+ return data[i*d23 + j*d3 + k];\n+ }\n+\n+ T const & operator()(size_t i, size_t j, size_t k) const\n+ {\n+ return data[i*d23 + j*d3 + k];\n+ }\n+\n+private:\n+ const size_t d1, d2, d3;\n+ const size_t d23;\n+ std::vector<T> data;\n+};\n+\n+}\n+}\n+\n+#endif // VECTOR_3D_HPP_\n\\ No newline at end of file\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "src/Tools/Algo/Multidimensional_vector/Vector_4D.hpp",
"diff": "+#ifndef VECTOR_4D_HPP_\n+#define VECTOR_4D_HPP_\n+\n+#include <vector>\n+\n+namespace aff3ct\n+{\n+namespace tools\n+{\n+\n+template <typename T>\n+class Vector_4D\n+{\n+public:\n+ explicit Vector_4D(size_t d1=0, size_t d2=0, size_t d3=0, size_t d4=0, T const & t=T()) :\n+ d1(d1), d2(d2), d3(d3), d4(d4), d34(d3*d4), d234(d2*d34), data(d1*d234, t)\n+ {}\n+\n+ T & operator()(size_t i, size_t j, size_t k, size_t l)\n+ {\n+ return data[i*d234 + j*d34 + k*d4 + l];\n+ }\n+\n+ T const & operator()(size_t i, size_t j, size_t k, size_t l) const\n+ {\n+ return data[i*d234 + j*d34 + k*d4 + l];\n+ }\n+\n+private:\n+ const size_t d1, d2, d3, d4;\n+ const size_t d34, d234;\n+ std::vector<T> data;\n+};\n+\n+}\n+}\n+\n+#endif // VECTOR_4D_HPP_\n\\ No newline at end of file\n"
}
] |
C++
|
MIT License
|
aff3ct/aff3ct
|
Added Vector 2->4D classes upon one dimensional vector; Use Vecotr_4D in modem_SCMA
|
8,490 |
08.11.2018 00:44:00
| -3,600 |
ccc8bda8a09dae4b76d272cfa99ecf88d0fba9ed
|
Doc: add screenshots for Windows.
|
[
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/simulator/compilation/compilation.rst",
"new_path": "doc/sphinx/source/simulator/compilation/compilation.rst",
"diff": "@@ -30,6 +30,8 @@ installation is over.\n.. warning:: It is recommended to add CMake to your system PATH during the\ninstallation.\n+.. image:: images/cmake_path.png\n+ :align: center\nLinux\n^^^^^\n@@ -161,9 +163,22 @@ Compilation with a Visual Studio 2017 Solution\n----------------------------------------------\nSince Microsoft Visual Studio 2017, Visual natively supports CMake.\n-To generate the AFF3CT solution, open the ``$AFF3CT_ROOT/CMakeList.txt`` file\n-from the IDE. Select the `Release` target instead of the `Debug` target and\n-press the `green play` button to start the compilation.\n+To generate the AFF3CT solution, open the ``$AFF3CT_ROOT`` folder from the IDE.\n+\n+.. image:: images/vs17_cmake.png\n+ :align: center\n+\n+Select the `Release` target and press the green play button ``aff3ct.exe`` to\n+start the compilation.\n+\n+.. image:: images/vs17_compile.png\n+ :align: center\n+\n+Once AFF3CT is compiled you can browse the build by right clicking on\n+``CMakeList.txt`` > ``Cache`` > ``Open Cache Foler``.\n+\n+.. image:: images/vs17_cache_folder.png\n+ :align: center\n.. note:: **Visual Studio** should not be confounded with\n**Visual Studio Code**.\n"
},
{
"change_type": "ADD",
"old_path": "doc/sphinx/source/simulator/compilation/images/cmake_path.png",
"new_path": "doc/sphinx/source/simulator/compilation/images/cmake_path.png",
"diff": "Binary files /dev/null and b/doc/sphinx/source/simulator/compilation/images/cmake_path.png differ\n"
},
{
"change_type": "ADD",
"old_path": "doc/sphinx/source/simulator/compilation/images/vs17_cache_folder.png",
"new_path": "doc/sphinx/source/simulator/compilation/images/vs17_cache_folder.png",
"diff": "Binary files /dev/null and b/doc/sphinx/source/simulator/compilation/images/vs17_cache_folder.png differ\n"
},
{
"change_type": "ADD",
"old_path": "doc/sphinx/source/simulator/compilation/images/vs17_cmake.png",
"new_path": "doc/sphinx/source/simulator/compilation/images/vs17_cmake.png",
"diff": "Binary files /dev/null and b/doc/sphinx/source/simulator/compilation/images/vs17_cmake.png differ\n"
},
{
"change_type": "ADD",
"old_path": "doc/sphinx/source/simulator/compilation/images/vs17_compile.png",
"new_path": "doc/sphinx/source/simulator/compilation/images/vs17_compile.png",
"diff": "Binary files /dev/null and b/doc/sphinx/source/simulator/compilation/images/vs17_compile.png differ\n"
},
{
"change_type": "ADD",
"old_path": "doc/sphinx/source/simulator/source_code/images/git_bash.png",
"new_path": "doc/sphinx/source/simulator/source_code/images/git_bash.png",
"diff": "Binary files /dev/null and b/doc/sphinx/source/simulator/source_code/images/git_bash.png differ\n"
},
{
"change_type": "ADD",
"old_path": "doc/sphinx/source/simulator/source_code/images/git_editor.png",
"new_path": "doc/sphinx/source/simulator/source_code/images/git_editor.png",
"diff": "Binary files /dev/null and b/doc/sphinx/source/simulator/source_code/images/git_editor.png differ\n"
},
{
"change_type": "ADD",
"old_path": "doc/sphinx/source/simulator/source_code/images/git_path.png",
"new_path": "doc/sphinx/source/simulator/source_code/images/git_path.png",
"diff": "Binary files /dev/null and b/doc/sphinx/source/simulator/source_code/images/git_path.png differ\n"
},
{
"change_type": "ADD",
"old_path": "doc/sphinx/source/simulator/source_code/images/git_symlink.png",
"new_path": "doc/sphinx/source/simulator/source_code/images/git_symlink.png",
"diff": "Binary files /dev/null and b/doc/sphinx/source/simulator/source_code/images/git_symlink.png differ\n"
},
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/simulator/source_code/source_code.rst",
"new_path": "doc/sphinx/source/simulator/source_code/source_code.rst",
"diff": "@@ -22,17 +22,24 @@ Download Git from `the official web page <https://git-scm.com/downloads>`_\nand launch the executable file. Just press the `Next` button until the\ninstallation is over.\n+.. warning:: On Windows, Git comes with the **Git Bash** terminal which is,\n+ to our mind, better suitable that the traditional **Windows\n+ Console**. We encourage you to use **Git Bash** instead of the\n+ **Windows Console** for the following steps.\n-.. note:: On Windows, during the installation you may want to check the **Linux\n- symbolic links** support.\n+.. image:: images/git_bash.png\n+ :align: center\n.. warning:: It is recommended to add Git to your system PATH during the\ninstallation.\n-.. warning:: On Windows, Git comes with the **Git Bash** terminal which is,\n- to our mind, better suitable that the traditional **Windows\n- Console**. We encourage you to use **Git Bash** instead of the\n- **Windows Console** for the following steps.\n+.. image:: images/git_path.png\n+ :align: center\n+\n+.. note:: On Windows, during the installation you may want to check the **Linux\n+ symbolic links** support.\n+.. image:: images/git_symlink.png\n+ :align: center\nLinux\n^^^^^\n"
}
] |
C++
|
MIT License
|
aff3ct/aff3ct
|
Doc: add screenshots for Windows.
|
8,483 |
08.11.2018 10:40:03
| -3,600 |
f79af12623170a3455eece93cf75788df596aaa4
|
Makes codec and usage toctrees deeper
|
[
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/simulator/usage/parameters/cdc.rst",
"new_path": "doc/sphinx/source/simulator/usage/parameters/cdc.rst",
"diff": "@@ -4,7 +4,7 @@ Codec parameters\n++++++++++++++++\n.. toctree::\n- :maxdepth: 1\n+ :maxdepth: 2\n:caption: Codec Contents\ncdc_bch/cdc\n"
},
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/simulator/usage/usage.rst",
"new_path": "doc/sphinx/source/simulator/usage/usage.rst",
"diff": "@@ -2,7 +2,7 @@ Usage\n=====\n.. toctree::\n- :maxdepth: 1\n+ :maxdepth: 2\n:caption: Usage Contents\noverview/overview\n"
}
] |
C++
|
MIT License
|
aff3ct/aff3ct
|
Makes codec and usage toctrees deeper
|
8,483 |
08.11.2018 10:40:37
| -3,600 |
3c2ca9a37f73e6f3e53889dc20aeacdb0a823ea7
|
Add notes on the two simulation arguments available only for BFERI simulations
|
[
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/simulator/usage/parameters/sim.rst",
"new_path": "doc/sphinx/source/simulator/usage/parameters/sim.rst",
"diff": "@@ -114,6 +114,10 @@ Enable the coset approach.\nIteration number to start the CRC checking in the turbo demodulation process.\n+.. note::\n+\n+ Available only for BFERI simulations\n+\n.. _sim-sim-debug:\n``--sim-debug``\n@@ -160,6 +164,10 @@ Set the precision of real elements when displayed in debug mode.\nNumber of global iterations between the demodulator and the decoder.\n+.. note::\n+\n+ Available only for BFERI simulations\n+\n.. _sim-sim-meta:\n``--sim-meta``\n"
}
] |
C++
|
MIT License
|
aff3ct/aff3ct
|
Add notes on the two simulation arguments available only for BFERI simulations
|
8,483 |
08.11.2018 10:53:36
| -3,600 |
8cdf9107a34d2d586610909cd670e24dbf228191
|
Add msg_user_to_resources msg_res_user guess as 3D or 2D vectors. Change consequently the access methods to them in the demodulator.
|
[
{
"change_type": "MODIFY",
"old_path": "src/Module/Modem/SCMA/Modem_SCMA.hpp",
"new_path": "src/Module/Modem/SCMA/Modem_SCMA.hpp",
"diff": "#include \"Tools/Code/SCMA/modem_SCMA_functions.hpp\"\n#include \"Tools/Code/SCMA/Codebook.hpp\"\n+#include \"Tools/Algo/Multidimensional_vector/Vector_2D.hpp\"\n+#include \"Tools/Algo/Multidimensional_vector/Vector_3D.hpp\"\n#include \"Tools/Algo/Multidimensional_vector/Vector_4D.hpp\"\n#include \"../Modem.hpp\"\n@@ -22,6 +24,9 @@ class Modem_SCMA : public Modem<B,R,Q>\nprivate:\nconst tools::Codebook<R> CB;\ntools::Vector_4D<Q> arr_phi;\n+ tools::Vector_3D<Q> msg_user_to_resources;\n+ tools::Vector_3D<Q> msg_res_user;\n+ tools::Vector_2D<Q> guess;\nconst bool disable_sig2;\nR n0; // 1 / n0 = 179.856115108\nconst int n_ite;\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Module/Modem/SCMA/Modem_SCMA.hxx",
"new_path": "src/Module/Modem/SCMA/Modem_SCMA.hxx",
"diff": "@@ -11,47 +11,6 @@ namespace aff3ct\n{\nnamespace module\n{\n-// template <typename B, typename R, typename Q, tools::proto_psi<Q> PSI>\n-// const std::complex<float> Modem_SCMA<B,R,Q,PSI>::CB[6][4][4] =\n-// {\n-// { // codebook1 (code layer 1)\n-// { { 0.0000f, 0.0000f }, { 0.0000f, 0.0000f }, { 0.0000f, 0.0000f }, { 0.0000f, 0.0000f } },\n-// { { -0.1815f, -0.1318f }, { -0.6351f, -0.4615f }, { 0.6351f, 0.4615f }, { 0.1815f, 0.1318f } },\n-// { { 0.0000f, 0.0000f }, { 0.0000f, 0.0000f }, { 0.0000f, 0.0000f }, { 0.0000f, 0.0000f } },\n-// { { 0.7851f, 0.0000f }, { -0.2243f, 0.0000f }, { 0.2243f, 0.0000f }, { -0.7851f, 0.0000f } }\n-// },\n-// { // codebook2 (code layer 2)\n-// { { 0.7851f, 0.0000f }, { -0.2243f, 0.0000f }, { 0.2243f, 0.0000f }, { -0.7851f, 0.0000f } },\n-// { { 0.0000f, 0.0000f }, { 0.0000f, 0.0000f }, { 0.0000f, 0.0000f }, { 0.0000f, 0.0000f } },\n-// { { -0.1815f, -0.1318f }, { -0.6351f, -0.4615f }, { 0.6351f, 0.4615f }, { 0.1815f, 0.1318f } },\n-// { { 0.0000f, 0.0000f }, { 0.0000f, 0.0000f }, { 0.0000f, 0.0000f }, { 0.0000f, 0.0000f } }\n-// },\n-// { // codebook3 (code layer 3)\n-// { { -0.6351f, 0.4615f }, { 0.1815f, -0.1318f }, { -0.1815f, 0.1318f }, { 0.6351f, -0.4615f } },\n-// { { 0.1392f, -0.1759f }, { 0.4873f, -0.6156f }, { -0.4873f, 0.6156f }, { -0.1392f, 0.1759f } },\n-// { { 0.0000f, 0.0000f }, { 0.0000f, 0.0000f }, { 0.0000f, 0.0000f }, { 0.0000f, 0.0000f } },\n-// { { 0.0000f, 0.0000f }, { 0.0000f, 0.0000f }, { 0.0000f, 0.0000f }, { 0.0000f, 0.0000f } }\n-// },\n-// { // codebook4 (code layer 4)\n-// { { 0.0000f, 0.0000f }, { 0.0000f, 0.0000f }, { 0.0000f, 0.0000f }, { 0.0000f, 0.0000f } },\n-// { { 0.0000f, 0.0000f }, { 0.0000f, 0.0000f }, { 0.0000f, 0.0000f }, { 0.0000f, 0.0000f } },\n-// { { 0.7851f, 0.0000f }, { -0.2243f, 0.0000f }, { 0.2243f, 0.0000f }, { -0.7851f, 0.0000f } },\n-// { { -0.0055f, -0.2242f }, { -0.0193f, -0.7848f }, { 0.0193f, 0.7848f }, { 0.0055f, 0.2242f } }\n-// },\n-// { // codebook5 (code layer 5)\n-// { { -0.0055f, -0.2242f }, { -0.0193f, -0.7848f }, { 0.0193f, 0.7848f }, { 0.0055f, 0.2242f } },\n-// { { 0.0000f, 0.0000f }, { 0.0000f, 0.0000f }, { 0.0000f, 0.0000f }, { 0.0000f, 0.0000f } },\n-// { { 0.0000f, 0.0000f }, { 0.0000f, 0.0000f }, { 0.0000f, 0.0000f }, { 0.0000f, 0.0000f } },\n-// { { -0.6351f, 0.4615f }, { 0.1815f, -0.1318f }, { -0.1815f, 0.1318f }, { 0.6351f, -0.4615f } }\n-// },\n-// { // codebook6 (code layer 6)\n-// { { 0.0000f, 0.0000f }, { 0.0000f, 0.0000f }, { 0.0000f, 0.0000f }, { 0.0000f, 0.0000f } },\n-// { { 0.7851f, 0.0000f }, { -0.2243f, 0.0000f }, { 0.2243f, 0.0000f }, { -0.7851f, 0.0000f } },\n-// { { 0.1392f, -0.1759f }, { 0.4873f, -0.6156f }, { -0.4873f, 0.6156f }, { -0.1392f, 0.1759f } },\n-// { { 0.0000f, 0.0000f }, { 0.0000f, 0.0000f }, { 0.0000f, 0.0000f }, { 0.0000f, 0.0000f } }\n-// },\n-// };\n-\ntemplate <typename B, typename R, typename Q, tools::proto_psi<Q> PSI>\nModem_SCMA<B,R,Q,PSI>\n::Modem_SCMA(const int N, const std::string& codebook_path, const tools::Noise<R>& noise, const int bps,\n@@ -63,6 +22,9 @@ Modem_SCMA<B,R,Q,PSI>\nn_frames),\nCB (codebook_path),\narr_phi (CB.get_codebook_size(), CB.get_codebook_size(), CB.get_codebook_size(), CB.get_codebook_size(), (Q)0),\n+ msg_user_to_resources(CB.get_number_of_users(), CB.get_number_of_resources(), CB.get_codebook_size(), (Q)0),\n+ msg_res_user (CB.get_number_of_resources(), CB.get_number_of_users(), CB.get_codebook_size(), (Q)0),\n+ guess (CB.get_number_of_users(), CB.get_codebook_size(), (Q)0),\ndisable_sig2 (disable_sig2 ),\nn_ite (n_ite ),\nbps (bps )\n@@ -129,7 +91,7 @@ void Modem_SCMA<B,R,Q,PSI>\nfor (unsigned i = 0 ; i < 2 ; i++) // TODO: With what should \"2\" be replaced ?\nidx += (1 << i) * (unsigned)X_N1[f * this->N + 2 * j + i];\n- for (auto i = 0 ; i < CB.get_number_of_orthogonal_resources() ; i++)\n+ for (auto i = 0 ; i < CB.get_number_of_resources() ; i++)\n{\nX_N2[f * N_mod + 8 * j + 2 * i ] = CB(f, i, idx).real();\nX_N2[f * N_mod + 8 * j + 2 * i +1] = CB(f, i, idx).imag();\n@@ -143,7 +105,7 @@ void Modem_SCMA<B,R,Q,PSI>\n{\nunsigned idx = (unsigned)X_N1[f * this->N + this->N - 1];\n- for (auto i = 0 ; i < CB.get_number_of_orthogonal_resources() ; i++)\n+ for (auto i = 0 ; i < CB.get_number_of_resources() ; i++)\n{\nX_N2[f * N_mod + 8 * (this->N / 2) + 2 * i ] = CB(f, i, idx).real(); // TODO: With what should \"8\" be replaced ?\nX_N2[f * N_mod + 8 * (this->N / 2) + 2 * i +1] = CB(f, i, idx).imag(); // TODO: With what should \"2\" be replaced ?\n@@ -178,7 +140,7 @@ void Modem_SCMA<B,R,Q,PSI>\nfor (auto i = 0; i < CB.get_codebook_size(); i++)\nfor (auto j = 0; j < CB.get_codebook_size(); j++)\nfor (auto k = 0; k < CB.get_codebook_size(); k++)\n- for (auto re = 0; re < CB.get_number_of_orthogonal_resources(); re++)\n+ for (auto re = 0; re < CB.get_number_of_resources(); re++)\narr_phi(re,i,j,k) = phi(Y_N1, i, j, k, re, batch, H_N);\ndemodulate_batch(Y_N1,Y_N2,batch);\n@@ -211,7 +173,7 @@ void Modem_SCMA<B,R,Q,PSI>\nfor (auto i = 0; i < CB.get_codebook_size(); i++)\nfor (auto j = 0; j < CB.get_codebook_size(); j++)\nfor (auto k = 0; k < CB.get_codebook_size(); k++)\n- for (auto re = 0; re < CB.get_number_of_orthogonal_resources(); re++)\n+ for (auto re = 0; re < CB.get_number_of_resources(); re++)\narr_phi(re,i,j,k) = phi(Y_N1, i, j, k, re, batch);\ndemodulate_batch(Y_N1,Y_N2,batch);\n@@ -231,131 +193,106 @@ void Modem_SCMA<B,R,Q,PSI>\nif (!this->n->is_set())\nthrow tools::runtime_error(__FILE__, __LINE__, __func__, \"No noise has been set\");\n- // declarations\n- Q msg_user_to_resources[6][4][4] = {};\n- Q msg_res_user[4][6][4] = {};\n- Q guess[6][4] = {};\n-\n// initial probability of each codeword/user\n+ auto init_proba = (Q)1. / (Q)CB.get_codebook_size();\n+ for (auto u = 0; u < CB.get_number_of_users(); ++u)\n+ for (auto r = 0; r < CB.get_number_of_resources_per_user(); ++r)\nfor (auto i = 0; i < CB.get_codebook_size(); i++)\n- {\n- msg_user_to_resources[0][CB.get_user_to_resource(0,0)][i] = (Q)0.25;\n- msg_user_to_resources[0][CB.get_user_to_resource(0,1)][i] = (Q)0.25;\n- msg_user_to_resources[1][CB.get_user_to_resource(1,0)][i] = (Q)0.25;\n- msg_user_to_resources[1][CB.get_user_to_resource(1,1)][i] = (Q)0.25;\n- msg_user_to_resources[2][CB.get_user_to_resource(2,0)][i] = (Q)0.25;\n- msg_user_to_resources[2][CB.get_user_to_resource(2,1)][i] = (Q)0.25;\n- msg_user_to_resources[3][CB.get_user_to_resource(3,0)][i] = (Q)0.25;\n- msg_user_to_resources[3][CB.get_user_to_resource(3,1)][i] = (Q)0.25;\n- msg_user_to_resources[4][CB.get_user_to_resource(4,0)][i] = (Q)0.25;\n- msg_user_to_resources[4][CB.get_user_to_resource(4,1)][i] = (Q)0.25;\n- msg_user_to_resources[5][CB.get_user_to_resource(5,0)][i] = (Q)0.25;\n- msg_user_to_resources[5][CB.get_user_to_resource(5,1)][i] = (Q)0.25;\n- }\n+ msg_user_to_resources(u,CB.get_user_to_resource(u,r),i) = init_proba;\n// starting iteration\nfor (auto itrr = 0; itrr < n_ite; itrr++)\n{\n// resource to user messaging\n// initialization\n- for (auto i = 0; i < CB.get_number_of_orthogonal_resources(); i++)\n- {\n- msg_res_user[0][CB.get_resource_to_user(0,0)][i] = (Q)0;\n- msg_res_user[0][CB.get_resource_to_user(0,1)][i] = (Q)0;\n- msg_res_user[0][CB.get_resource_to_user(0,2)][i] = (Q)0;\n- msg_res_user[1][CB.get_resource_to_user(1,0)][i] = (Q)0;\n- msg_res_user[1][CB.get_resource_to_user(1,1)][i] = (Q)0;\n- msg_res_user[1][CB.get_resource_to_user(1,2)][i] = (Q)0;\n- msg_res_user[2][CB.get_resource_to_user(2,0)][i] = (Q)0;\n- msg_res_user[2][CB.get_resource_to_user(2,1)][i] = (Q)0;\n- msg_res_user[2][CB.get_resource_to_user(2,2)][i] = (Q)0;\n- msg_res_user[3][CB.get_resource_to_user(3,0)][i] = (Q)0;\n- msg_res_user[3][CB.get_resource_to_user(3,1)][i] = (Q)0;\n- msg_res_user[3][CB.get_resource_to_user(3,2)][i] = (Q)0;\n- }\n+ for (auto r = 0; r < CB.get_number_of_resources(); ++r)\n+ for (auto u = 0; u < CB.get_number_of_users_per_resource(); ++u)\n+ for (auto i = 0; i < CB.get_codebook_size(); i++)\n+ msg_res_user(r,CB.get_resource_to_user(r,u),i) = (Q)0;\n+\nfor (auto i = 0; i < CB.get_codebook_size(); i++) // codeword index\nfor (auto j = 0; j < CB.get_codebook_size(); j++)\nfor (auto k = 0; k < CB.get_codebook_size(); k++)\n- for(auto re = 0; re < CB.get_number_of_orthogonal_resources(); re++)\n+ for (auto re = 0; re < CB.get_number_of_resources(); re++)\n{\n- msg_res_user[re][CB.get_resource_to_user(re,0)][i] = msg_res_user[re][CB.get_resource_to_user(re,0)][i]\n+ msg_res_user(re,CB.get_resource_to_user(re,0),i) = msg_res_user(re,CB.get_resource_to_user(re,0),i)\n+ arr_phi(re,i,j,k)\n- * msg_user_to_resources[CB.get_resource_to_user(re,1)][re][j]\n- * msg_user_to_resources[CB.get_resource_to_user(re,2)][re][k];\n- msg_res_user[re][CB.get_resource_to_user(re,1)][i] = msg_res_user[re][CB.get_resource_to_user(re,1)][i]\n+ * msg_user_to_resources(CB.get_resource_to_user(re,1),re,j)\n+ * msg_user_to_resources(CB.get_resource_to_user(re,2),re,k);\n+ msg_res_user(re,CB.get_resource_to_user(re,1),i) = msg_res_user(re,CB.get_resource_to_user(re,1),i)\n+ arr_phi(re,j,i,k)\n- * msg_user_to_resources[CB.get_resource_to_user(re,0)][re][j]\n- * msg_user_to_resources[CB.get_resource_to_user(re,2)][re][k];\n- msg_res_user[re][CB.get_resource_to_user(re,2)][i] = msg_res_user[re][CB.get_resource_to_user(re,2)][i]\n+ * msg_user_to_resources(CB.get_resource_to_user(re,0),re,j)\n+ * msg_user_to_resources(CB.get_resource_to_user(re,2),re,k);\n+ msg_res_user(re,CB.get_resource_to_user(re,2),i) = msg_res_user(re,CB.get_resource_to_user(re,2),i)\n+ arr_phi(re,j,k,i)\n- * msg_user_to_resources[CB.get_resource_to_user(re,0)][re][j]\n- * msg_user_to_resources[CB.get_resource_to_user(re,1)][re][k];\n+ * msg_user_to_resources(CB.get_resource_to_user(re,0),re,j)\n+ * msg_user_to_resources(CB.get_resource_to_user(re,1),re,k);\n}\n// user to resource messaging\n- for (auto i = 0; i < CB.get_number_of_orthogonal_resources(); i++)\n- {\n- msg_user_to_resources[0][CB.get_user_to_resource(0,0)][i] = msg_res_user[CB.get_user_to_resource(0,1)][0][i] /\n- (msg_res_user[CB.get_user_to_resource(0,1)][0][0] +\n- msg_res_user[CB.get_user_to_resource(0,1)][0][1] +\n- msg_res_user[CB.get_user_to_resource(0,1)][0][2] +\n- msg_res_user[CB.get_user_to_resource(0,1)][0][3]);\n- msg_user_to_resources[0][CB.get_user_to_resource(0,1)][i] = msg_res_user[CB.get_user_to_resource(0,0)][0][i] /\n- (msg_res_user[CB.get_user_to_resource(0,0)][0][0] +\n- msg_res_user[CB.get_user_to_resource(0,0)][0][1] +\n- msg_res_user[CB.get_user_to_resource(0,0)][0][2] +\n- msg_res_user[CB.get_user_to_resource(0,0)][0][3]);\n- msg_user_to_resources[1][CB.get_user_to_resource(1,0)][i] = msg_res_user[CB.get_user_to_resource(1,1)][1][i] /\n- (msg_res_user[CB.get_user_to_resource(1,1)][1][0] +\n- msg_res_user[CB.get_user_to_resource(1,1)][1][1] +\n- msg_res_user[CB.get_user_to_resource(1,1)][1][2] +\n- msg_res_user[CB.get_user_to_resource(1,1)][1][3]);\n- msg_user_to_resources[1][CB.get_user_to_resource(1,1)][i] = msg_res_user[CB.get_user_to_resource(1,0)][1][i] /\n- (msg_res_user[CB.get_user_to_resource(1,0)][1][0] +\n- msg_res_user[CB.get_user_to_resource(1,0)][1][1] +\n- msg_res_user[CB.get_user_to_resource(1,0)][1][2] +\n- msg_res_user[CB.get_user_to_resource(1,0)][1][3]);\n- msg_user_to_resources[2][CB.get_user_to_resource(2,0)][i] = msg_res_user[CB.get_user_to_resource(2,1)][2][i] /\n- (msg_res_user[CB.get_user_to_resource(2,1)][2][0] +\n- msg_res_user[CB.get_user_to_resource(2,1)][2][1] +\n- msg_res_user[CB.get_user_to_resource(2,1)][2][2] +\n- msg_res_user[CB.get_user_to_resource(2,1)][2][3]);\n- msg_user_to_resources[2][CB.get_user_to_resource(2,1)][i] = msg_res_user[CB.get_user_to_resource(2,0)][2][i] /\n- (msg_res_user[CB.get_user_to_resource(2,0)][2][0] +\n- msg_res_user[CB.get_user_to_resource(2,0)][2][1] +\n- msg_res_user[CB.get_user_to_resource(2,0)][2][2] +\n- msg_res_user[CB.get_user_to_resource(2,0)][2][3]);\n- msg_user_to_resources[3][CB.get_user_to_resource(3,0)][i] = msg_res_user[CB.get_user_to_resource(3,1)][3][i] /\n- (msg_res_user[CB.get_user_to_resource(3,1)][3][0] +\n- msg_res_user[CB.get_user_to_resource(3,1)][3][1] +\n- msg_res_user[CB.get_user_to_resource(3,1)][3][2] +\n- msg_res_user[CB.get_user_to_resource(3,1)][3][3]);\n- msg_user_to_resources[3][CB.get_user_to_resource(3,1)][i] = msg_res_user[CB.get_user_to_resource(3,0)][3][i] /\n- (msg_res_user[CB.get_user_to_resource(3,0)][3][0] +\n- msg_res_user[CB.get_user_to_resource(3,0)][3][1] +\n- msg_res_user[CB.get_user_to_resource(3,0)][3][2] +\n- msg_res_user[CB.get_user_to_resource(3,0)][3][3]);\n- msg_user_to_resources[4][CB.get_user_to_resource(4,0)][i] = msg_res_user[CB.get_user_to_resource(4,1)][4][i] /\n- (msg_res_user[CB.get_user_to_resource(4,1)][4][0] +\n- msg_res_user[CB.get_user_to_resource(4,1)][4][1] +\n- msg_res_user[CB.get_user_to_resource(4,1)][4][2] +\n- msg_res_user[CB.get_user_to_resource(4,1)][4][3]);\n- msg_user_to_resources[4][CB.get_user_to_resource(4,1)][i] = msg_res_user[CB.get_user_to_resource(4,0)][4][i] /\n- (msg_res_user[CB.get_user_to_resource(4,0)][4][0] +\n- msg_res_user[CB.get_user_to_resource(4,0)][4][1] +\n- msg_res_user[CB.get_user_to_resource(4,0)][4][2] +\n- msg_res_user[CB.get_user_to_resource(4,0)][4][3]);\n- msg_user_to_resources[5][CB.get_user_to_resource(5,0)][i] = msg_res_user[CB.get_user_to_resource(5,1)][5][i] /\n- (msg_res_user[CB.get_user_to_resource(5,1)][5][0] +\n- msg_res_user[CB.get_user_to_resource(5,1)][5][1] +\n- msg_res_user[CB.get_user_to_resource(5,1)][5][2] +\n- msg_res_user[CB.get_user_to_resource(5,1)][5][3]);\n- msg_user_to_resources[5][CB.get_user_to_resource(5,1)][i] = msg_res_user[CB.get_user_to_resource(5,0)][5][i] /\n- (msg_res_user[CB.get_user_to_resource(5,0)][5][0] +\n- msg_res_user[CB.get_user_to_resource(5,0)][5][1] +\n- msg_res_user[CB.get_user_to_resource(5,0)][5][2] +\n- msg_res_user[CB.get_user_to_resource(5,0)][5][3]);\n+ for (auto i = 0; i < CB.get_number_of_resources(); i++)\n+ {\n+ msg_user_to_resources(0,CB.get_user_to_resource(0,0),i) = msg_res_user(CB.get_user_to_resource(0,1),0,i) /\n+ (msg_res_user(CB.get_user_to_resource(0,1),0,0) +\n+ msg_res_user(CB.get_user_to_resource(0,1),0,1) +\n+ msg_res_user(CB.get_user_to_resource(0,1),0,2) +\n+ msg_res_user(CB.get_user_to_resource(0,1),0,3));\n+ msg_user_to_resources(0,CB.get_user_to_resource(0,1),i) = msg_res_user(CB.get_user_to_resource(0,0),0,i) /\n+ (msg_res_user(CB.get_user_to_resource(0,0),0,0) +\n+ msg_res_user(CB.get_user_to_resource(0,0),0,1) +\n+ msg_res_user(CB.get_user_to_resource(0,0),0,2) +\n+ msg_res_user(CB.get_user_to_resource(0,0),0,3));\n+ msg_user_to_resources(1,CB.get_user_to_resource(1,0),i) = msg_res_user(CB.get_user_to_resource(1,1),1,i) /\n+ (msg_res_user(CB.get_user_to_resource(1,1),1,0) +\n+ msg_res_user(CB.get_user_to_resource(1,1),1,1) +\n+ msg_res_user(CB.get_user_to_resource(1,1),1,2) +\n+ msg_res_user(CB.get_user_to_resource(1,1),1,3));\n+ msg_user_to_resources(1,CB.get_user_to_resource(1,1),i) = msg_res_user(CB.get_user_to_resource(1,0),1,i) /\n+ (msg_res_user(CB.get_user_to_resource(1,0),1,0) +\n+ msg_res_user(CB.get_user_to_resource(1,0),1,1) +\n+ msg_res_user(CB.get_user_to_resource(1,0),1,2) +\n+ msg_res_user(CB.get_user_to_resource(1,0),1,3));\n+ msg_user_to_resources(2,CB.get_user_to_resource(2,0),i) = msg_res_user(CB.get_user_to_resource(2,1),2,i) /\n+ (msg_res_user(CB.get_user_to_resource(2,1),2,0) +\n+ msg_res_user(CB.get_user_to_resource(2,1),2,1) +\n+ msg_res_user(CB.get_user_to_resource(2,1),2,2) +\n+ msg_res_user(CB.get_user_to_resource(2,1),2,3));\n+ msg_user_to_resources(2,CB.get_user_to_resource(2,1),i) = msg_res_user(CB.get_user_to_resource(2,0),2,i) /\n+ (msg_res_user(CB.get_user_to_resource(2,0),2,0) +\n+ msg_res_user(CB.get_user_to_resource(2,0),2,1) +\n+ msg_res_user(CB.get_user_to_resource(2,0),2,2) +\n+ msg_res_user(CB.get_user_to_resource(2,0),2,3));\n+ msg_user_to_resources(3,CB.get_user_to_resource(3,0),i) = msg_res_user(CB.get_user_to_resource(3,1),3,i) /\n+ (msg_res_user(CB.get_user_to_resource(3,1),3,0) +\n+ msg_res_user(CB.get_user_to_resource(3,1),3,1) +\n+ msg_res_user(CB.get_user_to_resource(3,1),3,2) +\n+ msg_res_user(CB.get_user_to_resource(3,1),3,3));\n+ msg_user_to_resources(3,CB.get_user_to_resource(3,1),i) = msg_res_user(CB.get_user_to_resource(3,0),3,i) /\n+ (msg_res_user(CB.get_user_to_resource(3,0),3,0) +\n+ msg_res_user(CB.get_user_to_resource(3,0),3,1) +\n+ msg_res_user(CB.get_user_to_resource(3,0),3,2) +\n+ msg_res_user(CB.get_user_to_resource(3,0),3,3));\n+ msg_user_to_resources(4,CB.get_user_to_resource(4,0),i) = msg_res_user(CB.get_user_to_resource(4,1),4,i) /\n+ (msg_res_user(CB.get_user_to_resource(4,1),4,0) +\n+ msg_res_user(CB.get_user_to_resource(4,1),4,1) +\n+ msg_res_user(CB.get_user_to_resource(4,1),4,2) +\n+ msg_res_user(CB.get_user_to_resource(4,1),4,3));\n+ msg_user_to_resources(4,CB.get_user_to_resource(4,1),i) = msg_res_user(CB.get_user_to_resource(4,0),4,i) /\n+ (msg_res_user(CB.get_user_to_resource(4,0),4,0) +\n+ msg_res_user(CB.get_user_to_resource(4,0),4,1) +\n+ msg_res_user(CB.get_user_to_resource(4,0),4,2) +\n+ msg_res_user(CB.get_user_to_resource(4,0),4,3));\n+ msg_user_to_resources(5,CB.get_user_to_resource(5,0),i) = msg_res_user(CB.get_user_to_resource(5,1),5,i) /\n+ (msg_res_user(CB.get_user_to_resource(5,1),5,0) +\n+ msg_res_user(CB.get_user_to_resource(5,1),5,1) +\n+ msg_res_user(CB.get_user_to_resource(5,1),5,2) +\n+ msg_res_user(CB.get_user_to_resource(5,1),5,3));\n+ msg_user_to_resources(5,CB.get_user_to_resource(5,1),i) = msg_res_user(CB.get_user_to_resource(5,0),5,i) /\n+ (msg_res_user(CB.get_user_to_resource(5,0),5,0) +\n+ msg_res_user(CB.get_user_to_resource(5,0),5,1) +\n+ msg_res_user(CB.get_user_to_resource(5,0),5,2) +\n+ msg_res_user(CB.get_user_to_resource(5,0),5,3));\n}\n}\n// end of iterations\n@@ -363,30 +300,30 @@ void Modem_SCMA<B,R,Q,PSI>\n// guess at each user\nfor (auto i = 0; i < CB.get_codebook_size(); i++) //codeword index\n{\n- guess[0][i] = msg_res_user[CB.get_user_to_resource(0,0)][0][i] * msg_res_user[CB.get_user_to_resource(0,1)][0][i];\n- guess[1][i] = msg_res_user[CB.get_user_to_resource(1,0)][1][i] * msg_res_user[CB.get_user_to_resource(1,1)][1][i];\n- guess[2][i] = msg_res_user[CB.get_user_to_resource(2,0)][2][i] * msg_res_user[CB.get_user_to_resource(2,1)][2][i];\n- guess[3][i] = msg_res_user[CB.get_user_to_resource(3,0)][3][i] * msg_res_user[CB.get_user_to_resource(3,1)][3][i];\n- guess[4][i] = msg_res_user[CB.get_user_to_resource(4,0)][4][i] * msg_res_user[CB.get_user_to_resource(4,1)][4][i];\n- guess[5][i] = msg_res_user[CB.get_user_to_resource(5,0)][5][i] * msg_res_user[CB.get_user_to_resource(5,1)][5][i];\n+ guess(0,i) = msg_res_user(CB.get_user_to_resource(0,0),0,i) * msg_res_user(CB.get_user_to_resource(0,1),0,i);\n+ guess(1,i) = msg_res_user(CB.get_user_to_resource(1,0),1,i) * msg_res_user(CB.get_user_to_resource(1,1),1,i);\n+ guess(2,i) = msg_res_user(CB.get_user_to_resource(2,0),2,i) * msg_res_user(CB.get_user_to_resource(2,1),2,i);\n+ guess(3,i) = msg_res_user(CB.get_user_to_resource(3,0),3,i) * msg_res_user(CB.get_user_to_resource(3,1),3,i);\n+ guess(4,i) = msg_res_user(CB.get_user_to_resource(4,0),4,i) * msg_res_user(CB.get_user_to_resource(4,1),4,i);\n+ guess(5,i) = msg_res_user(CB.get_user_to_resource(5,0),5,i) * msg_res_user(CB.get_user_to_resource(5,1),5,i);\n}\n// LLRs computation\n- Y_N2[0 * this->N + batch *2 +0] = (Q)(std::log(guess[0][0] + guess[0][2]) - std::log(guess[0][1] + guess[0][3]));\n- Y_N2[1 * this->N + batch *2 +0] = (Q)(std::log(guess[1][0] + guess[1][2]) - std::log(guess[1][1] + guess[1][3]));\n- Y_N2[2 * this->N + batch *2 +0] = (Q)(std::log(guess[2][0] + guess[2][2]) - std::log(guess[2][1] + guess[2][3]));\n- Y_N2[3 * this->N + batch *2 +0] = (Q)(std::log(guess[3][0] + guess[3][2]) - std::log(guess[3][1] + guess[3][3]));\n- Y_N2[4 * this->N + batch *2 +0] = (Q)(std::log(guess[4][0] + guess[4][2]) - std::log(guess[4][1] + guess[4][3]));\n- Y_N2[5 * this->N + batch *2 +0] = (Q)(std::log(guess[5][0] + guess[5][2]) - std::log(guess[5][1] + guess[5][3]));\n+ Y_N2[0 * this->N + batch *2 +0] = (Q)(std::log(guess(0,0) + guess(0,2)) - std::log(guess(0,1) + guess(0,3)));\n+ Y_N2[1 * this->N + batch *2 +0] = (Q)(std::log(guess(1,0) + guess(1,2)) - std::log(guess(1,1) + guess(1,3)));\n+ Y_N2[2 * this->N + batch *2 +0] = (Q)(std::log(guess(2,0) + guess(2,2)) - std::log(guess(2,1) + guess(2,3)));\n+ Y_N2[3 * this->N + batch *2 +0] = (Q)(std::log(guess(3,0) + guess(3,2)) - std::log(guess(3,1) + guess(3,3)));\n+ Y_N2[4 * this->N + batch *2 +0] = (Q)(std::log(guess(4,0) + guess(4,2)) - std::log(guess(4,1) + guess(4,3)));\n+ Y_N2[5 * this->N + batch *2 +0] = (Q)(std::log(guess(5,0) + guess(5,2)) - std::log(guess(5,1) + guess(5,3)));\nif((this->N % 2) != 1 || batch != ((this->N /2 +1) -1))\n{\n- Y_N2[0 * this->N + batch *2 +1] = (Q)(std::log(guess[0][0] + guess[0][1]) - std::log(guess[0][2] + guess[0][3]));\n- Y_N2[1 * this->N + batch *2 +1] = (Q)(std::log(guess[1][0] + guess[1][1]) - std::log(guess[1][2] + guess[1][3]));\n- Y_N2[2 * this->N + batch *2 +1] = (Q)(std::log(guess[2][0] + guess[2][1]) - std::log(guess[2][2] + guess[2][3]));\n- Y_N2[3 * this->N + batch *2 +1] = (Q)(std::log(guess[3][0] + guess[3][1]) - std::log(guess[3][2] + guess[3][3]));\n- Y_N2[4 * this->N + batch *2 +1] = (Q)(std::log(guess[4][0] + guess[4][1]) - std::log(guess[4][2] + guess[4][3]));\n- Y_N2[5 * this->N + batch *2 +1] = (Q)(std::log(guess[5][0] + guess[5][1]) - std::log(guess[5][2] + guess[5][3]));\n+ Y_N2[0 * this->N + batch *2 +1] = (Q)(std::log(guess(0,0) + guess(0,1)) - std::log(guess(0,2) + guess(0,3)));\n+ Y_N2[1 * this->N + batch *2 +1] = (Q)(std::log(guess(1,0) + guess(1,1)) - std::log(guess(1,2) + guess(1,3)));\n+ Y_N2[2 * this->N + batch *2 +1] = (Q)(std::log(guess(2,0) + guess(2,1)) - std::log(guess(2,2) + guess(2,3)));\n+ Y_N2[3 * this->N + batch *2 +1] = (Q)(std::log(guess(3,0) + guess(3,1)) - std::log(guess(3,2) + guess(3,3)));\n+ Y_N2[4 * this->N + batch *2 +1] = (Q)(std::log(guess(4,0) + guess(4,1)) - std::log(guess(4,2) + guess(4,3)));\n+ Y_N2[5 * this->N + batch *2 +1] = (Q)(std::log(guess(5,0) + guess(5,1)) - std::log(guess(5,2) + guess(5,3)));\n}\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Tools/Code/SCMA/Codebook.hpp",
"new_path": "src/Tools/Code/SCMA/Codebook.hpp",
"diff": "@@ -19,20 +19,21 @@ public:\nconst std::complex<R>& operator() (int u, int o, int c) const;\n+ int get_codebook_size () const;\nint get_number_of_users () const;\n+ int get_number_of_resources () const;\nint get_number_of_resources_per_user() const;\nint get_number_of_users_per_resource() const;\n- int get_number_of_orthogonal_resources() const;\n- int get_codebook_size() const;\n+\nint get_resource_to_user(int r, int idx) const;\nint get_user_to_resource(int u, int idx) const;\nprivate:\n- int number_of_users;\n- int number_of_orthogonal_resources;\n- int number_of_resources_per_user;\n- int number_of_users_per_resource;\n- int codebook_size;\n+ int number_of_users = 0;\n+ int number_of_resources = 0;\n+ int number_of_resources_per_user = 0;\n+ int number_of_users_per_resource = 0;\n+ int codebook_size = 0;\nstd::vector<std::vector<std::vector<std::complex<R>>>> data;\nstd::vector<std::vector<int>> resource_to_user;\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Tools/Code/SCMA/Codebook.hxx",
"new_path": "src/Tools/Code/SCMA/Codebook.hxx",
"diff": "@@ -25,10 +25,10 @@ Codebook<R>\nthrow tools::invalid_argument(__FILE__, __LINE__, __func__, message.str());\n}\n- if (number_of_orthogonal_resources <= 0)\n+ if (number_of_resources <= 0)\n{\nstd::stringstream message;\n- message << \"'number_of_orthogonal_resources' has to be strictly positive ('number_of_orthogonal_resources' = \" << number_of_orthogonal_resources << \").\";\n+ message << \"'number_of_resources' has to be strictly positive ('number_of_resources' = \" << number_of_resources << \").\";\nthrow tools::invalid_argument(__FILE__, __LINE__, __func__, message.str());\n}\n@@ -53,14 +53,14 @@ void Codebook<R>\nthrow tools::invalid_argument(__FILE__, __LINE__, __func__, message.str());\n}\n- file >> number_of_users >> number_of_orthogonal_resources >> codebook_size;\n+ file >> number_of_users >> number_of_resources >> codebook_size;\ndata.resize(number_of_users);\nfor (int u = 0; u < number_of_users; ++u)\n{\n- data[u].resize(number_of_orthogonal_resources);\n- for (int r = 0; r < number_of_orthogonal_resources; ++r)\n+ data[u].resize(number_of_resources);\n+ for (int r = 0; r < number_of_resources; ++r)\n{\ndata[u][r].resize(codebook_size);\nfor (int c = 0; c < codebook_size; ++c)\n@@ -81,9 +81,9 @@ void Codebook<R>\n}\n// Factor graph calculation\n- std::vector<std::vector<bool>> F(number_of_orthogonal_resources, std::vector<bool>(number_of_users, false));\n+ std::vector<std::vector<bool>> F(number_of_resources);\n- for (int r = 0; r < number_of_orthogonal_resources; ++r)\n+ for (int r = 0; r < number_of_resources; ++r)\n{\nF[r].resize(number_of_users, false);\nfor (int u = 0; u < number_of_users; ++u)\n@@ -99,11 +99,7 @@ void Codebook<R>\n}\n}\n-\n- int number_of_resources_per_user = 0; // number of resources per user\n- int number_of_users_per_resource = 0; // number of users per resource\n-\n- for (int r = 0; r < number_of_orthogonal_resources; ++r)\n+ for (int r = 0; r < number_of_resources; ++r)\n{\nint n = 0; // number of users on this resource\nfor (int u = 0; u < number_of_users; ++u)\n@@ -124,7 +120,7 @@ void Codebook<R>\nfor (int u = 0; u < number_of_users; ++u)\n{\nint n = 0; // number of resources used by this user\n- for (int r = 0; r < number_of_orthogonal_resources; ++r)\n+ for (int r = 0; r < number_of_resources; ++r)\nif (F[r][u])\nn++;\n@@ -140,8 +136,8 @@ void Codebook<R>\n}\n- resource_to_user.resize(number_of_orthogonal_resources);\n- for (int r = 0; r < number_of_orthogonal_resources; ++r)\n+ resource_to_user.resize(number_of_resources);\n+ for (int r = 0; r < number_of_resources; ++r)\n{\nresource_to_user[r].resize(number_of_users_per_resource);\nint idx = 0;\n@@ -160,7 +156,7 @@ void Codebook<R>\n{\nuser_to_resource[u].resize(number_of_resources_per_user);\nint idx = 0;\n- for (int r = 0; r < number_of_orthogonal_resources; ++r)\n+ for (int r = 0; r < number_of_resources; ++r)\n{\nif (F[r][u])\n{\n@@ -171,8 +167,6 @@ void Codebook<R>\n}\n}\n-\n-\ntemplate <typename R>\ninline const std::complex<R>& Codebook<R>\n::operator() (int u, int o, int c) const\n@@ -202,9 +196,9 @@ inline int Codebook<R>\ntemplate <typename R>\ninline int Codebook<R>\n-::get_number_of_orthogonal_resources() const\n+::get_number_of_resources() const\n{\n- return number_of_orthogonal_resources;\n+ return number_of_resources;\n}\ntemplate <typename R>\n"
}
] |
C++
|
MIT License
|
aff3ct/aff3ct
|
Add msg_user_to_resources msg_res_user guess as 3D or 2D vectors. Change consequently the access methods to them in the demodulator.
|
8,490 |
08.11.2018 11:05:36
| -3,600 |
c3cf8ec4fe9624ae818d3f75db1fbe41401c0f94
|
Doc: add an info block to point to the AFF3CT autogen builds.
|
[
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/simulator/compilation/compilation.rst",
"new_path": "doc/sphinx/source/simulator/compilation/compilation.rst",
"diff": "Compilation\n===========\n+.. note:: If you do not plan to modify the AFF3CT source code and you want\n+ to use the simulator as is, you can **download one of the lastest\n+ AFF3CT build** from the\n+ `download page of the AFF3CT website <http://aff3ct.github.io/download.html>`_\n+ and directly go to the :ref:`usage` section.\n+\n.. _CMake: https://cmake.org/\nThis project uses `CMake`_ in order to generate any type of projects (Makefile,\nVisual Studio, Eclipse, CLion, XCode, etc.).\n-AFF3CT is portable and can be compiled on Linux, macOS and Windows. Of course\n+AFF3CT is portable and can be compiled on Windows, macOS and Linux. Of course\nit works on traditional x86 architectures like Intel and AMD CPUs but it also\nworks on embedded architectures like ARM CPUs.\n"
},
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/simulator/installation/installation.rst",
"new_path": "doc/sphinx/source/simulator/installation/installation.rst",
"diff": "Installation\n============\n+.. note:: If you do not plan to modify the AFF3CT source code and you want\n+ to use the simulator as is, you can **download one of the lastest\n+ AFF3CT build** from the\n+ `download page of the AFF3CT website <http://aff3ct.github.io/download.html>`_\n+ and directly go to the :ref:`usage` section.\n+\nOnce AFF3CT has been compiled, it is possible (not mandatory) to install it on\nyour system. On Unix-like systems, traditionally, the fresh build is installed\nin the ``/usr/local`` directory. This location can be changed by setting the\n"
},
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/simulator/simulator.rst",
"new_path": "doc/sphinx/source/simulator/simulator.rst",
"diff": "Simulator\n*********\n+.. note:: If you do not plan to modify the AFF3CT source code and you want\n+ to use the simulator as is, you can **download one of the lastest\n+ AFF3CT build** from the\n+ `download page of the AFF3CT website <http://aff3ct.github.io/download.html>`_\n+ and directly go to the :ref:`usage` section.\n+\n.. toctree::\n:maxdepth: 2\n:caption: Contents\n"
},
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/simulator/source_code/source_code.rst",
"new_path": "doc/sphinx/source/simulator/source_code/source_code.rst",
"diff": "Get the Source Code\n===================\n+.. note:: If you do not plan to modify the AFF3CT source code and you want\n+ to use the simulator as is, you can **download one of the lastest\n+ AFF3CT build** from the\n+ `download page of the AFF3CT website <http://aff3ct.github.io/download.html>`_\n+ and directly go to the :ref:`usage` section.\n+\n.. _Git: https://en.wikipedia.org/wiki/Git\n.. _GitHub: https://github.com/\n.. _AFF3CT repository: https://github.com/aff3ct/aff3ct\n"
},
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/simulator/usage/usage.rst",
"new_path": "doc/sphinx/source/simulator/usage/usage.rst",
"diff": "+.. _usage:\n+\nUsage\n=====\n"
}
] |
C++
|
MIT License
|
aff3ct/aff3ct
|
Doc: add an info block to point to the AFF3CT autogen builds.
|
8,483 |
08.11.2018 11:08:21
| -3,600 |
65bf7bf6aa299ce4fd6e0fe03c19f1826f8454e7
|
Fix arr_phi size; Add in comments an idea of loop enhancement, but there is an issue in an index.
|
[
{
"change_type": "MODIFY",
"old_path": "src/Module/Modem/SCMA/Modem_SCMA.hxx",
"new_path": "src/Module/Modem/SCMA/Modem_SCMA.hxx",
"diff": "@@ -21,7 +21,7 @@ Modem_SCMA<B,R,Q,PSI>\nnoise,\nn_frames),\nCB (codebook_path),\n- arr_phi (CB.get_codebook_size(), CB.get_codebook_size(), CB.get_codebook_size(), CB.get_codebook_size(), (Q)0),\n+ arr_phi (CB.get_number_of_resources(), CB.get_codebook_size(), CB.get_codebook_size(), CB.get_codebook_size(), (Q)0),\nmsg_user_to_resources(CB.get_number_of_users(), CB.get_number_of_resources(), CB.get_codebook_size(), (Q)0),\nmsg_res_user (CB.get_number_of_resources(), CB.get_number_of_users(), CB.get_codebook_size(), (Q)0),\nguess (CB.get_number_of_users(), CB.get_codebook_size(), (Q)0),\n@@ -211,7 +211,7 @@ void Modem_SCMA<B,R,Q,PSI>\nmsg_res_user(r,CB.get_resource_to_user(r,u),i) = (Q)0;\n- for (auto i = 0; i < CB.get_codebook_size(); i++) // codeword index\n+ for (auto i = 0; i < CB.get_codebook_size(); i++)\nfor (auto j = 0; j < CB.get_codebook_size(); j++)\nfor (auto k = 0; k < CB.get_codebook_size(); k++)\nfor (auto re = 0; re < CB.get_number_of_resources(); re++)\n@@ -230,6 +230,23 @@ void Modem_SCMA<B,R,Q,PSI>\n* msg_user_to_resources(CB.get_resource_to_user(re,1),re,k);\n}\n+ /// I tried to convert this last quadruple loops into this:\n+ // for (auto i = 0; i < CB.get_codebook_size(); i++)\n+ // for (auto j = 0; j < CB.get_codebook_size(); j++)\n+ // for (auto k = 0; k < CB.get_codebook_size(); k++)\n+ // for (auto re = 0; re < CB.get_number_of_resources(); re++)\n+ // for (auto u = 0; u < CB.get_number_of_users_per_resource(); u++)\n+ // {\n+ // auto proba = arr_phi(re,i,j,k);\n+\n+ // for (auto u2 = 0; u2 < CB.get_number_of_users_per_resource(); u2++)\n+ // if (u2 != u)\n+ // proba *= msg_user_to_resources(CB.get_resource_to_user(re,u2),re,j); ///// <------- but I'm having issue with this j that shall be k once on two.\n+\n+ // msg_res_user(re,CB.get_resource_to_user(re,u),i) += proba;\n+ // }\n+\n+\n// user to resource messaging\nfor (auto i = 0; i < CB.get_number_of_resources(); i++)\n{\n"
}
] |
C++
|
MIT License
|
aff3ct/aff3ct
|
Fix arr_phi size; Add in comments an idea of loop enhancement, but there is an issue in an index.
|
8,490 |
08.11.2018 11:28:09
| -3,600 |
0ecef84fe018a44fda4d89354a963ef3f061f367
|
Doc: move the PyBER screenshot.
|
[
{
"change_type": "RENAME",
"old_path": "doc/sphinx/source/images/PyBER_plot.png",
"new_path": "doc/sphinx/source/simulator/usage/pyber/images/pyber_plot.png",
"diff": ""
},
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/simulator/usage/pyber/pyber.rst",
"new_path": "doc/sphinx/source/simulator/usage/pyber/pyber.rst",
"diff": "@@ -5,7 +5,7 @@ PyBER\nYou can download it here: `PyBER <https://github.com/aff3ct/PyBER>`_\n-.. image:: /images/PyBER_plot.png\n+.. image:: images/pyber_plot.png\nInstall Python 3\n"
}
] |
C++
|
MIT License
|
aff3ct/aff3ct
|
Doc: move the PyBER screenshot.
|
8,483 |
08.11.2018 11:36:11
| -3,600 |
67cd8f64e39cd69ab9ad83f6132398d7f9ddde47
|
Modify consequently to the modification the sphinx generator.
|
[
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/simulator/usage/parameters/cdc_bch/cdc.rst",
"new_path": "doc/sphinx/source/simulator/usage/parameters/cdc_bch/cdc.rst",
"diff": "@@ -5,7 +5,7 @@ Codec BCH\n.. toctree::\n:maxdepth: 2\n- :caption: Codec BCH contents\n+ :caption: Codec BCH Contents\nenc.rst\ndec.rst\n"
},
{
"change_type": "MODIFY",
"old_path": "scripts/generate_sphinx_usage.py",
"new_path": "scripts/generate_sphinx_usage.py",
"diff": "@@ -8,7 +8,7 @@ import aff3ct_help_reader as ahr\nparser = argparse.ArgumentParser(prog='aff3ct-command-conversion', formatter_class=argparse.ArgumentDefaultsHelpFormatter)\nparser.add_argument('--build', action='store', dest='buildPath', type=str, default=\"build/\", help='Build path to aff3ct.')\n-parser.add_argument('--dest', action='store', dest='destPath', default=\"doc/sphinx/source/simulator/usage/modules\", type=str, help='Destination path.')\n+parser.add_argument('--dest', action='store', dest='destPath', default=\"doc/sphinx/source/simulator/usage/parameters\", type=str, help='Destination path.')\nargs = parser.parse_args()\n@@ -290,7 +290,7 @@ def write_codec_file(codecPath, codeName, hasPct):\ntext += \".. toctree::\\n\"\ntext += indent + \":maxdepth: 2\\n\"\n- text += indent + \":caption: Codec \" + codeName + \" contents\\n\\n\"\n+ text += indent + \":caption: Codec \" + codeName + \" Contents\\n\\n\"\ntext += indent + \"enc.rst\\n\"\ntext += indent + \"dec.rst\\n\"\n@@ -335,7 +335,7 @@ if __name__ == \"__main__\":\nhelpMap = ahr.help_to_map(stdOutput)\n- codecPath = destPath + \"codec_\" + c.lower() + \"/\"\n+ codecPath = destPath + \"cdc_\" + c.lower() + \"/\"\nif not os.path.exists(codecPath):\nos.makedirs(codecPath)\n"
}
] |
C++
|
MIT License
|
aff3ct/aff3ct
|
Modify consequently to the modification the sphinx generator.
|
8,483 |
08.11.2018 12:49:11
| -3,600 |
8d2d6b39f88c9a9fc845043fe67b9e0095363be3
|
Dox: Make unique the duplicated arguments tag references.
|
[
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/simulation/parameters/cdc/cdc_turbo/dec.rst",
"new_path": "doc/sphinx/source/simulation/parameters/cdc/cdc_turbo/dec.rst",
"diff": "@@ -31,7 +31,7 @@ Enables the flip and check decoder (requires \"\\\\-\\\\-crc-type\").\nSet the iteration to start the CRC checking.\n-.. _dec-turbo-dec-fnc-ite-M:\n+.. _dec-turbo-dec-fnc-ite-max:\n``--dec-fnc-ite-M``\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n@@ -41,7 +41,7 @@ Set the iteration to start the CRC checking.\nSet last iteration at which the fnc is used.\n-.. _dec-turbo-dec-fnc-ite-m:\n+.. _dec-turbo-dec-fnc-ite-min:\n``--dec-fnc-ite-m``\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n"
},
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/simulation/parameters/cdc/cdc_turbo_db/dec.rst",
"new_path": "doc/sphinx/source/simulation/parameters/cdc/cdc_turbo_db/dec.rst",
"diff": "@@ -31,7 +31,7 @@ Enables the flip and check decoder (requires \"\\\\-\\\\-crc-type\").\nSet the iteration to start the CRC checking.\n-.. _dec-turbo_db-dec-fnc-ite-M:\n+.. _dec-turbo_db-dec-fnc-ite-max:\n``--dec-fnc-ite-M``\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n@@ -41,7 +41,7 @@ Set the iteration to start the CRC checking.\nSet last iteration at which the fnc is used.\n-.. _dec-turbo_db-dec-fnc-ite-m:\n+.. _dec-turbo_db-dec-fnc-ite-min:\n``--dec-fnc-ite-m``\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n"
},
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/simulation/parameters/global/global.rst",
"new_path": "doc/sphinx/source/simulation/parameters/global/global.rst",
"diff": "@@ -11,7 +11,7 @@ Other parameters\nPrint this help.\n-.. _global-Help:\n+.. _global-advanced-help:\n``--Help, -H``\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n"
}
] |
C++
|
MIT License
|
aff3ct/aff3ct
|
Dox: Make unique the duplicated arguments tag references.
|
8,483 |
08.11.2018 12:57:33
| -3,600 |
fe7ab17fda18242946795076f9fad1a5d589013c
|
Update generate_sphinx_usage according to the last modifications
|
[
{
"change_type": "MODIFY",
"old_path": "scripts/generate_sphinx_usage.py",
"new_path": "scripts/generate_sphinx_usage.py",
"diff": "@@ -8,7 +8,7 @@ import aff3ct_help_reader as ahr\nparser = argparse.ArgumentParser(prog='aff3ct-command-conversion', formatter_class=argparse.ArgumentDefaultsHelpFormatter)\nparser.add_argument('--build', action='store', dest='buildPath', type=str, default=\"build/\", help='Build path to aff3ct.')\n-parser.add_argument('--dest', action='store', dest='destPath', default=\"doc/sphinx/source/simulator/usage/parameters\", type=str, help='Destination path.')\n+parser.add_argument('--dest', action='store', dest='destPath', default=\"doc/sphinx/source/simulation/parameters\", type=str, help='Destination path.')\nargs = parser.parse_args()\n@@ -290,7 +290,7 @@ def write_codec_file(codecPath, codeName, hasPct):\ntext += \".. toctree::\\n\"\ntext += indent + \":maxdepth: 2\\n\"\n- text += indent + \":caption: Codec \" + codeName + \" Contents\\n\\n\"\n+ text += indent + \":caption: Contents\\n\\n\"\ntext += indent + \"enc.rst\\n\"\ntext += indent + \"dec.rst\\n\"\n@@ -317,16 +317,16 @@ if __name__ == \"__main__\":\nos.makedirs(destPath)\n- write_module(helpMap[\"Other\" ], destPath + \"global.rst\", \"global\");\n- write_module(helpMap[\"Simulation\" ], destPath + \"sim.rst\" , \"sim\");\n- write_module(helpMap[\"Source\" ], destPath + \"src.rst\" , \"src\");\n- write_module(helpMap[\"CRC\" ], destPath + \"crc.rst\" , \"crc\");\n- write_module(helpMap[\"Modem\" ], destPath + \"mdm.rst\" , \"mdm\");\n- write_module(helpMap[\"Channel\" ], destPath + \"chn.rst\" , \"chn\");\n- write_module(helpMap[\"Monitor\" ], destPath + \"mnt.rst\" , \"mnt\");\n- write_module(helpMap[\"Terminal\" ], destPath + \"ter.rst\" , \"ter\");\n- write_module(helpMap[\"Interleaver\"], destPath + \"itl.rst\" , \"itl\");\n- write_module(helpMap[\"Quantizer\" ], destPath + \"qnt.rst\" , \"qnt\");\n+ write_module(helpMap[\"Other\" ], destPath + \"global/global.rst\", \"global\");\n+ write_module(helpMap[\"Simulation\" ], destPath + \"sim/sim.rst\" , \"sim\");\n+ write_module(helpMap[\"Source\" ], destPath + \"src/src.rst\" , \"src\");\n+ write_module(helpMap[\"CRC\" ], destPath + \"crc/crc.rst\" , \"crc\");\n+ write_module(helpMap[\"Modem\" ], destPath + \"mdm/mdm.rst\" , \"mdm\");\n+ write_module(helpMap[\"Channel\" ], destPath + \"chn/chn.rst\" , \"chn\");\n+ write_module(helpMap[\"Monitor\" ], destPath + \"mnt/mnt.rst\" , \"mnt\");\n+ write_module(helpMap[\"Terminal\" ], destPath + \"ter/ter.rst\" , \"ter\");\n+ write_module(helpMap[\"Interleaver\"], destPath + \"itl/itl.rst\" , \"itl\");\n+ write_module(helpMap[\"Quantizer\" ], destPath + \"qnt/qnt.rst\" , \"qnt\");\ncodesList = [\"BCH\", \"LDPC\", \"POLAR\", \"RA\", \"REP\", \"RS\", \"RSC\", \"RSC_DB\", \"TURBO\", \"TURBO_DB\", \"TURBO_PROD\", \"UNCODED\"]\n@@ -335,7 +335,7 @@ if __name__ == \"__main__\":\nhelpMap = ahr.help_to_map(stdOutput)\n- codecPath = destPath + \"cdc_\" + c.lower() + \"/\"\n+ codecPath = destPath + \"cdc/cdc_\" + c.lower() + \"/\"\nif not os.path.exists(codecPath):\nos.makedirs(codecPath)\n"
}
] |
C++
|
MIT License
|
aff3ct/aff3ct
|
Update generate_sphinx_usage according to the last modifications
|
8,483 |
08.11.2018 13:09:25
| -3,600 |
f269ec0bbebee8d95003e696aea34275c6f211f9
|
Doc: Fix a ref link
|
[
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/overview/overview.rst",
"new_path": "doc/sphinx/source/overview/overview.rst",
"diff": "@@ -18,7 +18,7 @@ ways, as:\n:columns: 1\n* a **standalone application** for `Monte Carlo`_ `BFER`_ and `EXIT chart`_\n- simulations (see the :ref:`simulator` section),\n+ simulations (see the :ref:`simulation` section),\n* a dedicated **toolbox** or **library** for your projects, many modules\n(like codecs, modems, channels, ...) are available and easy to use (see\nthe :ref:`library` section).\n"
}
] |
C++
|
MIT License
|
aff3ct/aff3ct
|
Doc: Fix a ref link
|
8,490 |
08.11.2018 15:34:38
| -3,600 |
32bf60da6a567937eecfb3a3523f30368fcba65d
|
Doc: get automatically the version from Git.
|
[
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/conf.py",
"new_path": "doc/sphinx/source/conf.py",
"diff": "@@ -23,11 +23,15 @@ project = 'AFF3CT'\ncopyright = '2018, AFF3CT\\'s team'\nauthor = 'AFF3CT\\'s team'\n+# get the AFF3CT version from Git\n+import subprocess\n+label = subprocess.check_output([\"git\", \"describe\"]).strip()\n+split_label = label.split(\"-\")\n+\n# The short X.Y version\n-version = ''\n+version = split_label[0]\n# The full version, including alpha/beta/rc tags\n-release = '2.0.0'\n-\n+release = label\n# -- General configuration ---------------------------------------------------\n@@ -177,6 +181,10 @@ epub_exclude_files = ['search.html']\nrst_epilog = \"\"\"\n+.. |version| replace:: \"\"\" + version + \"\"\"\n+\n+.. |release| replace:: \"\"\" + release + \"\"\"\n+\n.. |logo_ims| image:: https://www.ims-bordeaux.fr/images/logoimsjoom.png\n:alt: logo-ims-bordeaux\n:width: 60px\n"
}
] |
C++
|
MIT License
|
aff3ct/aff3ct
|
Doc: get automatically the version from Git.
|
8,490 |
08.11.2018 15:49:39
| -3,600 |
1b6db1a46d70ebb39f45d5d85015c332b5088389
|
Doc: remove the overview section.
|
[
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/index.rst",
"new_path": "doc/sphinx/source/index.rst",
"diff": "-##################################\n-Welcome to AFF3CT's documentation!\n-##################################\n+####################\n+AFF3CT Documentation\n+####################\n+.. _Forward Error Correction: https://en.wikipedia.org/wiki/Forward_error_correction\n+.. _Monte Carlo: https://en.wikipedia.org/wiki/Monte_Carlo_method\n+.. _BFER: https://en.wikipedia.org/wiki/Bit_error_rate\n+.. _EXIT chart: https://en.wikipedia.org/wiki/EXIT_chart\n+\n+**AFF3CT** (A Fast Forward Error Correction Toolbox!) is a library dedicated to\n+the `Forward Error Correction`_ (FEC or channel coding). It is written in\n+**C++11** and it supports a large range of codes: from the well-spread\n+**Turbo codes** to the new **Polar codes** including the\n+**Low-Density Parity-Check (LDPC) codes**. AFF3CT can be used in two different\n+ways, as:\n+\n+.. hlist::\n+ :columns: 1\n+\n+ * a **standalone application** for `Monte Carlo`_ `BFER`_ and `EXIT chart`_\n+ simulations (see the :ref:`simulation` section),\n+ * a dedicated **toolbox** or **library** for your projects, many modules\n+ (like codecs, modems, channels, ...) are available and easy to use (see\n+ the :ref:`library` section).\n.. toctree::\n:caption: Contents\n- :maxdepth: 3\n+ :maxdepth: 2\n:numbered:\n- overview/overview\nsource_code/source_code\ncompilation/compilation\ninstallation/installation\n@@ -16,10 +35,9 @@ Welcome to AFF3CT's documentation!\nlibrary/library\nlicense/license\n+.. Indices and tables\n+.. ==================\n-Indices and tables\n-==================\n-\n-* :ref:`genindex`\n-* :ref:`modindex`\n-* :ref:`search`\n+.. * :ref:`genindex`\n+.. * :ref:`modindex`\n+.. * :ref:`search`\n"
},
{
"change_type": "DELETE",
"old_path": "doc/sphinx/source/overview/overview.rst",
"new_path": null,
"diff": "-********\n-Overview\n-********\n-\n-.. _Forward Error Correction: https://en.wikipedia.org/wiki/Forward_error_correction\n-.. _Monte Carlo: https://en.wikipedia.org/wiki/Monte_Carlo_method\n-.. _BFER: https://en.wikipedia.org/wiki/Bit_error_rate\n-.. _EXIT chart: https://en.wikipedia.org/wiki/EXIT_chart\n-\n-**AFF3CT** (A Fast Forward Error Correction Toolbox!) is a library dedicated to\n-the `Forward Error Correction`_ (FEC or channel coding). It is written in\n-**C++11** and it supports a large range of codes: from the well-spread\n-**Turbo codes** to the new **Polar codes** including the\n-**Low-Density Parity-Check (LDPC) codes**. AFF3CT can be used in two different\n-ways, as:\n-\n-.. hlist::\n- :columns: 1\n-\n- * a **standalone application** for `Monte Carlo`_ `BFER`_ and `EXIT chart`_\n- simulations (see the :ref:`simulation` section),\n- * a dedicated **toolbox** or **library** for your projects, many modules\n- (like codecs, modems, channels, ...) are available and easy to use (see\n- the :ref:`library` section).\n"
},
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/simulation/overview/overview.rst",
"new_path": "doc/sphinx/source/simulation/overview/overview.rst",
"diff": "Overview\n--------\n-- describe the BER/FER simulator chains, and EXIT chart (add figures)\n-- detail the command line arguments philosophy:\n- * give an simple example and explain the main arguments (-C -N -K -m -M)\n- * explain the sub-arguments\n- * explain the redundant arguments (--type --implem --help --Help)\n-- tell that it is possible to use an `ini` file\n\\ No newline at end of file\n+* describe the BER/FER simulator chains, and EXIT chart (add figures)\n+* detail the command line arguments philosophy:\n+\n+ - give a simple example and explain the main arguments (-C -N -K -m -M)\n+ - explain the sub-arguments\n+ - explain the redundant arguments (--type --implem --help --Help)\n+\n+* tell that it is possible to use an `ini` file\n\\ No newline at end of file\n"
}
] |
C++
|
MIT License
|
aff3ct/aff3ct
|
Doc: remove the overview section.
|
8,483 |
08.11.2018 16:36:51
| -3,600 |
369ff8abcd2b2bf2c8f42c58d57c122738ca4dc7
|
Add html_favicon and html_logo in conf.py but set to None.
|
[
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/conf.py",
"new_path": "doc/sphinx/source/conf.py",
"diff": "@@ -26,7 +26,7 @@ author = 'AFF3CT\\'s team'\n# The short X.Y version\nversion = ''\n# The full version, including alpha/beta/rc tags\n-release = '2.0.0'\n+release = '2.1.0'\n# -- General configuration ---------------------------------------------------\n@@ -101,6 +101,10 @@ html_static_path = ['_static']\n# html_sidebars = {}\n+html_favicon = None\n+html_logo = None\n+\n+\n# -- Options for HTMLHelp output ---------------------------------------------\n# Output file base name for HTML help builder.\n"
}
] |
C++
|
MIT License
|
aff3ct/aff3ct
|
Add html_favicon and html_logo in conf.py but set to None.
|
8,483 |
08.11.2018 17:38:11
| -3,600 |
9d510f3f4b5807778f12929ba54ce092aa77f908
|
Doc: fix the doc compile under python3
|
[
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/conf.py",
"new_path": "doc/sphinx/source/conf.py",
"diff": "@@ -25,7 +25,7 @@ author = 'AFF3CT\\'s team'\n# get the AFF3CT version from Git\nimport subprocess\n-label = subprocess.check_output([\"git\", \"describe\"]).strip()\n+label = subprocess.check_output([\"git\", \"describe\"]).strip().decode(encoding='UTF-8')\nsplit_label = label.split(\"-\")\n# The short X.Y version\n"
}
] |
C++
|
MIT License
|
aff3ct/aff3ct
|
Doc: fix the doc compile under python3
|
8,490 |
09.11.2018 14:19:55
| -3,600 |
58a24155adfce1a61e68be7819a2518625583ff7
|
Doc: clarifications.
|
[
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/compilation/compilation.rst",
"new_path": "doc/sphinx/source/compilation/compilation.rst",
"diff": "@@ -199,8 +199,7 @@ Once AFF3CT is compiled you can browse the build by right clicking on\n.. image:: images/vs17_cache_folder.png\n:align: center\n-.. note:: **Visual Studio** should not be confounded with\n- **Visual Studio Code**.\n+.. note:: **Visual Studio** should not be mixed up with **Visual Studio Code**.\n**Visual Studio** is the Windows native IDE and **Visual Studio Code**\na portable code editor.\n@@ -304,6 +303,13 @@ variable can get. For instance, to compile in release mode:\ncompiler, if ``CMAKE_BUILD_TYPE`` is set to ``Release``, the code will\nbe compiled with the ``-O3`` flag.\n+.. note:: If you need to develop in AFF3CT it is recommended to compile\n+ in the ``Debug`` mode during the development process to add the debug\n+ symbols in the binary files. It will certainly ease the debug process\n+ but be careful, the execution speed will be seriously affected in this\n+ mode, be sure to switch to the ``Release`` mode when the code is\n+ stable.\n+\n.. note:: In Visual Studio solutions, the ``CMAKE_BUILD_TYPE`` built-in\nvariable has no effect and the build type is directly managed by\nVisual.\n"
},
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/source_code/source_code.rst",
"new_path": "doc/sphinx/source/source_code/source_code.rst",
"diff": "@@ -61,27 +61,33 @@ Install Git from the package manager:\nClone AFF3CT from GitHub\n------------------------\n-From your favorite terminal:\n+Get the source code from GitHub:\n.. code-block:: bash\n- git clone https://github.com/aff3ct/aff3ct.git\n+ git clone --recursive https://github.com/aff3ct/aff3ct.git\ncd aff3ct\n.. _Git submodule feature: https://git-scm.com/docs/git-submodule\nThe AFF3CT repository contains some dependencies to other repositories.\nTechnically those dependencies are managed by the `Git submodule feature`_.\n-By default the submodules are not downloaded during the ``git clone`` process.\n-Before doing anything else it is highly recommended to get those submodules with\n-the following command:\n-\n-.. code-block:: bash\n-\n- git submodule update --init --recursive\n+By default the submodules are not downloaded during the ``git clone`` process\n+this is why the ``--recursive`` option has been added.\n.. danger:: On the `AFF3CT repository`_ you may want to directly download\nthe source code without making a ``git clone``. This will get you an\narchive without the AFF3CT dependencies and the build process will\nfail. **Do not directly download AFF3CT from GitHub and please make\na clone!**\n+\n+If you want to manually get or update the AFF3CT submodules, you can use the\n+following command:\n+\n+.. code-block:: bash\n+\n+ git submodule update --init --recursive\n+\n+.. warning:: When ``git pull`` is used to get the last commits from the\n+ repository, the submodules are not automatically updated and it\n+ is required to call the previous ``git submodule`` command.\n\\ No newline at end of file\n"
}
] |
C++
|
MIT License
|
aff3ct/aff3ct
|
Doc: clarifications.
|
8,490 |
09.11.2018 16:08:22
| -3,600 |
cf3b00517a058f1f5043b1eec01417fc17835c95
|
Doc: auto-compile Doxygen XML files only on Readthedocs servers.
|
[
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/conf.py",
"new_path": "doc/sphinx/source/conf.py",
"diff": "@@ -76,18 +76,14 @@ exclude_patterns = []\n# The name of the Pygments (syntax highlighting) style to use.\npygments_style = None\n-# -- Configure Breathe (Developer doc for Doxygen XML files) -----------------\n-\n-return_code = subprocess.call('doxygen --version > /dev/null 2>&1', shell=True)\n-if return_code:\n- print \"Please check to have Doxygen installed on your system.\"\n- exit -1\n-\n-print \"Generating Doxygen XML files\"\n-return_code = subprocess.call('cd ../../doxygen; doxygen config.txt > /dev/null 2>&1', shell=True)\n-if return_code:\n- print \"Something went wrong during the Doxygen execution.\"\n- exit -1\n+# -- Configure Breathe (Developer doc from Doxygen XML files) ----------------\n+\n+# Are we on a Readthedocs server ?\n+read_the_docs_build = os.environ.get('READTHEDOCS', None) == 'True'\n+# If we are on a Readthedocs server\n+if read_the_docs_build:\n+ # Generate the Doxygen XML files\n+ subprocess.call('cd ../../doxygen; doxygen config.txt', shell=True)\nbreathe_projects = { \"AFF3CT\": \"../../doxygen/xml/\" }\nbreathe_default_project = \"AFF3CT\"\n"
},
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/developer/module/codec/codec.rst",
"new_path": "doc/sphinx/source/developer/module/codec/codec.rst",
"diff": "-.. _developer_module_channel:\n+.. _developer_module_codec:\n*****\nCodec\n"
}
] |
C++
|
MIT License
|
aff3ct/aff3ct
|
Doc: auto-compile Doxygen XML files only on Readthedocs servers.
|
8,483 |
12.11.2018 09:05:03
| -3,600 |
4db0e691d6cdaa0d2bbacc878b9f05ab56b98b1f
|
Add html theme options to have an infinite navigation depth.
|
[
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/conf.py",
"new_path": "doc/sphinx/source/conf.py",
"diff": "@@ -98,8 +98,20 @@ html_theme = 'sphinx_rtd_theme'\n# Theme options are theme-specific and customize the look and feel of a theme\n# further. For a list of options available for each theme, see the\n# documentation.\n-#\n-# html_theme_options = {}\n+# see here for description : https://sphinx-rtd-theme.readthedocs.io/en/latest/configuring.html#html-theme-options\n+# TODO : Why the compilation fails the first time ???? -> the second time is good.\n+html_theme_options = {\n+ 'canonical_url': '', # to help search engines with duplicated versions of the doc -> TODO\n+ 'collapse_navigation': False,\n+ 'style_external_links': False, # Add an icon next to external links.\n+ 'display_version': True, # the version number shown at the top of the sidebar\n+ # Toc options\n+ 'navigation_depth' : -1,\n+ 'collapse_navigation': True,\n+ 'sticky_navigation': True,\n+ 'includehidden': False,\n+ 'titles_only': False\n+}\n# Add any paths that contain custom static files (such as style sheets) here,\n# relative to this directory. They are copied after the builtin static files,\n"
}
] |
C++
|
MIT License
|
aff3ct/aff3ct
|
Add html theme options to have an infinite navigation depth.
|
8,483 |
13.11.2018 10:59:24
| -3,600 |
a0f1e430008f516a43cb457a0fc76f26c4f23dea
|
Set the preamble tocdepth to a big number in order to have the navigation sidebar with the complete TOC but now we have also a really long preambule TOC.
|
[
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/conf.py",
"new_path": "doc/sphinx/source/conf.py",
"diff": "@@ -157,6 +157,8 @@ latex_elements = {\n# Latex figure (float) alignment\n#\n# 'figure_align': 'htbp',\n+\n+ 'preamble': '\\setcounter{tocdepth}{10}'\n}\n# Grouping the document tree into LaTeX files. List of tuples\n"
}
] |
C++
|
MIT License
|
aff3ct/aff3ct
|
Set the preamble tocdepth to a big number in order to have the navigation sidebar with the complete TOC but now we have also a really long preambule TOC.
|
8,483 |
13.11.2018 11:19:46
| -3,600 |
46af7c09c57774247bee41b41025bc36bfca2109
|
Doc: Conjuguate correctly the verbs in interleaver parameters descriptions.
|
[
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/simulation/parameters/itl/itl.rst",
"new_path": "doc/sphinx/source/simulation/parameters/itl/itl.rst",
"diff": "@@ -49,17 +49,17 @@ Description of the allowed values:\n| ``USER`` | |itl-type_descr_user| |\n+--------------+---------------------------+\n-.. |itl-type_descr_ccsds| replace:: Select the interleaver defined for the CCSDS standard.\n-.. |itl-type_descr_col_row| replace:: Fill the interleaver by column and read it by row.\n-.. |itl-type_descr_dvb-rcs1| replace:: Select the interleaver defined for the DVB-RCS1 standard.\n-.. |itl-type_descr_dvb-rcs2| replace:: Select the interleaver defined for the DVB-RCS2 standard.\n+.. |itl-type_descr_ccsds| replace:: Selects the interleaver defined for the CCSDS standard.\n+.. |itl-type_descr_col_row| replace:: Fills the interleaver by column and read it by row.\n+.. |itl-type_descr_dvb-rcs1| replace:: Selects the interleaver defined for the DVB-RCS1 standard.\n+.. |itl-type_descr_dvb-rcs2| replace:: Selects the interleaver defined for the DVB-RCS2 standard.\n.. |itl-type_descr_golden| replace:: TODO VALUE GOLDEN\n-.. |itl-type_descr_lte| replace:: Select the interleaver defined for the LTE standard.\n-.. |itl-type_descr_no| replace:: Deactivate the interleaving process: the output is the input.\n-.. |itl-type_descr_random| replace:: Generate a completely random LUT.\n-.. |itl-type_descr_rand_col| replace:: Randomly interleave the frame by independent columns.\n-.. |itl-type_descr_row_col| replace:: Fill the interleaver by row and read it by column.\n-.. |itl-type_descr_user| replace:: Use the user's LUT given in the file.\n+.. |itl-type_descr_lte| replace:: Selects the interleaver defined for the LTE standard.\n+.. |itl-type_descr_no| replace:: Deactivates the interleaving process: the output is the input.\n+.. |itl-type_descr_random| replace:: Generates a completely random LUT.\n+.. |itl-type_descr_rand_col| replace:: Randomly interleaves the frame by independent columns.\n+.. |itl-type_descr_row_col| replace:: Fills the interleaver by row and read it by column.\n+.. |itl-type_descr_user| replace:: Uses the user's LUT given in the file.\nThe following figures depict the behavior of the different interleaver types:\n@@ -78,7 +78,7 @@ The following figures depict the behavior of the different interleaver types:\n:Default: 4\n:Examples: ``--itl-cols 1``\n-Specify the number of columns used for the ``RAND_COL``, ``ROW_COL`` or ``COL_ROW`` interleavers.\n+Specifies the number of columns used for the ``RAND_COL``, ``ROW_COL`` or ``COL_ROW`` interleavers.\n.. _itl-itl-path:\n@@ -89,7 +89,7 @@ Specify the number of columns used for the ``RAND_COL``, ``ROW_COL`` or ``COL_RO\n:Rights: read only\n:Examples: ``--itl-path ../conf/itl/GSM-LDPC_4224.itl``\n-Specify the path to the interleaver file (to use with ``USER`` interleaver).\n+Specifies the path to the interleaver file (to use with ``USER`` interleaver).\n.. _itl-itl-read-order:\n@@ -100,7 +100,7 @@ Specify the path to the interleaver file (to use with ``USER`` interleaver).\n:Allowed values: ``BOTTOM_LEFT`` ``BOTTOM_RIGHT`` ``TOP_LEFT`` ``TOP_RIGHT``\n:Examples: ``--itl-read-order BOTTOM_LEFT``\n-Read order of the ``COL_ROW`` and ``ROW_COL`` interleavers.\n+The read order of the ``COL_ROW`` and ``ROW_COL`` interleavers.\nThe read starts from the given corner of the array to the diagonally opposite one.\nThe read is made row by row for the ``COL_ROW`` interleaver and column by column\nfor the ``ROW_COL`` one.\n@@ -146,6 +146,6 @@ The following figure depicts the read order options on the ``ROW_COL`` interleav\n``--itl-uni``\n\"\"\"\"\"\"\"\"\"\"\"\"\"\n-Enable the regeneration of the interleaver at *each new frame* else generate once\n+Enables the regeneration of the interleaver at *each new frame* else generate once\nthe LUT and use the same all along the simulation.\n"
}
] |
C++
|
MIT License
|
aff3ct/aff3ct
|
Doc: Conjuguate correctly the verbs in interleaver parameters descriptions.
|
8,483 |
13.11.2018 11:45:34
| -3,600 |
58fcf06d5166361dac11302ef775a823072f11ef
|
Doc: break the too long lines in itl parameters source file
|
[
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/simulation/parameters/itl/itl.rst",
"new_path": "doc/sphinx/source/simulation/parameters/itl/itl.rst",
"diff": "@@ -4,10 +4,12 @@ Interleaver parameters\n----------------------\nThe interleaving process starts by the generation of the Look up Table (LUT).\n-This one describes for each bit of the output frame the position of the origin of this bit inside the input frame.\n-Thus, the interleaver simply fills the output from the input according to this LUT.\n+This one describes for each bit of the output frame the position of the origin\n+of this bit inside the input frame. Thus, the interleaver simply fills the\n+output from the input according to this LUT.\n-The deinterleaving process reverses the LUT to find back the natural order of the frame.\n+The deinterleaving process reverses the LUT to find back the natural order of\n+the frame.\n.. _itl-itl-type:\n@@ -15,7 +17,8 @@ The deinterleaving process reverses the LUT to find back the natural order of th\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n:Type: text\n- :Allowed values: ``CCSDS`` ``COL_ROW`` ``DVB-RCS1`` ``DVB-RCS2`` ``GOLDEN`` ``LTE`` ``NO`` ``RANDOM`` ``RAND_COL`` ``ROW_COL`` ``USER``\n+ :Allowed values: ``CCSDS`` ``COL_ROW`` ``DVB-RCS1`` ``DVB-RCS2`` ``GOLDEN``\n+ ``LTE`` ``NO`` ``RANDOM`` ``RAND_COL`` ``ROW_COL`` ``USER``\n:Default: ``RANDOM``\n:Examples: ``--itl-type RANDOM``\n@@ -49,16 +52,24 @@ Description of the allowed values:\n| ``USER`` | |itl-type_descr_user| |\n+--------------+---------------------------+\n-.. |itl-type_descr_ccsds| replace:: Selects the interleaver defined for the CCSDS standard.\n-.. |itl-type_descr_col_row| replace:: Fills the interleaver by column and read it by row.\n-.. |itl-type_descr_dvb-rcs1| replace:: Selects the interleaver defined for the DVB-RCS1 standard.\n-.. |itl-type_descr_dvb-rcs2| replace:: Selects the interleaver defined for the DVB-RCS2 standard.\n+.. |itl-type_descr_ccsds| replace:: Selects the interleaver defined for the\n+ CCSDS standard.\n+.. |itl-type_descr_col_row| replace:: Fills the interleaver by column and read\n+ it by row.\n+.. |itl-type_descr_dvb-rcs1| replace:: Selects the interleaver defined for the\n+ DVB-RCS1 standard.\n+.. |itl-type_descr_dvb-rcs2| replace:: Selects the interleaver defined for the\n+ DVB-RCS2 standard.\n.. |itl-type_descr_golden| replace:: TODO VALUE GOLDEN\n-.. |itl-type_descr_lte| replace:: Selects the interleaver defined for the LTE standard.\n-.. |itl-type_descr_no| replace:: Deactivates the interleaving process: the output is the input.\n+.. |itl-type_descr_lte| replace:: Selects the interleaver defined for the\n+ LTE standard.\n+.. |itl-type_descr_no| replace:: Deactivates the interleaving process: the\n+ output is the input.\n.. |itl-type_descr_random| replace:: Generates a completely random LUT.\n-.. |itl-type_descr_rand_col| replace:: Randomly interleaves the frame by independent columns.\n-.. |itl-type_descr_row_col| replace:: Fills the interleaver by row and read it by column.\n+.. |itl-type_descr_rand_col| replace:: Randomly interleaves the frame by\n+ independent columns.\n+.. |itl-type_descr_row_col| replace:: Fills the interleaver by row and read it\n+ by column.\n.. |itl-type_descr_user| replace:: Uses the user's LUT given in the file.\nThe following figures depict the behavior of the different interleaver types:\n@@ -66,7 +77,8 @@ The following figures depict the behavior of the different interleaver types:\n.. figure:: images/schema_itl_types.png\n:align: center\n-.. seealso:: The :ref:`itl-itl-read-order` argument allows more options for the ``COL_ROW`` and ``ROW_COL`` interleavers.\n+.. seealso:: The :ref:`itl-itl-read-order` argument allows more options for the\n+ ``COL_ROW`` and ``ROW_COL`` interleavers.\n.. _itl-itl-cols:\n@@ -78,7 +90,8 @@ The following figures depict the behavior of the different interleaver types:\n:Default: 4\n:Examples: ``--itl-cols 1``\n-Specifies the number of columns used for the ``RAND_COL``, ``ROW_COL`` or ``COL_ROW`` interleavers.\n+Specifies the number of columns used for the ``RAND_COL``, ``ROW_COL`` or\n+``COL_ROW`` interleavers.\n.. _itl-itl-path:\n@@ -101,10 +114,9 @@ Specifies the path to the interleaver file (to use with ``USER`` interleaver).\n:Examples: ``--itl-read-order BOTTOM_LEFT``\nThe read order of the ``COL_ROW`` and ``ROW_COL`` interleavers.\n-The read starts from the given corner of the array to the diagonally opposite one.\n-The read is made row by row for the ``COL_ROW`` interleaver and column by column\n-for the ``ROW_COL`` one.\n-\n+The read starts from the given corner of the array to the diagonally opposite\n+one. The read is made row by row for the ``COL_ROW`` interleaver and column by\n+column for the ``ROW_COL`` one.\nDescription of the allowed values (see also the figures just bellow):\n@@ -121,20 +133,26 @@ Description of the allowed values (see also the figures just bellow):\n| ``BOTTOM_RIGHT`` | |itl-read-order_descr_bottom_right| |\n+------------------+-------------------------------------+\n-.. |itl-read-order_descr_top_left| replace:: Read is down from the top left corner to the bottom right corner\n-.. |itl-read-order_descr_top_right| replace:: Read is down from the top right corner to the bottom left corner\n-.. |itl-read-order_descr_bottom_left| replace:: Read is down from the bottom left corner to the top right corner\n-.. |itl-read-order_descr_bottom_right| replace:: Read is down from the bottom right corner to the top left corner\n+.. |itl-read-order_descr_top_left| replace:: Read is down from the top left\n+ corner to the bottom right corner\n+.. |itl-read-order_descr_top_right| replace:: Read is down from the top right\n+ corner to the bottom left corner\n+.. |itl-read-order_descr_bottom_left| replace:: Read is down from the bottom\n+ left corner to the top right corner\n+.. |itl-read-order_descr_bottom_right| replace:: Read is down from the bottom\n+ right corner to the top left corner\n-The following figure depicts the read order options on the ``COL_ROW`` interleaver:\n+The following figure depicts the read order options on the ``COL_ROW``\n+interleaver:\n.. figure:: images/schema_col_row_origin.png\n:align: center\n:scale: 50\n-The following figure depicts the read order options on the ``ROW_COL`` interleaver:\n+The following figure depicts the read order options on the ``ROW_COL``\n+interleaver:\n.. figure:: images/schema_col_row_origin.png\n:align: center\n@@ -146,6 +164,6 @@ The following figure depicts the read order options on the ``ROW_COL`` interleav\n``--itl-uni``\n\"\"\"\"\"\"\"\"\"\"\"\"\"\n-Enables the regeneration of the interleaver at *each new frame* else generate once\n-the LUT and use the same all along the simulation.\n+Enables the regeneration of the interleaver at *each new frame* else generate\n+once the LUT and use the same all along the simulation.\n"
}
] |
C++
|
MIT License
|
aff3ct/aff3ct
|
Doc: break the too long lines in itl parameters source file
|
8,483 |
13.11.2018 15:14:53
| -3,600 |
fdab40f5ef657e0d863e65664bf2b21ddaf5f67a
|
Doc : rescale interleaver figures
|
[
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/simulation/parameters/itl/itl.rst",
"new_path": "doc/sphinx/source/simulation/parameters/itl/itl.rst",
"diff": "@@ -150,7 +150,7 @@ interleaver:\n.. figure:: images/schema_col_row_origin.png\n:align: center\n- :scale: 50\n+ :scale: 60\nThe following figure depicts the read order options on the ``ROW_COL``\n@@ -158,7 +158,7 @@ interleaver:\n.. figure:: images/schema_col_row_origin.png\n:align: center\n- :scale: 50\n+ :scale: 60\n.. _itl-itl-uni:\n@@ -166,6 +166,6 @@ interleaver:\n``--itl-uni``\n\"\"\"\"\"\"\"\"\"\"\"\"\"\n-Enables the regeneration of the interleaver at *each new frame* else generate\n-once the LUT and use the same all along the simulation.\n+Enables the regeneration of the interleaver at *each new frame* else the LUT\n+is generated only once and is used all along the simulation.\n"
}
] |
C++
|
MIT License
|
aff3ct/aff3ct
|
Doc : rescale interleaver figures
|
8,483 |
13.11.2018 15:23:42
| -3,600 |
183eefe367cb74a4a6524327f4c074f31b1329a5
|
Doc: fill the source parameters.
|
[
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/simulation/parameters/src/src.rst",
"new_path": "doc/sphinx/source/simulation/parameters/src/src.rst",
"diff": "Source parameters\n-----------------\n+The source is the module at the beginning of the simulation chain as it\n+generates the frames that go through all the other modules.\n+It is at this step that you can set the number of frames that are simulated\n+jointly : this is called the *inter frame level*.\n+\n+.. note::\n+\n+ The inter frame level can be used in a multi user modulation (SCMA), or\n+ an inter frame SIMD optimization, for examples. It can also help to\n+ accelerate the simulation (for short frames) by letting each module working\n+ on more data at the same time instead of switching of module and memory zone\n+ more often.\n+\n+\n+.. _src-src-type:\n+\n+``--src-type``\n+\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n+\n+ :Type: text\n+ :Allowed values: ``AZCW`` ``RAND`` ``USER``\n+ :Default: ``RAND``\n+ :Examples: ``--src-type AZCW``\n+\n+Method used to generate the words.\n+``AZCW`` means *All Zero Code Word*.\n+\n+Description of the allowed values:\n+\n++----------+-----------------------+\n+| Value | Description |\n++==========+=======================+\n+| ``AZCW`` | |src-type_descr_azcw| |\n++----------+-----------------------+\n+| ``RAND`` | |src-type_descr_rand| |\n++----------+-----------------------+\n+| ``USER`` | |src-type_descr_user| |\n++----------+-----------------------+\n+\n+.. |src-type_descr_azcw| replace:: Generates only frames with all bits at 0.\n+.. |src-type_descr_rand| replace:: Randomly generates frames with an uniform\n+ distribution.\n+.. |src-type_descr_user| replace:: Reads in loop the frames from a given file through\n+ :ref:`src-src-path`.\n+\n.. _src-src-fra:\n``--src-fra, -F``\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n:Type: integer\n- :Examples: ``--src-fra 1``\n+ :Default: 1\n+ :Examples: ``--src-fra 8``\n-Set the number of inter frame level to process.\n+Sets the number of inter frame level to process.\n.. _src-src-implem:\n@@ -20,6 +66,7 @@ Set the number of inter frame level to process.\n:Type: text\n:Allowed values: ``FAST`` ``STD``\n+ :Default: ``STD``\n:Examples: ``--src-implem FAST``\nSelect the implementation of the algorithm to generate the information bits.\n@@ -29,13 +76,15 @@ Description of the allowed values:\n+----------+-------------------------+\n| Value | Description |\n+==========+=========================+\n-| ``FAST`` | |src-implem_descr_fast| |\n-+----------+-------------------------+\n| ``STD`` | |src-implem_descr_std| |\n+----------+-------------------------+\n+| ``FAST`` | |src-implem_descr_fast| |\n++----------+-------------------------+\n-.. |src-implem_descr_fast| replace:: TODO VALUE FAST\n-.. |src-implem_descr_std| replace:: TODO VALUE STD\n+.. |src-implem_descr_std| replace:: A standard implementation working for any\n+ source type.\n+.. |src-implem_descr_fast| replace:: A much faster method using SIMD but *only\n+ for* ``RAND`` *type*.\n.. _src-src-path:\n@@ -45,9 +94,10 @@ Description of the allowed values:\n:Type: file\n:Rights: read only\n- :Examples: ``--src-path example/path/to/the/right/file``\n+ :Examples: ``--src-path ../conf/src/GSM-LDPC_2112.src``\n-Path to a file containing one or a set of pre-computed source bits, to use with \"\\\\-\\\\-src-type USER\".\n+Path to a file containing one or a set of pre-computed source bits, to use\n+with a ``USER`` source type.\n.. _src-src-start-idx:\n@@ -55,35 +105,8 @@ Path to a file containing one or a set of pre-computed source bits, to use with\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n:Type: integer\n- :Examples: ``--src-start-idx 1``\n-\n-Start idx to use in the USER type source.\n-\n-.. _src-src-type:\n-\n-``--src-type``\n-\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n-\n- :Type: text\n- :Allowed values: ``AZCW`` ``RAND`` ``USER``\n- :Examples: ``--src-type AZCW``\n-\n-Method used to generate the codewords.\n-\n-Description of the allowed values:\n-\n-+----------+-----------------------+\n-| Value | Description |\n-+==========+=======================+\n-| ``AZCW`` | |src-type_descr_azcw| |\n-+----------+-----------------------+\n-| ``RAND`` | |src-type_descr_rand| |\n-+----------+-----------------------+\n-| ``USER`` | |src-type_descr_user| |\n-+----------+-----------------------+\n-\n-.. |src-type_descr_azcw| replace:: TODO VALUE AZCW\n-.. |src-type_descr_rand| replace:: TODO VALUE RAND\n-.. |src-type_descr_user| replace:: TODO VALUE USER\n-\n+ :Default: 0\n+ :Examples: ``--src-start-idx 42``\n+The start index to use in the ``USER`` type source. It is the index of the first\n+frame to read from the given file.\n"
}
] |
C++
|
MIT License
|
aff3ct/aff3ct
|
Doc: fill the source parameters.
|
8,483 |
13.11.2018 15:24:10
| -3,600 |
a76b82a35b403fa769bfbaa32481f122ac55e5b3
|
Doc: Add default values in CRC parameters.
|
[
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/simulation/parameters/crc/crc.rst",
"new_path": "doc/sphinx/source/simulation/parameters/crc/crc.rst",
"diff": "@@ -15,21 +15,24 @@ decoding process to know if the decoded codeword is valid or not.\nthe good one, it can be a *false positive*. It is important to\nadapt the size of the CRC with the frame size and the targeted FER.\n-.. _crc- --crc-poly:\n+.. _crc-crc-poly:\n``--crc-type, --crc-poly``\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n:Type: text\n+ :Default: ``NO``\n:Examples: | ``--crc-type \"32-GZIP\"``\n| ``--crc-poly \"0x04C11DB7\" --crc-size 32``\n-Select the CRC type you want to use among the predefined polynomials in the\n+Selects the CRC type you want to use among the predefined polynomials in the\nfollowing table. If you want a specific polynomial that it is not available in\nthe table you can directly put the polynomial in hexadecimal. In this case you\nhave to specify explicitly the size of the polynomial with the\n:ref:`crc-crc-size` parameter.\n+The type ``NO`` deactivates the CRC.\n+\n+-----------------+------------+------+\n| Type | Polynomial | Size |\n+=================+============+======+\n@@ -139,8 +142,8 @@ have to specify explicitly the size of the polynomial with the\n:Range: :math:`]0 \\to \\infty[`\n:Examples: ``--crc-size 8``\n-Size of the CRC (divisor size in bit -1), required if you selected an unknown\n-CRC.\n+Size of the CRC (divisor size in bits minus one), required if you selected an\n+unknown CRC.\n.. _crc-crc-implem:\n@@ -149,9 +152,10 @@ CRC.\n:Type: text\n:Allowed values: ``STD`` ``FAST`` ``INTER``\n+ :Default: ``FAST``\n:Examples: ``--crc-implem FAST``\n-Select the CRC implementation you want to use.\n+Selects the CRC implementation you want to use.\nDescription of the allowed values:\n"
}
] |
C++
|
MIT License
|
aff3ct/aff3ct
|
Doc: Add default values in CRC parameters.
|
8,483 |
13.11.2018 17:47:55
| -3,600 |
e8067dbac38b08d6c4180d7e93ea2082ff360bb8
|
Doc: fill the modem parameters.
|
[
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/simulation/parameters/mdm/mdm.rst",
"new_path": "doc/sphinx/source/simulation/parameters/mdm/mdm.rst",
"diff": "Modem parameters\n----------------\n+The Modem is a module with three parts in one:\n+ * the **modulation** maps the input binary frame into symbols to send through the\n+ channel\n+ * the **filtering** gives event probabilities to the received waveforms\n+ * the **demodulation** unmaps symbols and computes for every bit a Log-Likelihood\n+ Ratio (LLR)\n+\n+.. note:: The filtering step is used only by the ``CPM`` Modem.\n+\n+.. note:: A negative LLR represents a bit at 1, and therefore when positive a\n+ bit at 0.\n+\n+.. _mdm-mdm-type:\n+\n+``--mdm-type``\n+\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n+\n+ :Type: text\n+ :Allowed values: ``BPSK`` ``CPM`` ``OOK`` ``PAM`` ``PSK`` ``QAM`` ``SCMA``\n+ ``USER``\n+ :Default: ``BPSK``\n+ :Examples: ``--mdm-type SCMA``\n+\n+Type of the modulation to use in the simulation.\n+\n+Description of the allowed values:\n+\n++----------+-----------------------+\n+| Value | Description |\n++==========+=======================+\n+| ``BPSK`` | |mdm-type_descr_bpsk| |\n++----------+-----------------------+\n+| ``CPM`` | |mdm-type_descr_cpm| |\n++----------+-----------------------+\n+| ``OOK`` | |mdm-type_descr_ook| |\n++----------+-----------------------+\n+| ``PAM`` | |mdm-type_descr_pam| |\n++----------+-----------------------+\n+| ``PSK`` | |mdm-type_descr_psk| |\n++----------+-----------------------+\n+| ``QAM`` | |mdm-type_descr_qam| |\n++----------+-----------------------+\n+| ``SCMA`` | |mdm-type_descr_scma| |\n++----------+-----------------------+\n+| ``USER`` | |mdm-type_descr_user| |\n++----------+-----------------------+\n+\n+.. |mdm-type_descr_bpsk| replace:: The simple 2-PSK\n+.. |mdm-type_descr_cpm| replace:: The Continuous Phase Modulation\n+.. |mdm-type_descr_ook| replace:: The On-Off Keying\n+.. |mdm-type_descr_pam| replace:: The Pulse-Amplitude Modulation\n+.. |mdm-type_descr_psk| replace:: The Phase-Shift Keying\n+.. |mdm-type_descr_qam| replace:: The Quadrature-Amplitude Modulation\n+.. |mdm-type_descr_scma| replace:: The SubCarrier Multiple Access\n+.. |mdm-type_descr_user| replace:: A user defined constellation given through\n+ :ref:`mdm-mdm-const-path`\n+\n+\n.. _mdm-mdm-bps:\n``--mdm-bps``\n\"\"\"\"\"\"\"\"\"\"\"\"\"\n:Type: integer\n+ :Default: 1\n:Examples: ``--mdm-bps 1``\n-Select the number of bits per symbol (default is 1).\n+Selects the number of bits per symbol, ie. the number of bits used to generate a\n+symbol. You can't change this value for ``BPSK`` and ``OOK`` types as it is\n+forced to 1. Likewise, it is forced to 3 with ``SCMA``.\n.. _mdm-mdm-const-path:\n@@ -20,54 +81,105 @@ Select the number of bits per symbol (default is 1).\n:Type: file\n:Rights: read/write\n- :Examples: ``--mdm-const-path example/path/to/the/right/file``\n+ :Examples: ``--mdm-const-path ../conf/mod/16QAM_ANTI_GRAY.mod``\n-Path to the ordered modulation symbols (constellation), to use with \"\\\\-\\\\-mod-type USER\".\n+Path to the ordered modulation symbols (constellation), to use with ``USER``\n+type modulation\".\n-.. _mdm-mdm-cpm-k:\n+.. _mdm-mdm-ups:\n-``--mdm-cpm-k``\n-\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n+``--mdm-ups``\n+\"\"\"\"\"\"\"\"\"\"\"\"\"\n:Type: integer\n- :Examples: ``--mdm-cpm-k 1``\n+ :Default: 1\n+ :Examples: ``--mdm-ups 1``\n-Modulation index numerator (default is 1).\n+Selects the symbol sampling factor.\n-.. _mdm-mdm-cpm-L:\n+.. _mdm-mdm-implem:\n-``--mdm-cpm-L``\n-\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n+``--mdm-implem``\n+\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n- :Type: integer\n- :Examples: ``--mdm-cpm-L 1``\n+ :Type: text\n+ :Allowed values: ``FAST`` ``STD``\n+ :Examples: ``--mdm-implem FAST``\n-CPM pulse width or CPM memory (default is 2).\n+Select the implementation of the modem.\n-.. _mdm-mdm-cpm-map:\n+Description of the allowed values:\n-``--mdm-cpm-map``\n-\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n++----------+-------------------------+\n+| Value | Description |\n++==========+=========================+\n+| ``STD`` | |mdm-implem_descr_std| |\n++----------+-------------------------+\n+| ``FAST`` | |mdm-implem_descr_fast| |\n++----------+-------------------------+\n+\n+.. |mdm-implem_descr_std| replace:: A standard implementation working for any\n+ modem type.\n+.. |mdm-implem_descr_fast| replace:: A much faster method using SIMD but *only\n+ for* ``BPSK`` *type*.\n+\n+.. _mdm-mdm-max:\n+\n+``--mdm-max``\n+\"\"\"\"\"\"\"\"\"\"\"\"\"\n:Type: text\n- :Allowed values: ``GRAY`` ``NATURAL``\n- :Examples: ``--mdm-cpm-map GRAY``\n+ :Allowed values: ``MAX`` ``MAXL`` ``MAXS`` ``MAXSS``\n+ :Examples: ``--mdm-max MAX``\n-Symbols mapping layout (default is NATURAL).\n+Selects the mathematical form of the maximum operation applied in the ``PAM``'s,\n+``QAM``'s, ``PSK``'s, ``USER``'s and ``CPM``'s demodulator.\nDescription of the allowed values:\n-+-------------+-----------------------------+\n++-----------+-----------------------+\n| Value | Description |\n-+=============+=============================+\n-| ``GRAY`` | |mdm-cpm-map_descr_gray| |\n-+-------------+-----------------------------+\n-| ``NATURAL`` | |mdm-cpm-map_descr_natural| |\n-+-------------+-----------------------------+\n++===========+=======================+\n+| ``MAX`` | |mdm-max_descr_max| |\n++-----------+-----------------------+\n+| ``MAXL`` | |mdm-max_descr_maxl| |\n++-----------+-----------------------+\n+| ``MAXS`` | |mdm-max_descr_maxs| |\n++-----------+-----------------------+\n+| ``MAXSS`` | |mdm-max_descr_maxss| |\n++-----------+-----------------------+\n+\n+.. |mdm-max_descr_max| replace:: Standard MAX: :math:`\\max(a,b)`\n+.. |mdm-max_descr_maxl| replace:: Linear MAX: :math:`\\max(a,b) +\n+ \\max(0, 0.301 - (0.5 |a - b|))`\n+.. |mdm-max_descr_maxs| replace:: Star MAX: :math:`\\max(a,b) +\n+ \\log(1 + \\exp(-|a - b|))`\n+.. |mdm-max_descr_maxss| replace:: Safe Star MAX: :math:`\\max(a,b) + d` with\n+ :math:`d = \\begin{cases}\n+ 0 & \\quad \\text{if } d >= 37\\\\\n+ \\exp(-|a - b|) & \\quad \\text{if } 9 <= d < 37 \\\\\n+ \\log(1 + \\exp(-|a - b|)) & \\quad \\text{else}\n+ \\end{cases}`\n+\n+.. _mdm-mdm-no-sig2:\n+\n+``--mdm-no-sig2``\n+\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n-.. |mdm-cpm-map_descr_gray| replace:: TODO VALUE GRAY\n-.. |mdm-cpm-map_descr_natural| replace:: TODO VALUE NATURAL\n+Turn off the division by sigma square in the demodulator. Sigma is the Gaussian\n+noise variance.\n+\n+.. _mdm-mdm-cpm-k:\n+\n+``--mdm-cpm-k``\n+\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n+\n+ :Type: integer\n+ :Default: 1\n+ :Examples: ``--mdm-cpm-k 1``\n+\n+Sets the ``CPM``'s modulation index numerator.\n.. _mdm-mdm-cpm-p:\n@@ -75,30 +187,48 @@ Description of the allowed values:\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n:Type: integer\n+ :Default: 2\n:Examples: ``--mdm-cpm-p 1``\n-Modulation index denominator (default is 2).\n+Sets the ``CPM``'s modulation index denominator.\n-.. _mdm-mdm-cpm-std:\n+.. _mdm-mdm-cpm-L:\n-``--mdm-cpm-std``\n+``--mdm-cpm-L``\n+\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n+\n+ :Type: integer\n+ :Default: 2\n+ :Examples: ``--mdm-cpm-L 1``\n+\n+Sets the ``CPM``'s *pulse width* (also called *memory depth*).\n+\n+.. _mdm-mdm-cpm-map:\n+\n+``--mdm-cpm-map``\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n:Type: text\n- :Allowed values: ``GSM``\n- :Examples: ``--mdm-cpm-std GSM``\n+ :Allowed values: ``GRAY`` ``NATURAL``\n+ :Default: ``NATURAL``\n+ :Examples: ``--mdm-cpm-map GRAY``\n-The selection of a default CPM standard hardly implemented (any of those parameters is overwritten if the argument is given by the user).\n+Selects the ``CPM``'s symbols mapping layout.\nDescription of the allowed values:\n-+---------+-------------------------+\n++-------------+-----------------------------+\n| Value | Description |\n-+=========+=========================+\n-| ``GSM`` | |mdm-cpm-std_descr_gsm| |\n-+---------+-------------------------+\n++=============+=============================+\n+| ``GRAY`` | |mdm-cpm-map_descr_gray| |\n++-------------+-----------------------------+\n+| ``NATURAL`` | |mdm-cpm-map_descr_natural| |\n++-------------+-----------------------------+\n-.. |mdm-cpm-std_descr_gsm| replace:: TODO VALUE GSM\n+.. |mdm-cpm-map_descr_gray| replace:: Gray code that switches only one bit at\n+ a time from a symbol to the following.\n+.. |mdm-cpm-map_descr_natural| replace:: The natural binary code incrementing\n+ the value from a symbol to the next one.\n.. _mdm-mdm-cpm-ws:\n@@ -108,9 +238,10 @@ Description of the allowed values:\n:Type: text\n:Allowed values: ``GMSK`` ``RCOS`` ``REC``\n+ :Default: ``GMSK``\n:Examples: ``--mdm-cpm-ws GMSK``\n-Wave shape (default is GMSK).\n+Selects the ``CPM``'s wave shape.\nDescription of the allowed values:\n@@ -124,35 +255,36 @@ Description of the allowed values:\n| ``REC`` | |mdm-cpm-ws_descr_rec| |\n+----------+-------------------------+\n-.. |mdm-cpm-ws_descr_gmsk| replace:: TODO VALUE GMSK\n-.. |mdm-cpm-ws_descr_rcos| replace:: TODO VALUE RCOS\n-.. |mdm-cpm-ws_descr_rec| replace:: TODO VALUE REC\n+.. |mdm-cpm-ws_descr_gmsk| replace:: Gaussian Minimum Shift Keying\n+.. |mdm-cpm-ws_descr_rcos| replace:: Raised COSinus\n+.. |mdm-cpm-ws_descr_rec| replace:: RECtangular\n-.. _mdm-mdm-implem:\n+.. _mdm-mdm-cpm-std:\n-``--mdm-implem``\n-\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n+``--mdm-cpm-std``\n+\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n:Type: text\n- :Allowed values: ``FAST`` ``STD``\n- :Examples: ``--mdm-implem FAST``\n+ :Allowed values: ``GSM``\n+ :Examples: ``--mdm-cpm-std GSM``\n-Select the implementation of the modem.\n+The selection of a default ``CPM`` standard implemented in hard in the code (any\n+of these parameters can be overwritten by the other given arguments).\nDescription of the allowed values:\n-+----------+-------------------------+\n++---------+------------------------------------+\n| Value | Description |\n-+==========+=========================+\n-| ``FAST`` | |mdm-implem_descr_fast| |\n-+----------+-------------------------+\n-| ``STD`` | |mdm-implem_descr_std| |\n-+----------+-------------------------+\n-\n-.. |mdm-implem_descr_fast| replace:: TODO VALUE FAST\n-.. |mdm-implem_descr_std| replace:: TODO VALUE STD\n-\n++=========+====================================+\n+| ``GSM`` | | Modulation index numerator = 1 |\n+| | | Modulation index denominator = 2 |\n+| | | Memory depth = 3 |\n+| | | Bit per symbol = 1 |\n+| | | Sampling factor = 5 |\n+| | | Mapping layout = ``NATURAL`` |\n+| | | Wave shape = ``GMSK`` |\n++---------+------------------------------------+\n.. _mdm-mdm-ite:\n@@ -160,48 +292,10 @@ Description of the allowed values:\n\"\"\"\"\"\"\"\"\"\"\"\"\"\n:Type: integer\n- :Examples: ``--mdm-ite 1``\n-\n-Number of iteration in the demodulator.\n-\n-.. _mdm-mdm-max:\n-\n-``--mdm-max``\n-\"\"\"\"\"\"\"\"\"\"\"\"\"\n-\n- :Type: text\n- :Allowed values: ``MAX`` ``MAXL`` ``MAXS`` ``MAXSS``\n- :Examples: ``--mdm-max MAX``\n-\n-Select the type of the max operation to use in the demodulator.\n-\n-Description of the allowed values:\n-\n-+-----------+-----------------------+\n-| Value | Description |\n-+===========+=======================+\n-| ``MAX`` | |mdm-max_descr_max| |\n-+-----------+-----------------------+\n-| ``MAXL`` | |mdm-max_descr_maxl| |\n-+-----------+-----------------------+\n-| ``MAXS`` | |mdm-max_descr_maxs| |\n-+-----------+-----------------------+\n-| ``MAXSS`` | |mdm-max_descr_maxss| |\n-+-----------+-----------------------+\n-\n-.. |mdm-max_descr_max| replace:: TODO VALUE MAX\n-.. |mdm-max_descr_maxl| replace:: TODO VALUE MAXL\n-.. |mdm-max_descr_maxs| replace:: TODO VALUE MAXS\n-.. |mdm-max_descr_maxss| replace:: TODO VALUE MAXSS\n-\n-\n-.. _mdm-mdm-no-sig2:\n-\n-``--mdm-no-sig2``\n-\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n-\n+ :Default: 1\n+ :Examples: ``--mdm-ite 5``\n-Turn off the division by sigma square in the demodulator.\n+Sets the number of iteration in the ``SCMA``'s demodulator.\n.. _mdm-mdm-psi:\n@@ -212,7 +306,7 @@ Turn off the division by sigma square in the demodulator.\n:Allowed values: ``PSI0`` ``PSI1`` ``PSI2`` ``PSI3``\n:Examples: ``--mdm-psi PSI0``\n-Select the type of the psi function to use in the SCMA demodulator.\n+Selects the type of the psi function to use in the ``SCMA``'s demodulator.\nDescription of the allowed values:\n@@ -228,62 +322,15 @@ Description of the allowed values:\n| ``PSI3`` | |mdm-psi_descr_psi3| |\n+----------+----------------------+\n-.. |mdm-psi_descr_psi0| replace:: TODO VALUE PSI0\n-.. |mdm-psi_descr_psi1| replace:: TODO VALUE PSI1\n-.. |mdm-psi_descr_psi2| replace:: TODO VALUE PSI2\n-.. |mdm-psi_descr_psi3| replace:: TODO VALUE PSI3\n-\n-\n-.. _mdm-mdm-type:\n-\n-``--mdm-type``\n-\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n-\n- :Type: text\n- :Allowed values: ``BPSK`` ``CPM`` ``OOK`` ``PAM`` ``PSK`` ``QAM`` ``SCMA`` ``USER``\n- :Examples: ``--mdm-type BPSK``\n-\n-Type of the modulation to use in the simulation.\n-\n-Description of the allowed values:\n-\n-+----------+-----------------------+\n-| Value | Description |\n-+==========+=======================+\n-| ``BPSK`` | |mdm-type_descr_bpsk| |\n-+----------+-----------------------+\n-| ``CPM`` | |mdm-type_descr_cpm| |\n-+----------+-----------------------+\n-| ``OOK`` | |mdm-type_descr_ook| |\n-+----------+-----------------------+\n-| ``PAM`` | |mdm-type_descr_pam| |\n-+----------+-----------------------+\n-| ``PSK`` | |mdm-type_descr_psk| |\n-+----------+-----------------------+\n-| ``QAM`` | |mdm-type_descr_qam| |\n-+----------+-----------------------+\n-| ``SCMA`` | |mdm-type_descr_scma| |\n-+----------+-----------------------+\n-| ``USER`` | |mdm-type_descr_user| |\n-+----------+-----------------------+\n-\n-.. |mdm-type_descr_bpsk| replace:: TODO VALUE BPSK\n-.. |mdm-type_descr_cpm| replace:: TODO VALUE CPM\n-.. |mdm-type_descr_ook| replace:: TODO VALUE OOK\n-.. |mdm-type_descr_pam| replace:: TODO VALUE PAM\n-.. |mdm-type_descr_psk| replace:: TODO VALUE PSK\n-.. |mdm-type_descr_qam| replace:: TODO VALUE QAM\n-.. |mdm-type_descr_scma| replace:: TODO VALUE SCMA\n-.. |mdm-type_descr_user| replace:: TODO VALUE USER\n-\n-\n-.. _mdm-mdm-ups:\n-\n-``--mdm-ups``\n-\"\"\"\"\"\"\"\"\"\"\"\"\"\n-\n- :Type: integer\n- :Examples: ``--mdm-ups 1``\n+.. |mdm-psi_descr_psi0| replace:: :math:`\\exp\\left(-\\frac{|d|}{n0}\\right)`\n+.. |mdm-psi_descr_psi1| replace:: :math:`\\frac{1}{|d| + n0}`\n+.. |mdm-psi_descr_psi2| replace:: :math:`\\frac{1}{8. |d|^2 + n0}`\n+.. |mdm-psi_descr_psi3| replace:: :math:`\\frac{1}{4. |d|^2 + n0}`\n-Select the symbol sampling factor (default is 1).\n+Where |n0_equation|\n+.. |n0_equation| replace:: :math:`n0 =\n+ \\begin{cases}\n+ 1 & \\quad \\text{if sig2 disabled}\\\\\n+ 4 \\sigma^2 & \\quad \\text{else}\n+ \\end{cases}`\n\\ No newline at end of file\n"
}
] |
C++
|
MIT License
|
aff3ct/aff3ct
|
Doc: fill the modem parameters.
|
8,483 |
14.11.2018 10:51:34
| -3,600 |
9d608ec38dfbd95321d786e7d60757c2d7a14dea
|
Doc: Add figures numbers to the interleaver's figures.
|
[
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/conf.py",
"new_path": "doc/sphinx/source/conf.py",
"diff": "@@ -73,6 +73,9 @@ language = None\n# This pattern also affects html_static_path and html_extra_path.\nexclude_patterns = []\n+# Figures, tables and code-blocks are automatically numbered if they have a caption\n+numfig = True\n+\n# The name of the Pygments (syntax highlighting) style to use.\npygments_style = None\n"
},
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/simulation/parameters/itl/itl.rst",
"new_path": "doc/sphinx/source/simulation/parameters/itl/itl.rst",
"diff": "@@ -70,18 +70,20 @@ Description of the allowed values:\nindependent columns.\n.. |itl-type_descr_row_col| replace:: Fills the interleaver by row and read it\nby column.\n-.. |itl-type_descr_user| replace:: Uses the user's LUT given in the file.\n+.. |itl-type_descr_user| replace:: Uses the user's LUT given in the file\n+ through :ref:`itl-itl-path`.\n-The following figures :numref:`itl_figures_types` depict the behavior of the interleaver basic types:\n+The figure :numref:`itl_figures_types` depicts the behavior of the interleaver\n+basic types.\n.. _itl_figures_types:\n.. figure:: images/schema_itl_types.png\n:align: center\n- Interleaver basic types\n+ Interleaver basic types.\n.. seealso:: The :ref:`itl-itl-read-order` argument allows more options for the\n``COL_ROW`` and ``ROW_COL`` interleavers.\n@@ -149,21 +151,29 @@ Description of the allowed values (see also the figures just bellow):\nright corner to the top left corner\n-The following figure depicts the read order options on the ``COL_ROW``\n-interleaver:\n+The figure :numref:`itl_figures_order_col_row` depicts the read order options on\n+the ``COL_ROW`` interleaver.\n+\n+.. _itl_figures_order_col_row:\n.. figure:: images/schema_col_row_origin.png\n:align: center\n:scale: 60\n+ Interleaver read order for ``COL_ROW`` type.\n+\n-The following figure depicts the read order options on the ``ROW_COL``\n-interleaver:\n+The figure :numref:`itl_figures_order_row_col` depicts the read order options on\n+the ``ROW_COL`` interleaver.\n+\n+.. _itl_figures_order_row_col:\n.. figure:: images/schema_col_row_origin.png\n:align: center\n:scale: 60\n+ Interleaver read order for ``COL_ROW`` type.\n+\n.. _itl-itl-uni:\n"
}
] |
C++
|
MIT License
|
aff3ct/aff3ct
|
Doc: Add figures numbers to the interleaver's figures.
|
8,483 |
14.11.2018 11:39:06
| -3,600 |
1807417aebc5b175eec91d610d337ab82f038b3a
|
Doc: work on compilation page:
add min CMake version required note
Add -Ofast compile flag danger note.
fix spelling errors.
Use some sphinx's roles for files and urls.
|
[
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/compilation/compilation.rst",
"new_path": "doc/sphinx/source/compilation/compilation.rst",
"diff": "@@ -2,7 +2,7 @@ Compilation\n===========\n.. important:: If you do not plan to modify the AFF3CT source code and you want\n- to use the simulator as is, you can **download one of the lastest\n+ to use the simulator as is, you can **download one of the latest\nAFF3CT builds** from the\n`download page of the AFF3CT website <http://aff3ct.github.io/download.html>`_\nand skip this section.\n@@ -41,10 +41,13 @@ installation is over.\nsection.\n.. note:: On Windows, it is recommended to download a version of CMake with an\n- installer: it looks like ``cmake-x.x.x-win64-x64.msi``.\n+ installer: it looks like :program:`cmake-x.x.x-win64-x64.msi`.\n-.. warning:: It is recommended to add CMake to your system PATH during the\n+.. warning:: It is recommended to add CMake to your system *PATH* during the\ninstallation.\n+\n+.. danger:: AFF3CT needs at least the version **3.0.2**.\n+\n.. image:: images/cmake_path.png\n:align: center\n@@ -66,10 +69,10 @@ C++ GNU Compiler Installation\nWindows\n^^^^^^^\n-`Download the latest MinGW build from the official web page <https://sourceforge.net/projects/mingw-w64/>`_\n-(tested with `MinGW x86_64-6.2.0 <https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/6.2.0/threads-posix/seh/x86_64-6.2.0-release-posix-seh-rt_v5-rev1.7z>`_).\n-Unzip the archive. Copy the extracted ``mingw64`` folder in the\n-``C:\\Programs\\Git\\`` folder (erase all the duplicated files).\n+Download the latest MinGW build from the `official web page <https://sourceforge.net/projects/mingw-w64/>`_\n+(tested with :download:`MinGW x86_64-6.2.0 <https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/6.2.0/threads-posix/seh/x86_64-6.2.0-release-posix-seh-rt_v5-rev1.7z>`).\n+Unzip the archive. Copy the extracted :file:`mingw64` folder in the\n+:file:`C:\\\\Programs\\\\Git\\\\` folder (overwrite all the duplicated files).\n.. note:: We suppose that you have installed Git for Windows has explained in the\n:ref:`Git Installation on Windows <source_code-git_installation-windows>`\n@@ -194,7 +197,7 @@ start the compilation.\n:align: center\nOnce AFF3CT is compiled you can browse the build by right clicking on\n-``CMakeList.txt`` > ``Cache`` > ``Open Cache Foler``.\n+``CMakeList.txt`` > ``Cache`` > ``Open Cache Folder``.\n.. image:: images/vs17_cache_folder.png\n:align: center\n@@ -303,12 +306,17 @@ variable can get. For instance, to compile in release mode:\ncompiler, if ``CMAKE_BUILD_TYPE`` is set to ``Release``, the code will\nbe compiled with the ``-O3`` flag.\n+.. important:: We have noticed numerical stability issues when compiling with\n+ ``-Ofast`` flag. So the ``-O3`` flag is recommend to compile with the\n+ best optimizations.\n+\n+\n.. note:: If you need to develop in AFF3CT it is recommended to compile\n- in the ``Debug`` mode during the development process to add the debug\n- symbols in the binary files. It will certainly ease the debug process\n- but be careful, the execution speed will be seriously affected in this\n- mode, be sure to switch to the ``Release`` mode when the code is\n- stable.\n+ in the ``Debug`` mode (or eventually ``RelWithDebInfo`` mode) during\n+ the development process to add the debug symbols in the binary files.\n+ It will certainly ease the debug process but be careful, the execution\n+ speed will be seriously affected in this mode, be sure to switch to\n+ the ``Release`` mode when the code is stable.\n.. note:: In Visual Studio solutions, the ``CMAKE_BUILD_TYPE`` built-in\nvariable has no effect and the build type is directly managed by\n@@ -324,8 +332,8 @@ CMake has a built-in variable you can set to specify the compiler options:\ncmake .. -DCMAKE_CXX_FLAGS=\"-funroll-loops -march=native\"\n-Many parts of the AFF3CT code use the **SIMD** (Single Instruction Multiple\n-Data) parallelism and this type of instructions often requires additional\n+Many parts of the AFF3CT code use the :abbr:`SIMD (Single Instruction Multiple\n+Data)` parallelism and this type of instructions often requires additional\ncompiler options to be enabled:\n+-------------------+-------------------+\n"
}
] |
C++
|
MIT License
|
aff3ct/aff3ct
|
Doc: work on compilation page:
add min CMake version required note
Add -Ofast compile flag danger note.
fix spelling errors.
Use some sphinx's roles for files and urls.
|
8,483 |
14.11.2018 11:47:00
| -3,600 |
a6ca69c50a3f9486378045b717d40c3e915631cf
|
Doc: Add links to wikipedia for modulation types.
|
[
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/simulation/parameters/mdm/mdm.rst",
"new_path": "doc/sphinx/source/simulation/parameters/mdm/mdm.rst",
"diff": "@@ -4,16 +4,19 @@ Modem parameters\n----------------\nThe Modem is a module with three parts in one:\n- * the **modulation** maps the input binary frame into symbols to send through the\n- channel\n+ * the **modulation** maps the input binary frame into symbols to send the\n+ data through the channel\n* the **filtering** gives event probabilities to the received waveforms\n- * the **demodulation** unmaps symbols and computes for every bit a Log-Likelihood\n- Ratio (LLR)\n+ * the **demodulation** unmaps symbols or waveforms and computes for every bit\n+ a :abbr:`LLR (Log-Likelihood Ratio)`\n-.. note:: The filtering step is used only by the ``CPM`` Modem.\n+.. note:: The filtering step is used only by the ``CPM`` Modem as it is the only\n+ AFF3CT's modulation using waveforms.\n.. note:: A negative LLR represents a bit at 1, and therefore when positive a\n- bit at 0.\n+ bit at 0. It is a more convenient choice as the hard decision matches\n+ directly with the sign bit.\n+\n.. _mdm-mdm-type:\n@@ -50,15 +53,23 @@ Description of the allowed values:\n| ``USER`` | |mdm-type_descr_user| |\n+----------+-----------------------+\n-.. |mdm-type_descr_bpsk| replace:: The simple 2-PSK\n-.. |mdm-type_descr_cpm| replace:: The Continuous Phase Modulation\n-.. |mdm-type_descr_ook| replace:: The On-Off Keying\n-.. |mdm-type_descr_pam| replace:: The Pulse-Amplitude Modulation\n-.. |mdm-type_descr_psk| replace:: The Phase-Shift Keying\n-.. |mdm-type_descr_qam| replace:: The Quadrature-Amplitude Modulation\n-.. |mdm-type_descr_scma| replace:: The SubCarrier Multiple Access\n-.. |mdm-type_descr_user| replace:: A user defined constellation given through\n- :ref:`mdm-mdm-const-path`\n+.. _Continuous Phase Modulation: https://en.wikipedia.org/wiki/Continuous_phase_modulation\n+.. _On-Off Keying: https://en.wikipedia.org/wiki/On-off_keying\n+.. _Pulse-Amplitude Modulation: https://en.wikipedia.org/wiki/Pulse-Amplitude_Modulation\n+.. _Phase-Shift Keying: https://en.wikipedia.org/wiki/Phase-shift_keying\n+.. _Quadrature-Amplitude Modulation: https://en.wikipedia.org/wiki/Quadrature_amplitude_modulation\n+.. _SubCarrier Multiple Access: https://en.wikipedia.org/wiki/Subcarrier_multiplexing\n+\n+.. |mdm-type_descr_bpsk| replace:: The simple 2-PSK that has an optimized\n+ implementation\n+.. |mdm-type_descr_cpm| replace:: The `Continuous Phase Modulation`_\n+.. |mdm-type_descr_ook| replace:: The `On-Off Keying`_\n+.. |mdm-type_descr_pam| replace:: The `Pulse-Amplitude Modulation`_\n+.. |mdm-type_descr_psk| replace:: The `Phase-Shift Keying`_\n+.. |mdm-type_descr_qam| replace:: The `Quadrature-Amplitude Modulation`_\n+.. |mdm-type_descr_scma| replace:: The `SubCarrier Multiple Access`_\n+.. |mdm-type_descr_user| replace:: A user defined constellation given in a file\n+ through :ref:`mdm-mdm-const-path`\n.. _mdm-mdm-bps:\n@@ -255,7 +266,9 @@ Description of the allowed values:\n| ``REC`` | |mdm-cpm-ws_descr_rec| |\n+----------+-------------------------+\n-.. |mdm-cpm-ws_descr_gmsk| replace:: Gaussian Minimum Shift Keying\n+.. _Gaussian Minimum Shift Keying: https://en.wikipedia.org/wiki/Minimum-shift_keying#Gaussian_minimum-shift_keying\n+\n+.. |mdm-cpm-ws_descr_gmsk| replace:: `Gaussian Minimum Shift Keying`_\n.. |mdm-cpm-ws_descr_rcos| replace:: Raised COSinus\n.. |mdm-cpm-ws_descr_rec| replace:: RECtangular\n"
}
] |
C++
|
MIT License
|
aff3ct/aff3ct
|
Doc: Add links to wikipedia for modulation types.
|
8,483 |
14.11.2018 11:54:58
| -3,600 |
60ff03b8c3c52476576054817b593050d80d3a31
|
Add SIMD as an abbreviation for all files and use it everywhere.
|
[
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/compilation/compilation.rst",
"new_path": "doc/sphinx/source/compilation/compilation.rst",
"diff": "@@ -332,7 +332,7 @@ CMake has a built-in variable you can set to specify the compiler options:\ncmake .. -DCMAKE_CXX_FLAGS=\"-funroll-loops -march=native\"\n-Many parts of the AFF3CT code use the :abbr:`SIMD (Single Instruction Multiple\n+Many parts of the AFF3CT code use the |SIMD|\nData)` parallelism and this type of instructions often requires additional\ncompiler options to be enabled:\n"
},
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/conf.py",
"new_path": "doc/sphinx/source/conf.py",
"diff": "@@ -234,6 +234,8 @@ rst_epilog = \"\"\"\n:height: 25px\n+.. |SIMD| replace:: :abbr:`SIMD (Single Instruction Multiple Data)`\n+\n\"\"\"\n# -- Extension configuration -------------------------------------------------\n\\ No newline at end of file\n"
},
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/simulation/parameters/cdc/cdc_ldpc/dec.rst",
"new_path": "doc/sphinx/source/simulation/parameters/cdc/cdc_ldpc/dec.rst",
"diff": "@@ -194,7 +194,7 @@ Offset used in the offset min-sum BP algorithm (works only with \"\\\\-\\\\-dec-imple\n:Allowed values: ``INTER``\n:Examples: ``--dec-simd INTER``\n-The SIMD strategy you want to use.\n+The |SIMD| strategy you want to use.\nDescription of the allowed values:\n"
},
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/simulation/parameters/cdc/cdc_turbo/dec.rst",
"new_path": "doc/sphinx/source/simulation/parameters/cdc/cdc_turbo/dec.rst",
"diff": "@@ -248,7 +248,7 @@ Description of the allowed values:\n:Allowed values: ``INTER`` ``INTRA``\n:Examples: ``--dec-sub-simd INTER``\n-The SIMD strategy you want to use.\n+The |SIMD| strategy you want to use.\nDescription of the allowed values:\n"
},
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/simulation/parameters/mdm/mdm.rst",
"new_path": "doc/sphinx/source/simulation/parameters/mdm/mdm.rst",
"diff": "@@ -131,7 +131,7 @@ Description of the allowed values:\n.. |mdm-implem_descr_std| replace:: A standard implementation working for any\nmodem type.\n-.. |mdm-implem_descr_fast| replace:: A much faster method using SIMD but *only\n+.. |mdm-implem_descr_fast| replace:: A much faster method using |SIMD| but *only\nfor* ``BPSK`` *type*.\n.. _mdm-mdm-max:\n"
},
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/simulation/parameters/src/src.rst",
"new_path": "doc/sphinx/source/simulation/parameters/src/src.rst",
"diff": "@@ -11,7 +11,7 @@ jointly : this is called the *inter frame level*.\n.. note::\nThe inter frame level can be used in a multi user modulation (SCMA), or\n- an inter frame SIMD optimization, for examples. It can also help to\n+ an inter frame |SIMD| optimization, for examples. It can also help to\naccelerate the simulation (for short frames) by letting each module working\non more data at the same time instead of switching of module and memory zone\nmore often.\n@@ -83,7 +83,7 @@ Description of the allowed values:\n.. |src-implem_descr_std| replace:: A standard implementation working for any\nsource type.\n-.. |src-implem_descr_fast| replace:: A much faster method using SIMD but *only\n+.. |src-implem_descr_fast| replace:: A much faster method using |SIMD| but *only\nfor* ``RAND`` *type*.\n"
}
] |
C++
|
MIT License
|
aff3ct/aff3ct
|
Add SIMD as an abbreviation for all files and use it everywhere.
|
8,483 |
14.11.2018 16:18:33
| -3,600 |
b973fe143898efcafe903b7286d54d926ed37289
|
Doc: Fix wrong text.
|
[
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/compilation/compilation.rst",
"new_path": "doc/sphinx/source/compilation/compilation.rst",
"diff": "@@ -332,9 +332,8 @@ CMake has a built-in variable you can set to specify the compiler options:\ncmake .. -DCMAKE_CXX_FLAGS=\"-funroll-loops -march=native\"\n-Many parts of the AFF3CT code use the |SIMD|\n-Data)` parallelism and this type of instructions often requires additional\n-compiler options to be enabled:\n+Many parts of the AFF3CT code use the |SIMD| parallelism and this type of\n+instructions often requires additional compiler options to be enabled:\n+-------------------+-------------------+\n| Option | Description |\n"
}
] |
C++
|
MIT License
|
aff3ct/aff3ct
|
Doc: Fix wrong text.
|
8,483 |
14.11.2018 16:18:59
| -3,600 |
91c7d30a49666335bf2861376a97bbe9d19d95cb
|
Doc: add SIMD replace directive in decoder.
|
[
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/simulation/parameters/cdc/cdc_polar/dec.rst",
"new_path": "doc/sphinx/source/simulation/parameters/cdc/cdc_polar/dec.rst",
"diff": "@@ -93,7 +93,7 @@ The type of nodes you want to detect in the Polar tree (ex: \"{R0,R1,R0L,REP_2-8,\n:Allowed values: ``INTER`` ``INTRA``\n:Examples: ``--dec-simd INTER``\n-The SIMD strategy you want to use.\n+The |SIMD| strategy you want to use.\nDescription of the allowed values:\n"
},
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/simulation/parameters/cdc/cdc_rsc/dec.rst",
"new_path": "doc/sphinx/source/simulation/parameters/cdc/cdc_rsc/dec.rst",
"diff": "@@ -92,7 +92,7 @@ Description of the allowed values:\n:Allowed values: ``INTER`` ``INTRA``\n:Examples: ``--dec-simd INTER``\n-The SIMD strategy you want to use.\n+The |SIMD| strategy you want to use.\nDescription of the allowed values:\n"
}
] |
C++
|
MIT License
|
aff3ct/aff3ct
|
Doc: add SIMD replace directive in decoder.
|
8,483 |
14.11.2018 16:19:25
| -3,600 |
f536af77faf5a1c03fe39f331959f43805e7676d
|
Doc: Add todo list in modem parameters.
|
[
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/simulation/parameters/mdm/mdm.rst",
"new_path": "doc/sphinx/source/simulation/parameters/mdm/mdm.rst",
"diff": "@@ -72,6 +72,9 @@ Description of the allowed values:\nthrough :ref:`mdm-mdm-const-path`\n+.. TODO: describe completely the implemented models, such as the constellation\n+ mapping (ex: PSK has always GRAY mapping) or what is done if sig2 is disabled.\n+\n.. _mdm-mdm-bps:\n``--mdm-bps``\n"
}
] |
C++
|
MIT License
|
aff3ct/aff3ct
|
Doc: Add todo list in modem parameters.
|
8,483 |
14.11.2018 17:31:26
| -3,600 |
9605ca43ccd444fd36c196446adc4b030f85e24b
|
Fix channel path argument open mode to read mode only
|
[
{
"change_type": "MODIFY",
"old_path": "src/Factory/Module/Channel/Channel.cpp",
"new_path": "src/Factory/Module/Channel/Channel.cpp",
"diff": "@@ -83,8 +83,9 @@ void Channel::parameters\nargs.add(\n{p+\"-path\"},\n- tools::File(tools::openmode::read_write),\n- \"path to a noisy file, to use with \\\"--chn-type USER,OPTICAL\\\" or to a gain file (used with \\\"--chn-type RAYLEIGH_USER\\\").\");\n+ tools::File(tools::openmode::read),\n+ \"path to a noisy file, to use with \\\"--chn-type USER or USER_ADD\\\" or to a gain file\"\n+ \" (used with \\\"--chn-type RAYLEIGH_USER\\\").\");\nargs.add(\n{p+\"-blk-fad\"},\n"
}
] |
C++
|
MIT License
|
aff3ct/aff3ct
|
Fix channel path argument open mode to read mode only
|
8,483 |
14.11.2018 17:32:08
| -3,600 |
905d6fc464d0f11f326ac106c76fd89979abe3aa
|
Doc: Complete the channel parameters.
|
[
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/compilation/compilation.rst",
"new_path": "doc/sphinx/source/compilation/compilation.rst",
"diff": "@@ -223,6 +223,8 @@ is the location of Visual Studio on your system):\ndevenv /build Release aff3ct.sln\n+.. _compilation_cmake_options:\n+\nCMake Options\n-------------\n"
},
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/simulation/parameters/chn/chn.rst",
"new_path": "doc/sphinx/source/simulation/parameters/chn/chn.rst",
"diff": "Channel parameters\n------------------\n-.. _chn-chn-blk-fad:\n+The channel is the representation of the physical space in which data are\n+transmitted. This operation corrupts the information, hence the origin of the\n+error-correcting codes.\n-``--chn-blk-fad``\n-\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n+.. TODO : Add_user on all channels ? For complex numbers, real / imag part independent ?\n+\n+.. _chn-chn-type:\n+\n+``--chn-type``\n+\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n:Type: text\n- :Allowed values: ``FRAME`` ``NO`` ``ONETAP``\n- :Examples: ``--chn-blk-fad FRAME``\n+ :Allowed values: ``AWGN`` ``BEC`` ``BSC`` ``NO`` ``OPTICAL`` ``RAYLEIGH``\n+ ``RAYLEIGH_USER`` ``USER`` ``USER_ADD``\n+ :Default: ``AWGN``\n+ :Examples: ``--chn-type AWGN``\n-Block fading policy for the RAYLEIGH channel.\n+Type of the channel to use in the simulation ('USER' has an output got from a file when 'USER_ADD' has an additive noise got from a file).\nDescription of the allowed values:\n-+------------+----------------------------+\n++-------------------+--------------------------------+\n| Value | Description |\n-+============+============================+\n-| ``FRAME`` | |chn-blk-fad_descr_frame| |\n-+------------+----------------------------+\n-| ``NO`` | |chn-blk-fad_descr_no| |\n-+------------+----------------------------+\n-| ``ONETAP`` | |chn-blk-fad_descr_onetap| |\n-+------------+----------------------------+\n++===================+================================+\n+| ``AWGN`` | |chn-type_descr_awgn| |\n++-------------------+--------------------------------+\n+| ``BEC`` | |chn-type_descr_bec| |\n++-------------------+--------------------------------+\n+| ``BSC`` | |chn-type_descr_bsc| |\n++-------------------+--------------------------------+\n+| ``NO`` | |chn-type_descr_no| |\n++-------------------+--------------------------------+\n+| ``OPTICAL`` | |chn-type_descr_optical| |\n++-------------------+--------------------------------+\n+| ``RAYLEIGH`` | |chn-type_descr_rayleigh| |\n++-------------------+--------------------------------+\n+| ``RAYLEIGH_USER`` | |chn-type_descr_rayleigh_user| |\n++-------------------+--------------------------------+\n+| ``USER`` | |chn-type_descr_user| |\n++-------------------+--------------------------------+\n+| ``USER_ADD`` | |chn-type_descr_user_add| |\n++-------------------+--------------------------------+\n-.. |chn-blk-fad_descr_frame| replace:: TODO VALUE FRAME\n-.. |chn-blk-fad_descr_no| replace:: TODO VALUE NO\n-.. |chn-blk-fad_descr_onetap| replace:: TODO VALUE ONETAP\n+.. _Additive White Gaussian Noise: https://en.wikipedia.org/wiki/Additive_white_Gaussian_noise\n+.. _Binary Erasure Channel: https://en.wikipedia.org/wiki/Binary_erasure_channel\n+.. _Binary Symmetric Channel: https://en.wikipedia.org/wiki/Binary_symmetric_channel\n+.. _Rayleigh Fading: https://en.wikipedia.org/wiki/Rayleigh_fading\n-.. _chn-chn-gain-occur:\n+.. |chn-type_descr_awgn| replace:: The `Additive White Gaussian Noise`_\n+ channel: :math:`Y = X + N_G \\text{ with } N_G \\sim \\mathcal{N}(0,\\sigma)`\n-``--chn-gain-occur``\n-\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n+.. |chn-type_descr_bec| replace:: The `Binary Erasure Channel`_\n+ :math:`Y_i = \\begin{cases}\n+ erased & \\quad \\text{with a probability of } p_e \\\\\n+ X_i & \\quad \\text{else}\n+ \\end{cases}`\n- :Type: integer\n- :Examples: ``--chn-gain-occur 1``\n+.. |chn-type_descr_bsc| replace:: The `Binary Symmetric Channel`_\n+ :math:`Y_i = \\begin{cases}\n+ !X_i & \\quad \\text{with a probability of } p_e \\\\\n+ X_i & \\quad \\text{else}\n+ \\end{cases}`\n+\n+.. |chn-type_descr_no| replace:: The perfect channel: :math:`Y = X`\n+\n+.. |chn-type_descr_optical| replace:: The optical channel: :math:`Y_i =\n+ \\begin{cases}\n+ CDF_0(x) & \\quad \\text{ when } X_i = 0 \\\\\n+ CDF_1(x) & \\quad \\text{ when } X_i = 1\n+ \\end{cases} \\text{ with } x \\sim \\mathcal{U}(0,1)`\n+\n+.. |chn-type_descr_rayleigh| replace:: The `Rayleigh Fading`_ channel with\n+ an AWGN gain: :math:`Y = X.H_G + N_G \\text{ with }\n+ N_G \\sim \\mathcal{N}(0,\\sigma) \\text{ and }\n+ H_G \\sim \\mathcal{N}(0,\\frac{1}{\\sqrt(2)})`\n+\n+.. |chn-type_descr_rayleigh_user| replace:: The Rayleigh Fading channel with\n+ the gain given in a file: :math:`Y = X.H + N_G\n+ \\text{ with } N_G \\sim \\mathcal{N}(0,\\sigma) \\text{ and }\n+ H \\text{ given by the user}`\n+\n+.. |chn-type_descr_user| replace:: A channel with a user defined\n+ **output** given in a file: :math:`Y = Z\n+ \\text{ with } Z \\text{ given by the user}`\n+\n+.. |chn-type_descr_user_add| replace:: A channel with a user defined\n+ **additive noise** given in a file: :math:`Y = X +\n+ Z \\text{ with } Z \\text{ given by the user}`\n+\n+\n+.. note:: The ``AWGN``, ``NO`` and ``RAYLEIGH`` channels handle\n+ complex modulations.\n+\n+.. note:: The ``BEC``, ``BSC`` and ``OPTICAL`` channels work only with ``OOK``\n+ modulation.\n+\n+.. note:: The :abbr:`CDF (Cumulative Distribution Function)` for the ``OPTICAL``\n+ channel is given with the :ref:`sim-sim-pdf-path` argument. This file\n+ describes the :abbr:`PDF (Probability Density Function)` of the\n+ :abbr:`ROP (Received Optical Power)` at different value for a bit transmitted\n+ at 0 and another for a bit transmitted at 1. So this file contains twice as\n+ many PDF as ROP to test.\n-The number of times a gain is used on consecutive symbols (used with \"\\\\-\\\\-chn-type RAYLEIGH_USER\").\n.. _chn-chn-implem:\n@@ -47,24 +114,57 @@ The number of times a gain is used on consecutive symbols (used with \"\\\\-\\\\-chn-\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n:Type: text\n- :Allowed values: ``FAST`` ``STD``\n+ :Allowed values: ``FAST`` ``STD`` ``GSL`` ``MKL``\n+ :Default: ``STD``\n:Examples: ``--chn-implem FAST``\n-Select the implementation of the algorithm to generate noise.\n+Selects the implementation of the algorithm to generate the noise.\nDescription of the allowed values:\n+----------+-------------------------+\n| Value | Description |\n+==========+=========================+\n+| ``STD`` | |chn-implem_descr_std| |\n++----------+-------------------------+\n| ``FAST`` | |chn-implem_descr_fast| |\n+----------+-------------------------+\n-| ``STD`` | |chn-implem_descr_std| |\n+| ``GSL`` | |chn-implem_descr_gsl| |\n++----------+-------------------------+\n+| ``MKL`` | |chn-implem_descr_mkl| |\n+----------+-------------------------+\n-.. |chn-implem_descr_fast| replace:: TODO VALUE FAST\n-.. |chn-implem_descr_std| replace:: TODO VALUE STD\n+.. _GNU Scientific Library: https://www.gnu.org/software/gsl/\n+.. _Intel Math Kernel Library: https://software.intel.com/en-us/mkl\n+\n+.. |chn-implem_descr_std| replace:: A standard implementation.\n+\n+.. |chn-implem_descr_fast| replace:: A much faster method using |SIMD|.\n+\n+.. |chn-implem_descr_gsl| replace:: A method using the\n+ `GNU Scientific Library`_\n+\n+.. |chn-implem_descr_mkl| replace:: A method using the\n+ `Intel Math Kernel Library`_\n+\n+.. attention:: All channels work with any implementation. However, to activate\n+ the ``GSL`` or the ``MKL`` implementation you need to\n+ compile with the good options (see :ref:`compilation_cmake_options`).\n+\n+.. TODO : add a comparative table of the implems\n+\n+\n+.. _chn-chn-gain-occur:\n+\n+``--chn-gain-occur``\n+\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n+\n+ :Type: integer\n+ :Default: 1\n+ :Examples: ``--chn-gain-occur 10``\n+The number of times a gain is used on consecutive symbols. It is used in the\n+``RAYLEIGH_USER`` channel while applying gains read from the given file.\n.. _chn-chn-path:\n@@ -72,54 +172,38 @@ Description of the allowed values:\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n:Type: file\n- :Rights: read/write\n+ :Rights: read\n:Examples: ``--chn-path example/path/to/the/right/file``\n-Path to a noisy file, to use with \"\\\\-\\\\-chn-type USER,OPTICAL\" or to a gain file (used with \"\\\\-\\\\-chn-type RAYLEIGH_USER\").\n+For ``USER`` type, the file must contain noisy output values.\n+For ``USER_ADD`` type, the file must contain noise values to add to input.\n+For ``RAYLEIGH_USER`` type, the file must contain gain values.\n+See :ref:`chn-chn-type` for more details.\n-.. _chn-chn-type:\n+.. TODO Block fading is unused !!!\n+ .. _chn-chn-blk-fad:\n-``--chn-type``\n-\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n+ ``--chn-blk-fad``\n+ \"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n:Type: text\n- :Allowed values: ``AWGN`` ``BEC`` ``BSC`` ``NO`` ``OPTICAL`` ``RAYLEIGH`` ``RAYLEIGH_USER`` ``USER`` ``USER_ADD``\n- :Examples: ``--chn-type AWGN``\n+ :Allowed values: ``FRAME`` ``NO`` ``ONETAP``\n+ :Examples: ``--chn-blk-fad FRAME``\n-Type of the channel to use in the simulation ('USER' has an output got from a file when 'USER_ADD' has an additive noise got from a file).\n+ Block fading policy for the RAYLEIGH channel.\nDescription of the allowed values:\n-+-------------------+--------------------------------+\n+ +------------+----------------------------+\n| Value | Description |\n-+===================+================================+\n-| ``AWGN`` | |chn-type_descr_awgn| |\n-+-------------------+--------------------------------+\n-| ``BEC`` | |chn-type_descr_bec| |\n-+-------------------+--------------------------------+\n-| ``BSC`` | |chn-type_descr_bsc| |\n-+-------------------+--------------------------------+\n-| ``NO`` | |chn-type_descr_no| |\n-+-------------------+--------------------------------+\n-| ``OPTICAL`` | |chn-type_descr_optical| |\n-+-------------------+--------------------------------+\n-| ``RAYLEIGH`` | |chn-type_descr_rayleigh| |\n-+-------------------+--------------------------------+\n-| ``RAYLEIGH_USER`` | |chn-type_descr_rayleigh_user| |\n-+-------------------+--------------------------------+\n-| ``USER`` | |chn-type_descr_user| |\n-+-------------------+--------------------------------+\n-| ``USER_ADD`` | |chn-type_descr_user_add| |\n-+-------------------+--------------------------------+\n-\n-.. |chn-type_descr_awgn| replace:: TODO VALUE AWGN\n-.. |chn-type_descr_bec| replace:: TODO VALUE BEC\n-.. |chn-type_descr_bsc| replace:: TODO VALUE BSC\n-.. |chn-type_descr_no| replace:: TODO VALUE NO\n-.. |chn-type_descr_optical| replace:: TODO VALUE OPTICAL\n-.. |chn-type_descr_rayleigh| replace:: TODO VALUE RAYLEIGH\n-.. |chn-type_descr_rayleigh_user| replace:: TODO VALUE RAYLEIGH_USER\n-.. |chn-type_descr_user| replace:: TODO VALUE USER\n-.. |chn-type_descr_user_add| replace:: TODO VALUE USER_ADD\n-\n+ +============+============================+\n+ | ``FRAME`` | |chn-blk-fad_descr_frame| |\n+ +------------+----------------------------+\n+ | ``NO`` | |chn-blk-fad_descr_no| |\n+ +------------+----------------------------+\n+ | ``ONETAP`` | |chn-blk-fad_descr_onetap| |\n+ +------------+----------------------------+\n+ .. |chn-blk-fad_descr_frame| replace:: TODO VALUE FRAME\n+ .. |chn-blk-fad_descr_no| replace:: TODO VALUE NO\n+ .. |chn-blk-fad_descr_onetap| replace:: TODO VALUE ONETAP\n"
},
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/simulation/parameters/mdm/mdm.rst",
"new_path": "doc/sphinx/source/simulation/parameters/mdm/mdm.rst",
"diff": "@@ -74,6 +74,7 @@ Description of the allowed values:\n.. TODO: describe completely the implemented models, such as the constellation\nmapping (ex: PSK has always GRAY mapping) or what is done if sig2 is disabled.\n+ Describe the different demodulator of OOK when AWGN, optical, BSC, BEC\n.. _mdm-mdm-bps:\n"
}
] |
C++
|
MIT License
|
aff3ct/aff3ct
|
Doc: Complete the channel parameters.
|
8,483 |
15.11.2018 11:04:03
| -3,600 |
2ff56de2b27e8f7ae4e43c68b1942f0b0bfa8960
|
Doc: Add tables to compare implem speed on AWGN, BEC and OPTICAL channels
|
[
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/simulation/parameters/chn/chn.rst",
"new_path": "doc/sphinx/source/simulation/parameters/chn/chn.rst",
"diff": "@@ -142,17 +142,46 @@ Description of the allowed values:\n.. |chn-implem_descr_fast| replace:: A much faster method using |SIMD|.\n.. |chn-implem_descr_gsl| replace:: A method using the\n- `GNU Scientific Library`_\n+ `GNU Scientific Library`_ that is not necessary really fast.\n.. |chn-implem_descr_mkl| replace:: A method using the\n- `Intel Math Kernel Library`_\n+ `Intel Math Kernel Library`_ optimized on Intel processors.\n.. attention:: All channels work with any implementation. However, to activate\nthe ``GSL`` or the ``MKL`` implementation you need to\ncompile with the good options (see :ref:`compilation_cmake_options`).\n-.. TODO : add a comparative table of the implems\n+Numbers on :numref:`table_implem_awgn`, :numref:`table_implem_bec` and\n+:numref:`table_implem_optical` show the throughput of the channels on\n+the different implementations in function of the frame size. The conditions of\n+the experiment were an ``UNCODED`` simulation on 8 threads during 10 seconds per\n+measurement on an *Intel(R) Xeon(R) CPU E3-1270 v5 @ 3.60GHz*.\n+To measure throughput AFF3CT uses an internal tool that can be activated with\n+the :ref:`sim-sim-stats` option flag. Numbers on those tables were read on the\n+*Average* column of the *add_noise* task of the *Channel* module.\n+\n+\n+.. _table_implem_awgn:\n+\n+.. csv-table:: Comparison of the throughput in :math:`[Mb/s]` of the methods\n+ for the ``AWGN`` channel in function of the frame size.\n+ :delim: ;\n+ :file: implem_comparison_AWGN.csv\n+\n+.. _table_implem_bec:\n+\n+.. csv-table:: Comparison of the throughput in :math:`[Mb/s]` of the methods\n+ for the ``BEC` and ``BSC`` channel in function of the frame size.\n+ :delim: ;\n+ :file: implem_comparison_BEC.csv\n+\n+.. _table_implem_optical:\n+\n+.. csv-table:: Comparison of the throughput in :math:`[Mb/s]` of the methods\n+ for the ``OPTICAL`` channel in function of the frame size.\n+ :delim: ;\n+ :file: implem_comparison_OPTICAL.csv\n.. _chn-chn-gain-occur:\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "doc/sphinx/source/simulation/parameters/chn/implem_comparison_AWGN.csv",
"diff": "+Frame size;STD;FAST;MKL;GSL\n+16;31,8;99,12;29,8;11,76\n+32;30,05;134,94;53,72;12,34\n+64;30,78;165,92;93,8;12,86\n+128;31,24;188,06;148,31;12,96\n+256;31,41;199,14;204,53;12,87\n+512;31,52;199,43;267,74;13,2\n+1024;31,79;199,71;331,71;12,94\n+2048;31,61;200,16;342,06;12,89\n+4096;31,88;198,88;343,4;12,62\n+8192;30,43;195,78;342,59;13,01\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "doc/sphinx/source/simulation/parameters/chn/implem_comparison_BEC.csv",
"diff": "+Frame size;STD;FAST;MKL;GSL\n+16; 36,18;114,87;104,1;58,92\n+32; 40,28;170,64;184,99;69,14\n+64; 42,84;223,78;319,65;77,26\n+128; 43,28;252,41;474,18;87,78\n+256; 43,42;272,82;624,92;93,71\n+512; 43,51;273,22;738,72;95,36\n+1024;43,64;275,41;865,25;97,84\n+2048;43,63;272,78;996,88;97,25\n+4096;42,78;274,71;1109,13;97,65\n+8192;43,67;272,71;1116,41;98,47\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "doc/sphinx/source/simulation/parameters/chn/implem_comparison_OPTICAL.csv",
"diff": "+Frame size;STD;FAST;MKL;GSL\n+16; 6,69; 7,56; 6,71; 6,53\n+32; 9,89;10,98;10,28; 9,56\n+64; 12,67;14,30;14,05;12,15\n+128; 14,40;16,33;16,33;13,88\n+256; 15,82;17,74;18,22;15,07\n+512; 16,52;18,46;18,29;15,79\n+1024;17,18;19,14;19,31;16,19\n+2048;16,96;18,76;20,30;16,42\n+4096;17,19;18,65;20,29;16,47\n+8192;17,26;18,98;20,58;16,63\n"
}
] |
C++
|
MIT License
|
aff3ct/aff3ct
|
Doc: Add tables to compare implem speed on AWGN, BEC and OPTICAL channels
|
8,483 |
15.11.2018 11:16:11
| -3,600 |
993fd784a34f9c61861f2200c2121819de3f3e16
|
Fix err tracker:
Add an attribute to facotry modem parameters that has the channel type.
Build the modem (OOK, Optical) in function of it instead of a parameter in the build function.
Fix then the use of USER channel in err tracker revert with OOK and Optical channels because modems weren't built correctly.
|
[
{
"change_type": "MODIFY",
"old_path": "src/Factory/Module/Modem/Modem.cpp",
"new_path": "src/Factory/Module/Modem/Modem.cpp",
"diff": "@@ -253,6 +253,8 @@ void Modem::parameters\nheaders[p].push_back(std::make_pair(\"Number of iterations\", demod_ite));\nheaders[p].push_back(std::make_pair(\"Psi function\", demod_psi));\n}\n+\n+ if (full) headers[p].push_back(std::make_pair(\"Channel type\", channel_type));\n}\ntemplate <typename B, typename R, typename Q, tools::proto_max<Q> MAX>\n@@ -284,7 +286,7 @@ module::Modem<B,R,Q>* Modem::parameters\ntemplate <typename B, typename R, typename Q>\nmodule::Modem<B,R,Q>* Modem::parameters\n-::build(const std::string& chn_type) const\n+::build() const\n{\nif (this->type == \"SCMA\" && this->implem == \"STD\")\n{\n@@ -292,9 +294,9 @@ module::Modem<B,R,Q>* Modem::parameters\n}\nelse if (this->type == \"OOK\" && this->implem == \"STD\")\n{\n- if (chn_type == \"AWGN\") return new module::Modem_OOK_AWGN<B,R,Q>(this->N, tools::Sigma<R>((R)this->noise), this->no_sig2, this->n_frames);\n- if (chn_type == \"BEC\" ) return new module::Modem_OOK_BEC <B,R,Q>(this->N, tools::EP <R>((R)this->noise), this->n_frames);\n- if (chn_type == \"BSC\" ) return new module::Modem_OOK_BSC <B,R,Q>(this->N, tools::EP <R>((R)this->noise), this->n_frames);\n+ if (channel_type == \"AWGN\") return new module::Modem_OOK_AWGN<B,R,Q>(this->N, tools::Sigma<R>((R)this->noise), this->no_sig2, this->n_frames);\n+ if (channel_type == \"BEC\" ) return new module::Modem_OOK_BEC <B,R,Q>(this->N, tools::EP <R>((R)this->noise), this->n_frames);\n+ if (channel_type == \"BSC\" ) return new module::Modem_OOK_BSC <B,R,Q>(this->N, tools::EP <R>((R)this->noise), this->n_frames);\n}\nelse\n{\n@@ -309,26 +311,26 @@ module::Modem<B,R,Q>* Modem::parameters\ntemplate <typename B, typename R, typename Q>\nmodule::Modem<B,R,Q>* Modem::parameters\n-::build(const tools::Distributions<R>& dist, const std::string& chn_type) const\n+::build(const tools::Distributions<R>& dist) const\n{\n- if (this->type == \"OOK\" && this->implem == \"STD\" && chn_type == \"OPTICAL\")\n+ if (this->type == \"OOK\" && this->implem == \"STD\" && channel_type == \"OPTICAL\")\nreturn new module::Modem_OOK_optical<B,R,Q>(this->N, dist, tools::ROP<R>((R)this->noise), this->n_frames);\n- return build<B,R,Q>(chn_type);\n+ return build<B,R,Q>();\n}\ntemplate <typename B, typename R, typename Q>\nmodule::Modem<B,R,Q>* Modem\n-::build(const parameters ¶ms, const std::string& chn_type)\n+::build(const parameters ¶ms)\n{\n- return params.template build<B,R,Q>(chn_type);\n+ return params.template build<B,R,Q>();\n}\ntemplate <typename B, typename R, typename Q>\nmodule::Modem<B,R,Q>* Modem\n-::build(const parameters ¶ms, const tools::Distributions<R>& dist, const std::string& chn_type)\n+::build(const parameters ¶ms, const tools::Distributions<R>& dist)\n{\n- return params.template build<B,R,Q>(dist, chn_type);\n+ return params.template build<B,R,Q>(dist);\n}\nint Modem\n@@ -403,43 +405,43 @@ bool Modem\n// ==================================================================================== explicit template instantiation\n#include \"Tools/types.h\"\n#ifdef AFF3CT_MULTI_PREC\n-template aff3ct::module::Modem<B_8 ,R_8 ,Q_8 >* aff3ct::factory::Modem::parameters::build<B_8 ,R_8 ,Q_8 >(const std::string&) const;\n-template aff3ct::module::Modem<B_8 ,R_8 ,R_8 >* aff3ct::factory::Modem::parameters::build<B_8 ,R_8 ,R_8 >(const std::string&) const;\n-template aff3ct::module::Modem<B_16,R_16,Q_16>* aff3ct::factory::Modem::parameters::build<B_16,R_16,Q_16>(const std::string&) const;\n-template aff3ct::module::Modem<B_16,R_16,R_16>* aff3ct::factory::Modem::parameters::build<B_16,R_16,R_16>(const std::string&) const;\n-template aff3ct::module::Modem<B_32,R_32,Q_32>* aff3ct::factory::Modem::parameters::build<B_32,R_32,Q_32>(const std::string&) const;\n-template aff3ct::module::Modem<B_64,R_64,Q_64>* aff3ct::factory::Modem::parameters::build<B_64,R_64,Q_64>(const std::string&) const;\n-template aff3ct::module::Modem<B_8 ,R_8 ,Q_8 >* aff3ct::factory::Modem::build<B_8 ,R_8 ,Q_8 >(const aff3ct::factory::Modem::parameters&, const std::string&);\n-template aff3ct::module::Modem<B_8 ,R_8 ,R_8 >* aff3ct::factory::Modem::build<B_8 ,R_8 ,R_8 >(const aff3ct::factory::Modem::parameters&, const std::string&);\n-template aff3ct::module::Modem<B_16,R_16,Q_16>* aff3ct::factory::Modem::build<B_16,R_16,Q_16>(const aff3ct::factory::Modem::parameters&, const std::string&);\n-template aff3ct::module::Modem<B_16,R_16,R_16>* aff3ct::factory::Modem::build<B_16,R_16,R_16>(const aff3ct::factory::Modem::parameters&, const std::string&);\n-template aff3ct::module::Modem<B_32,R_32,Q_32>* aff3ct::factory::Modem::build<B_32,R_32,Q_32>(const aff3ct::factory::Modem::parameters&, const std::string&);\n-template aff3ct::module::Modem<B_64,R_64,Q_64>* aff3ct::factory::Modem::build<B_64,R_64,Q_64>(const aff3ct::factory::Modem::parameters&, const std::string&);\n-\n-template aff3ct::module::Modem<B_8 ,R_8 ,Q_8 >* aff3ct::factory::Modem::parameters::build<B_8 ,R_8 ,Q_8 >(const tools::Distributions<R_8 >&, const std::string&) const;\n-template aff3ct::module::Modem<B_8 ,R_8 ,R_8 >* aff3ct::factory::Modem::parameters::build<B_8 ,R_8 ,R_8 >(const tools::Distributions<R_8 >&, const std::string&) const;\n-template aff3ct::module::Modem<B_16,R_16,Q_16>* aff3ct::factory::Modem::parameters::build<B_16,R_16,Q_16>(const tools::Distributions<R_16>&, const std::string&) const;\n-template aff3ct::module::Modem<B_16,R_16,R_16>* aff3ct::factory::Modem::parameters::build<B_16,R_16,R_16>(const tools::Distributions<R_16>&, const std::string&) const;\n-template aff3ct::module::Modem<B_32,R_32,Q_32>* aff3ct::factory::Modem::parameters::build<B_32,R_32,Q_32>(const tools::Distributions<R_32>&, const std::string&) const;\n-template aff3ct::module::Modem<B_64,R_64,Q_64>* aff3ct::factory::Modem::parameters::build<B_64,R_64,Q_64>(const tools::Distributions<R_64>&, const std::string&) const;\n-template aff3ct::module::Modem<B_8 ,R_8 ,Q_8 >* aff3ct::factory::Modem::build<B_8 ,R_8 ,Q_8 >(const aff3ct::factory::Modem::parameters&, const tools::Distributions<R_8 >&, const std::string&);\n-template aff3ct::module::Modem<B_8 ,R_8 ,R_8 >* aff3ct::factory::Modem::build<B_8 ,R_8 ,R_8 >(const aff3ct::factory::Modem::parameters&, const tools::Distributions<R_8 >&, const std::string&);\n-template aff3ct::module::Modem<B_16,R_16,Q_16>* aff3ct::factory::Modem::build<B_16,R_16,Q_16>(const aff3ct::factory::Modem::parameters&, const tools::Distributions<R_16>&, const std::string&);\n-template aff3ct::module::Modem<B_16,R_16,R_16>* aff3ct::factory::Modem::build<B_16,R_16,R_16>(const aff3ct::factory::Modem::parameters&, const tools::Distributions<R_16>&, const std::string&);\n-template aff3ct::module::Modem<B_32,R_32,Q_32>* aff3ct::factory::Modem::build<B_32,R_32,Q_32>(const aff3ct::factory::Modem::parameters&, const tools::Distributions<R_32>&, const std::string&);\n-template aff3ct::module::Modem<B_64,R_64,Q_64>* aff3ct::factory::Modem::build<B_64,R_64,Q_64>(const aff3ct::factory::Modem::parameters&, const tools::Distributions<R_64>&, const std::string&);\n+template aff3ct::module::Modem<B_8 ,R_8 ,Q_8 >* aff3ct::factory::Modem::parameters::build<B_8 ,R_8 ,Q_8 >() const;\n+template aff3ct::module::Modem<B_8 ,R_8 ,R_8 >* aff3ct::factory::Modem::parameters::build<B_8 ,R_8 ,R_8 >() const;\n+template aff3ct::module::Modem<B_16,R_16,Q_16>* aff3ct::factory::Modem::parameters::build<B_16,R_16,Q_16>() const;\n+template aff3ct::module::Modem<B_16,R_16,R_16>* aff3ct::factory::Modem::parameters::build<B_16,R_16,R_16>() const;\n+template aff3ct::module::Modem<B_32,R_32,Q_32>* aff3ct::factory::Modem::parameters::build<B_32,R_32,Q_32>() const;\n+template aff3ct::module::Modem<B_64,R_64,Q_64>* aff3ct::factory::Modem::parameters::build<B_64,R_64,Q_64>() const;\n+template aff3ct::module::Modem<B_8 ,R_8 ,Q_8 >* aff3ct::factory::Modem::build<B_8 ,R_8 ,Q_8 >(const aff3ct::factory::Modem::parameters&);\n+template aff3ct::module::Modem<B_8 ,R_8 ,R_8 >* aff3ct::factory::Modem::build<B_8 ,R_8 ,R_8 >(const aff3ct::factory::Modem::parameters&);\n+template aff3ct::module::Modem<B_16,R_16,Q_16>* aff3ct::factory::Modem::build<B_16,R_16,Q_16>(const aff3ct::factory::Modem::parameters&);\n+template aff3ct::module::Modem<B_16,R_16,R_16>* aff3ct::factory::Modem::build<B_16,R_16,R_16>(const aff3ct::factory::Modem::parameters&);\n+template aff3ct::module::Modem<B_32,R_32,Q_32>* aff3ct::factory::Modem::build<B_32,R_32,Q_32>(const aff3ct::factory::Modem::parameters&);\n+template aff3ct::module::Modem<B_64,R_64,Q_64>* aff3ct::factory::Modem::build<B_64,R_64,Q_64>(const aff3ct::factory::Modem::parameters&);\n+\n+template aff3ct::module::Modem<B_8 ,R_8 ,Q_8 >* aff3ct::factory::Modem::parameters::build<B_8 ,R_8 ,Q_8 >(const tools::Distributions<R_8 >&) const;\n+template aff3ct::module::Modem<B_8 ,R_8 ,R_8 >* aff3ct::factory::Modem::parameters::build<B_8 ,R_8 ,R_8 >(const tools::Distributions<R_8 >&) const;\n+template aff3ct::module::Modem<B_16,R_16,Q_16>* aff3ct::factory::Modem::parameters::build<B_16,R_16,Q_16>(const tools::Distributions<R_16>&) const;\n+template aff3ct::module::Modem<B_16,R_16,R_16>* aff3ct::factory::Modem::parameters::build<B_16,R_16,R_16>(const tools::Distributions<R_16>&) const;\n+template aff3ct::module::Modem<B_32,R_32,Q_32>* aff3ct::factory::Modem::parameters::build<B_32,R_32,Q_32>(const tools::Distributions<R_32>&) const;\n+template aff3ct::module::Modem<B_64,R_64,Q_64>* aff3ct::factory::Modem::parameters::build<B_64,R_64,Q_64>(const tools::Distributions<R_64>&) const;\n+template aff3ct::module::Modem<B_8 ,R_8 ,Q_8 >* aff3ct::factory::Modem::build<B_8 ,R_8 ,Q_8 >(const aff3ct::factory::Modem::parameters&, const tools::Distributions<R_8 >&);\n+template aff3ct::module::Modem<B_8 ,R_8 ,R_8 >* aff3ct::factory::Modem::build<B_8 ,R_8 ,R_8 >(const aff3ct::factory::Modem::parameters&, const tools::Distributions<R_8 >&);\n+template aff3ct::module::Modem<B_16,R_16,Q_16>* aff3ct::factory::Modem::build<B_16,R_16,Q_16>(const aff3ct::factory::Modem::parameters&, const tools::Distributions<R_16>&);\n+template aff3ct::module::Modem<B_16,R_16,R_16>* aff3ct::factory::Modem::build<B_16,R_16,R_16>(const aff3ct::factory::Modem::parameters&, const tools::Distributions<R_16>&);\n+template aff3ct::module::Modem<B_32,R_32,Q_32>* aff3ct::factory::Modem::build<B_32,R_32,Q_32>(const aff3ct::factory::Modem::parameters&, const tools::Distributions<R_32>&);\n+template aff3ct::module::Modem<B_64,R_64,Q_64>* aff3ct::factory::Modem::build<B_64,R_64,Q_64>(const aff3ct::factory::Modem::parameters&, const tools::Distributions<R_64>&);\n#else\n-template aff3ct::module::Modem<B,R,Q>* aff3ct::factory::Modem::parameters::build<B,R,Q>(const std::string&) const;\n-template aff3ct::module::Modem<B,R,Q>* aff3ct::factory::Modem::build<B,R,Q>(const aff3ct::factory::Modem::parameters&, const std::string&);\n+template aff3ct::module::Modem<B,R,Q>* aff3ct::factory::Modem::parameters::build<B,R,Q>() const;\n+template aff3ct::module::Modem<B,R,Q>* aff3ct::factory::Modem::build<B,R,Q>(const aff3ct::factory::Modem::parameters&);\n-template aff3ct::module::Modem<B,R,Q>* aff3ct::factory::Modem::parameters::build<B,R,Q>(const tools::Distributions<R>&, const std::string&) const;\n-template aff3ct::module::Modem<B,R,Q>* aff3ct::factory::Modem::build<B,R,Q>(const aff3ct::factory::Modem::parameters&, const tools::Distributions<R>&, const std::string&);\n+template aff3ct::module::Modem<B,R,Q>* aff3ct::factory::Modem::parameters::build<B,R,Q>(const tools::Distributions<R>&) const;\n+template aff3ct::module::Modem<B,R,Q>* aff3ct::factory::Modem::build<B,R,Q>(const aff3ct::factory::Modem::parameters&, const tools::Distributions<R>&);\n#if !defined(AFF3CT_32BIT_PREC) && !defined(AFF3CT_64BIT_PREC)\n-template aff3ct::module::Modem<B,R,R>* aff3ct::factory::Modem::parameters::build<B,R,R>(const std::string&) const;\n-template aff3ct::module::Modem<B,R,R>* aff3ct::factory::Modem::build<B,R,R>(const aff3ct::factory::Modem::parameters&, const std::string&);\n+template aff3ct::module::Modem<B,R,R>* aff3ct::factory::Modem::parameters::build<B,R,R>() const;\n+template aff3ct::module::Modem<B,R,R>* aff3ct::factory::Modem::build<B,R,R>(const aff3ct::factory::Modem::parameters&);\n-template aff3ct::module::Modem<B,R,R>* aff3ct::factory::Modem::parameters::build<B,R,R>(const tools::Distributions<R>&, const std::string&) const;\n-template aff3ct::module::Modem<B,R,R>* aff3ct::factory::Modem::build<B,R,R>(const aff3ct::factory::Modem::parameters&, const tools::Distributions<R>&, const std::string&);\n+template aff3ct::module::Modem<B,R,R>* aff3ct::factory::Modem::parameters::build<B,R,R>(const tools::Distributions<R>&) const;\n+template aff3ct::module::Modem<B,R,R>* aff3ct::factory::Modem::build<B,R,R>(const aff3ct::factory::Modem::parameters&, const tools::Distributions<R>&);\n#endif\n#endif\n// ==================================================================================== explicit template instantiation\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Factory/Module/Modem/Modem.hpp",
"new_path": "src/Factory/Module/Modem/Modem.hpp",
"diff": "@@ -34,6 +34,7 @@ struct Modem : public Factory\nbool complex = true; // true if the modulated signal is complex\nint bps = 1; // bits per symbol\nint upf = 1; // samples per symbol\n+\n// -------- CPM parameters\nstd::string cpm_std = \"\"; // the selection of a default cpm standard hardly implemented (GSM)\nstd::string mapping = \"NATURAL\"; // symbol mapping layout (natural, gray)\n@@ -53,6 +54,7 @@ struct Modem : public Factory\n// ------- common parameters\nint n_frames = 1;\n+ std::string channel_type = \"AWGN\"; // the channel type used to build correct OOK modulation\n// ---------------------------------------------------------------------------------------------------- METHODS\nexplicit parameters(const std::string &p = Modem_prefix);\n@@ -66,10 +68,9 @@ struct Modem : public Factory\n// builder\ntemplate <typename B = int, typename R = float, typename Q = R>\n- module::Modem<B,R,Q>* build(const std::string& chn_type = \"AWGN\") const;\n+ module::Modem<B,R,Q>* build() const;\ntemplate <typename B = int, typename R = float, typename Q = R>\n- module::Modem<B,R,Q>* build(const tools::Distributions<R>& dist,\n- const std::string& chn_type = \"AWGN\") const;\n+ module::Modem<B,R,Q>* build(const tools::Distributions<R>& dist) const;\nprivate:\ntemplate <typename B = int, typename R = float, typename Q = R, tools::proto_max<Q> MAX>\n@@ -81,11 +82,10 @@ struct Modem : public Factory\ntemplate <typename B = int, typename R = float, typename Q = R>\n- static module::Modem<B,R,Q>* build(const parameters ¶ms, const std::string& chn_type = \"AWGN\");\n+ static module::Modem<B,R,Q>* build(const parameters ¶ms);\ntemplate <typename B = int, typename R = float, typename Q = R>\n- static module::Modem<B,R,Q>* build(const parameters ¶ms, const tools::Distributions<R>& dist,\n- const std::string& chn_type = \"AWGN\");\n+ static module::Modem<B,R,Q>* build(const parameters ¶ms, const tools::Distributions<R>& dist);\nstatic bool is_complex_mod(const std::string &type, const int bps = 1);\nstatic bool is_complex_fil(const std::string &type, const int bps = 1);\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Launcher/Simulation/BFER_ite.cpp",
"new_path": "src/Launcher/Simulation/BFER_ite.cpp",
"diff": "@@ -122,6 +122,8 @@ void BFER_ite<B,R,Q>\nparams.chn->store(this->arg_vals);\n+ params.mdm->channel_type = params.chn->type;\n+\nparams.qnt->size = params.mdm->N_fil;\nif (std::is_integral<Q>())\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Launcher/Simulation/BFER_std.cpp",
"new_path": "src/Launcher/Simulation/BFER_std.cpp",
"diff": "@@ -113,6 +113,8 @@ void BFER_std<B,R,Q>\nparams.chn->store(this->arg_vals);\n+ params.mdm->channel_type = params.chn->type;\n+\nauto psim = params.get_prefix();\nif (!this->arg_vals.exist({psim+\"-noise-type\", \"E\"}))\n{\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Launcher/Simulation/EXIT.cpp",
"new_path": "src/Launcher/Simulation/EXIT.cpp",
"diff": "@@ -93,6 +93,8 @@ void EXIT<B,R>\nparams.chn->store(this->arg_vals);\n+ params.mdm->channel_type = params.chn->type;\n+\nparams.mnt->size = K;\nparams.mnt->store(this->arg_vals);\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Simulation/BFER/Iterative/BFER_ite.cpp",
"new_path": "src/Simulation/BFER/Iterative/BFER_ite.cpp",
"diff": "@@ -186,10 +186,10 @@ std::unique_ptr<module::Modem<B,R,Q>> BFER_ite<B,R,Q>\n{\nif (this->distributions != nullptr)\nreturn std::unique_ptr<module::Modem<B,R,Q>>(\n- params_BFER_ite.mdm->template build<B,R,Q>(*this->distributions, this->params_BFER_ite.chn->type));\n+ params_BFER_ite.mdm->template build<B,R,Q>(*this->distributions));\nelse\nreturn std::unique_ptr<module::Modem<B,R,Q>>(\n- params_BFER_ite.mdm->template build<B,R,Q>(this->params_BFER_ite.chn->type));\n+ params_BFER_ite.mdm->template build<B,R,Q>());\n}\ntemplate <typename B, typename R, typename Q>\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Simulation/BFER/Standard/BFER_std.cpp",
"new_path": "src/Simulation/BFER/Standard/BFER_std.cpp",
"diff": "@@ -171,10 +171,10 @@ std::unique_ptr<module::Modem<B,R,R>> BFER_std<B,R,Q>\n{\nif (this->distributions != nullptr)\nreturn std::unique_ptr<module::Modem<B,R,R>>(\n- params_BFER_std.mdm->template build<B,R,R>(*this->distributions, this->params_BFER_std.chn->type));\n+ params_BFER_std.mdm->template build<B,R,R>(*this->distributions));\nelse\nreturn std::unique_ptr<module::Modem<B,R,R>>(\n- params_BFER_std.mdm->template build<B,R,R>(this->params_BFER_std.chn->type));\n+ params_BFER_std.mdm->template build<B,R,R>());\n}\ntemplate <typename B, typename R, typename Q>\n"
}
] |
C++
|
MIT License
|
aff3ct/aff3ct
|
Fix err tracker:
Add an attribute to facotry modem parameters that has the channel type.
Build the modem (OOK, Optical) in function of it instead of a parameter in the build function.
Fix then the use of USER channel in err tracker revert with OOK and Optical channels because modems weren't built correctly.
|
8,483 |
15.11.2018 11:20:44
| -3,600 |
4ba50525839a1c2a61474030d322dda1728eb185
|
When error tracker revert, force SRC and CHN implem to STD
|
[
{
"change_type": "MODIFY",
"old_path": "src/Launcher/Simulation/BFER_ite.cpp",
"new_path": "src/Launcher/Simulation/BFER_ite.cpp",
"diff": "@@ -152,6 +152,7 @@ void BFER_ite<B,R,Q>\nif (params.err_track_revert)\n{\nparams.src->type = \"USER\";\n+ params.src->implem = \"STD\";\nparams.src->path = params.err_track_path + std::string(\"_$noise.src\");\nparams.cdc->enc->type = \"USER\";\n@@ -164,6 +165,7 @@ void BFER_ite<B,R,Q>\n}\nparams.chn->type = \"USER\";\n+ params.chn->implem = \"STD\";\nparams.chn->path = params.err_track_path + std::string(\"_$noise.chn\");\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Launcher/Simulation/BFER_std.cpp",
"new_path": "src/Launcher/Simulation/BFER_std.cpp",
"diff": "@@ -155,6 +155,7 @@ void BFER_std<B,R,Q>\nif (params.err_track_revert)\n{\nparams.src->type = \"USER\";\n+ params.src->implem = \"STD\";\nparams.src->path = params.err_track_path + std::string(\"_$noise.src\");\nparams.cdc->enc->type = \"USER\";\n@@ -170,6 +171,7 @@ void BFER_std<B,R,Q>\nparams.chn->type = \"USER_ADD\";\nelse if (params.chn->type == \"USER\" || params.chn->type == \"BEC\" || params.chn->type == \"OPTICAL\")\nparams.chn->type = \"USER\";\n+ params.chn->implem = \"STD\";\n// else params.chn->type == \"NO\" stays as it is\nparams.chn->path = params.err_track_path + std::string(\"_$snr.chn\");\n}\n"
}
] |
C++
|
MIT License
|
aff3ct/aff3ct
|
When error tracker revert, force SRC and CHN implem to STD
|
8,483 |
15.11.2018 15:45:06
| -3,600 |
8684fd6197e2de19ecdd2a5d51d4a869fa5f3937
|
Fix error tracker for BEC and BSC channels by adding USER_BSC and USER_BEC types.
|
[
{
"change_type": "MODIFY",
"old_path": "src/Factory/Module/Channel/Channel.cpp",
"new_path": "src/Factory/Module/Channel/Channel.cpp",
"diff": "#include \"Module/Channel/NO/Channel_NO.hpp\"\n#include \"Module/Channel/User/Channel_user.hpp\"\n+#include \"Module/Channel/User/Channel_user_add.hpp\"\n+#include \"Module/Channel/User/Channel_user_be.hpp\"\n+#include \"Module/Channel/User/Channel_user_bs.hpp\"\n#include \"Module/Channel/AWGN/Channel_AWGN_LLR.hpp\"\n#include \"Module/Channel/Rayleigh/Channel_Rayleigh_LLR.hpp\"\n#include \"Module/Channel/Rayleigh/Channel_Rayleigh_LLR_user.hpp\"\n@@ -64,10 +67,10 @@ void Channel::parameters\nargs.add(\n{p+\"-type\"},\n- tools::Text(tools::Including_set(\"NO\", \"USER\", \"USER_ADD\", \"AWGN\", \"RAYLEIGH\", \"RAYLEIGH_USER\", \"BEC\", \"BSC\",\n- \"OPTICAL\")),\n+ tools::Text(tools::Including_set(\"NO\", \"AWGN\", \"RAYLEIGH\", \"RAYLEIGH_USER\", \"BEC\", \"BSC\", \"OPTICAL\", \"USER\",\n+ \"USER_ADD\", \"USER_BEC\", \"USER_BSC\")),\n\"type of the channel to use in the simulation ('USER' has an output got from a file when 'USER_ADD' has an\"\n- \" additive noise got from a file).\");\n+ \" additive noise got from a file, 'USER_BEC' and 'USER_BSC' have their event draws from the file).\");\nargs.add(\n{p+\"-implem\"},\n@@ -243,8 +246,10 @@ module::Channel<R>* Channel::parameters\nreturn build_event<R>();\n} catch (tools::cannot_allocate&) {}\n- if (type == \"USER\" ) return new module::Channel_user<R>(N, path, add_users, false, n_frames);\n- if (type == \"USER_ADD\") return new module::Channel_user<R>(N, path, add_users, true, n_frames);\n+ if (type == \"USER\" ) return new module::Channel_user <R>(N, path, add_users, n_frames);\n+ if (type == \"USER_ADD\") return new module::Channel_user_add<R>(N, path, add_users, n_frames);\n+ if (type == \"USER_BEC\") return new module::Channel_user_be <R>(N, path, n_frames);\n+ if (type == \"USER_BSC\") return new module::Channel_user_bs <R>(N, path, n_frames);\nif (type == \"NO\" ) return new module::Channel_NO <R>(N, add_users, n_frames);\nthrow tools::cannot_allocate(__FILE__, __LINE__, __func__);\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Launcher/Simulation/BFER_ite.cpp",
"new_path": "src/Launcher/Simulation/BFER_ite.cpp",
"diff": "@@ -164,8 +164,20 @@ void BFER_ite<B,R,Q>\nparams.itl->core->path = params.err_track_path + std::string(\"_$noise.itl\");\n}\n- params.chn->type = \"USER\";\n- params.chn->implem = \"STD\";\n+ if (params.chn->type == \"AWGN\")\n+ params.chn->type = \"USER_ADD\";\n+\n+ else if (params.chn->type == \"BEC\" || params.chn->type == \"BSC\")\n+ params.chn->type = \"USER_\" + params.chn->type;\n+\n+ else if (params.chn->type.find(\"USER\") == 0 || params.chn->type == \"NO\")\n+ {} // if a \"USER\" type or \"NO\" type then stays as it is\n+ else\n+ std::clog << rang::tag::warning << \"Channel '\" << params.chn->type << \" is not handled by the error\"\n+ << \" tracker tool.\";\n+\n+ // TODO : need to manage \"RAYLEIGH\", \"RAYLEIGH_USER\" and \"OPTICAL\"\n+\nparams.chn->path = params.err_track_path + std::string(\"_$noise.chn\");\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Launcher/Simulation/BFER_std.cpp",
"new_path": "src/Launcher/Simulation/BFER_std.cpp",
"diff": "@@ -167,12 +167,21 @@ void BFER_std<B,R,Q>\nparams.cdc->itl->core->path = params.err_track_path + std::string(\"_$noise.itl\");\n}\n- if (params.chn->type == \"USER_ADD\" || params.chn->type == \"AWGN\" || params.chn->type == \"RAYLEIGH\" || params.chn->type == \"RAYLEIGH_USER\")\n+ if (params.chn->type == \"AWGN\")\nparams.chn->type = \"USER_ADD\";\n- else if (params.chn->type == \"USER\" || params.chn->type == \"BEC\" || params.chn->type == \"OPTICAL\")\n- params.chn->type = \"USER\";\n+\n+ else if (params.chn->type == \"BEC\" || params.chn->type == \"BSC\")\n+ params.chn->type = \"USER_\" + params.chn->type;\n+\n+ else if (params.chn->type.find(\"USER\") == 0 || params.chn->type == \"NO\")\n+ {} // if a \"USER\" type or \"NO\" type then stays as it is\n+ else\n+ std::clog << rang::tag::warning << \"Channel '\" << params.chn->type << \" is not handled by the error\"\n+ << \" tracker tool.\";\n+\n+ // TODO : need to manage \"RAYLEIGH\", \"RAYLEIGH_USER\" and \"OPTICAL\"\n+\nparams.chn->implem = \"STD\";\n- // else params.chn->type == \"NO\" stays as it is\nparams.chn->path = params.err_track_path + std::string(\"_$snr.chn\");\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Module/Channel/Binary_erasure/Channel_binary_erasure.cpp",
"new_path": "src/Module/Channel/Binary_erasure/Channel_binary_erasure.cpp",
"diff": "@@ -17,7 +17,7 @@ template<typename R>\nChannel_binary_erasure<R>\n::Channel_binary_erasure(const int N, std::unique_ptr<tools::Event_generator<R>>&& event_generator,\nconst tools::Event_probability<R> &noise, const int n_frames)\n-: Channel<R>(N, noise, n_frames), event_generator(std::move(event_generator)), event_draw(this->N)\n+: Channel<R>(N, noise, n_frames), event_generator(std::move(event_generator))\n{\nconst std::string name = \"Channel_binary_erasure\";\nthis->set_name(name);\n@@ -29,8 +29,10 @@ void Channel_binary_erasure<R>\n{\nthis->check_noise();\n+ auto event_draw = (E*)(this->noise.data() + this->N * frame_id);\n+\nconst auto event_probability = this->n->get_noise();\n- event_generator->generate(this->event_draw.data(), (unsigned)this->N, event_probability);\n+ event_generator->generate(event_draw, (unsigned)this->N, event_probability);\nconst mipp::Reg<R> r_erased = tools::unknown_symbol_val<R>();\nconst mipp::Reg<E> r_false = (E)false;\n@@ -40,13 +42,13 @@ void Channel_binary_erasure<R>\nfor (auto i = 0; i < vec_loop_size; i += mipp::nElReg<R>())\n{\nconst mipp::Reg<R> r_in = X_N + i;\n- const mipp::Reg<E> r_event = &this->event_draw[i];\n+ const mipp::Reg<E> r_event = event_draw + i;\nconst auto r_out = mipp::blend(r_in, r_erased, r_event == r_false);\nr_out.store(Y_N + i);\n}\nfor (auto i = vec_loop_size; i < this->N; i++)\n- Y_N[i] = this->event_draw[i] ? tools::unknown_symbol_val<R>() : X_N[i];\n+ Y_N[i] = event_draw[i] ? tools::unknown_symbol_val<R>() : X_N[i];\n}\ntemplate<typename R>\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Module/Channel/Binary_erasure/Channel_binary_erasure.hpp",
"new_path": "src/Module/Channel/Binary_erasure/Channel_binary_erasure.hpp",
"diff": "#include \"Tools/types.h\"\n#include \"Tools/Algo/Draw_generator/Event_generator/Event_generator.hpp\"\n-#include \"../Channel.hpp\"\n+#include \"../User/Channel_user_be.hpp\"\nnamespace aff3ct\n{\n@@ -22,7 +22,6 @@ protected:\nstd::unique_ptr<tools::Event_generator<R>> event_generator;\nusing E = typename tools::matching_types<R>::B;\n- std::vector<E> event_draw;\npublic:\nChannel_binary_erasure(const int N, std::unique_ptr<tools::Event_generator<R>>&& event_generator,\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Module/Channel/Binary_symmetric/Channel_binary_symmetric.cpp",
"new_path": "src/Module/Channel/Binary_symmetric/Channel_binary_symmetric.cpp",
"diff": "@@ -17,7 +17,7 @@ template<typename R>\nChannel_binary_symmetric<R>\n::Channel_binary_symmetric(const int N, std::unique_ptr<tools::Event_generator<R>>&& event_generator,\nconst tools::Event_probability<R> &noise, const int n_frames)\n-: Channel<R>(N, noise, n_frames), event_generator(std::move(event_generator)), event_draw(this->N)\n+: Channel<R>(N, noise, n_frames), event_generator(std::move(event_generator))\n{\nconst std::string name = \"Channel_binary_symmetric\";\nthis->set_name(name);\n@@ -29,8 +29,10 @@ void Channel_binary_symmetric<R>\n{\nthis->check_noise();\n+ auto event_draw = (E*)(this->noise.data() + this->N * frame_id);\n+\nconst auto event_probability = this->n->get_noise();\n- event_generator->generate(this->event_draw.data(), (unsigned)this->N, event_probability);\n+ event_generator->generate(event_draw, (unsigned)this->N, event_probability);\nconst mipp::Reg<E> r_false = (E)false;\nconst mipp::Reg<R> r_0 = (R)0.0;\n@@ -41,7 +43,7 @@ void Channel_binary_symmetric<R>\nfor (auto i = 0; i < vec_loop_size; i += mipp::nElReg<R>())\n{\nconst mipp::Reg<R> r_in = X_N + i;\n- const mipp::Reg<E> r_event = &this->event_draw[i];\n+ const mipp::Reg<E> r_event = event_draw + i;\nconst auto m_zero = r_in == r_0;\nconst auto m_event = r_event != r_false;\n@@ -51,7 +53,7 @@ void Channel_binary_symmetric<R>\n}\nfor (auto i = vec_loop_size; i < this->N; i++)\n- Y_N[i] = this->event_draw[i] != (X_N[i] == (R)0.0) ? (R)0.0 : (R)1.0;\n+ Y_N[i] = event_draw[i] != (X_N[i] == (R)0.0) ? (R)0.0 : (R)1.0;\n}\ntemplate<typename R>\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Module/Channel/Binary_symmetric/Channel_binary_symmetric.hpp",
"new_path": "src/Module/Channel/Binary_symmetric/Channel_binary_symmetric.hpp",
"diff": "@@ -20,8 +20,7 @@ class Channel_binary_symmetric : public Channel<R>\nprotected:\nstd::unique_ptr<tools::Event_generator<R>> event_generator;\n- using E = typename tools::matching_types<R>::B;\n- std::vector<E> event_draw;\n+ using E = typename tools::matching_types<R>::B; //Event type\npublic:\nChannel_binary_symmetric(const int N, std::unique_ptr<tools::Event_generator<R>>&& event_generator,\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Module/Channel/User/Channel_user.cpp",
"new_path": "src/Module/Channel/User/Channel_user.cpp",
"diff": "-#include <fstream>\n#include <sstream>\n+#include <fstream>\n#include \"Tools/Exception/exception.hpp\"\n@@ -10,9 +10,8 @@ using namespace aff3ct::module;\ntemplate <typename R>\nChannel_user<R>\n-::Channel_user(const int N, const std::string &filename, const bool add_users, const bool additive_noise,\n- const int n_frames)\n-: Channel<R>(N, n_frames), add_users(add_users), additive_noise(additive_noise), noise_buff(), noise_counter(0)\n+::Channel_user(const int N, const std::string &filename, const bool add_users, const int n_frames)\n+: Channel<R>(N, n_frames), add_users(add_users), noise_counter(0)\n{\nconst std::string name = \"Channel_user\";\nthis->set_name(name);\n@@ -20,18 +19,72 @@ Channel_user<R>\nif (filename.empty())\nthrow tools::invalid_argument(__FILE__, __LINE__, __func__, \"'filename' should not be empty.\");\n+ Channel<R>::read_noise_file(filename, this->N, this->noise_buff);\n+}\n+\n+template <typename R>\n+void Channel_user<R>\n+::add_noise(const R *X_N, R *Y_N, const int frame_id)\n+{\n+ if (this->add_users && this->n_frames > 1)\n+ {\n+ if (frame_id != -1)\n+ {\n+ std::stringstream message;\n+ message << \"'frame_id' has to be equal to -1 ('frame_id' = \" << frame_id << \").\";\n+ throw tools::invalid_argument(__FILE__, __LINE__, __func__, message.str());\n+ }\n+\n+ this->set_noise(0);\n+\n+ std::copy(this->noise.data(), this->noise.data() + this->N, Y_N);\n+ }\n+ else\n+ {\n+ const auto f_start = (frame_id < 0) ? 0 : frame_id % this->n_frames;\n+ const auto f_stop = (frame_id < 0) ? this->n_frames : f_start + 1;\n+\n+ for (auto f = f_start; f < f_stop; f++)\n+ {\n+ this->set_noise(f);\n+\n+ std::copy(this->noise.data() + f * this->N,\n+ this->noise.data() + (f + 1) * this->N,\n+ Y_N + f * this->N);\n+ }\n+ }\n+}\n+\n+template <typename R>\n+void Channel_user<R>\n+::set_noise(const int frame_id)\n+{\n+ std::copy(this->noise_buff[this->noise_counter].begin(),\n+ this->noise_buff[this->noise_counter].end(),\n+ this->noise.data() + frame_id * this->N);\n+\n+ this->noise_counter = (this->noise_counter +1) % (int)this->noise_buff.size();\n+}\n+\n+\n+\n+template<typename R>\n+void Channel_user<R>::\n+read_noise_file(const std::string &filename, const int N, std::vector<std::vector<R>>& noise_buffer)\n+{\ntry\n{\n- open_as_text(filename);\n+ Channel_user<R>::read_as_text(filename, N, noise_buffer);\n}\ncatch(const tools::runtime_error&)\n{\n- open_as_binary(filename);\n+ Channel_user<R>::read_as_binary(filename, N, noise_buffer);\n}\n}\ntemplate<typename R>\n-void Channel_user<R>::open_as_text(const std::string &filename)\n+void Channel_user<R>::\n+read_as_text(const std::string &filename, const int N, std::vector<std::vector<R>>& noise_buffer)\n{\nstd::ifstream file(filename.c_str());\n@@ -51,11 +104,11 @@ void Channel_user<R>::open_as_text(const std::string &filename)\nthrow tools::runtime_error(__FILE__, __LINE__, __func__, message.str());\n}\n- if (fra_size == this->N)\n+ if (fra_size == N)\n{\n- this->noise_buff.resize(n_fra);\n+ noise_buffer.resize(n_fra);\nfor (unsigned i = 0; i < (unsigned)n_fra; i++)\n- this->noise_buff[i].resize(fra_size);\n+ noise_buffer[i].resize(fra_size);\nfor (unsigned i = 0; i < n_fra; i++)\nfor (auto j = 0; j < fra_size; j++)\n@@ -69,7 +122,7 @@ void Channel_user<R>::open_as_text(const std::string &filename)\nR value;\nfile >> value;\n- this->noise_buff[i][j] = value;\n+ noise_buffer[i][j] = value;\n}\n}\nelse\n@@ -77,7 +130,7 @@ void Channel_user<R>::open_as_text(const std::string &filename)\nfile.close();\nstd::stringstream message;\n- message << \"The frame size is wrong (read: \" << fra_size << \", expected: \" << this->N << \").\";\n+ message << \"The frame size is wrong (read: \" << fra_size << \", expected: \" << N << \").\";\nthrow tools::runtime_error(__FILE__, __LINE__, __func__, message.str());\n}\n}\n@@ -88,7 +141,7 @@ void Channel_user<R>::open_as_text(const std::string &filename)\n}\ntemplate<typename R>\n-void Channel_user<R>::open_as_binary(const std::string &filename)\n+void Channel_user<R>::read_as_binary(const std::string &filename, const int N, std::vector<std::vector<R>>& noise_buffer)\n{\nstd::ifstream file(filename.c_str(), std::ios::binary);\n@@ -115,16 +168,16 @@ void Channel_user<R>::open_as_binary(const std::string &filename)\nconst unsigned sizeof_float = (unsigned)length / (n_fra * fra_size);\n- if (fra_size == this->N)\n+ if (fra_size == N)\n{\n- this->noise_buff.resize(n_fra);\n+ noise_buffer.resize(n_fra);\nfor (unsigned i = 0; i < (unsigned)n_fra; i++)\n- this->noise_buff[i].resize(fra_size);\n+ noise_buffer[i].resize(fra_size);\nif (sizeof_float == sizeof(R))\n{\nfor (unsigned i = 0; i < n_fra; i++)\n- file.read(reinterpret_cast<char*>(&this->noise_buff[i][0]), fra_size * sizeof(R));\n+ file.read(reinterpret_cast<char*>(&noise_buffer[i][0]), fra_size * sizeof(R));\n}\nelse\n{\n@@ -135,7 +188,7 @@ void Channel_user<R>::open_as_binary(const std::string &filename)\n{\nfile.read(reinterpret_cast<char*>(tmp.data()), fra_size * sizeof(double));\nfor (auto j = 0; j < fra_size; j++)\n- this->noise_buff[i][j] = (R)tmp[j];\n+ noise_buffer[i][j] = (R)tmp[j];\n}\n}\nelse if (sizeof_float == sizeof(float))\n@@ -145,7 +198,7 @@ void Channel_user<R>::open_as_binary(const std::string &filename)\n{\nfile.read(reinterpret_cast<char*>(tmp.data()), fra_size * sizeof(float));\nfor (auto j = 0; j < fra_size; j++)\n- this->noise_buff[i][j] = (R)tmp[j];\n+ noise_buffer[i][j] = (R)tmp[j];\n}\n}\nelse\n@@ -163,7 +216,7 @@ void Channel_user<R>::open_as_binary(const std::string &filename)\nfile.close();\nstd::stringstream message;\n- message << \"The frame size is wrong (read: \" << fra_size << \", expected: \" << this->N << \").\";\n+ message << \"The frame size is wrong (read: \" << fra_size << \", expected: \" << N << \").\";\nthrow tools::runtime_error(__FILE__, __LINE__, __func__, message.str());\n}\n@@ -175,95 +228,6 @@ void Channel_user<R>::open_as_binary(const std::string &filename)\n}\n}\n-template <typename R>\n-void Channel_user<R>\n-::add_noise(const R *X_N, R *Y_N, const int frame_id)\n-{\n- if (additive_noise)\n- {\n- if (add_users && this->n_frames > 1)\n- {\n- if (frame_id != -1)\n- {\n- std::stringstream message;\n- message << \"'frame_id' has to be equal to -1 ('frame_id' = \" << frame_id << \").\";\n- throw tools::invalid_argument(__FILE__, __LINE__, __func__, message.str());\n- }\n-\n- std::fill(Y_N, Y_N + this->N, (R) 0);\n- for (auto f = 0; f < this->n_frames; f++)\n- for (auto i = 0; i < this->N; i++)\n- Y_N[i] += X_N[f * this->N + i];\n-\n- std::copy(this->noise_buff[this->noise_counter].begin(),\n- this->noise_buff[this->noise_counter].end(),\n- this->noise.data());\n-\n- this->noise_counter = (this->noise_counter +1) % (int)this->noise_buff.size();\n-\n- for (auto i = 0; i < this->N; i++)\n- Y_N[i] += this->noise[i];\n- }\n- else\n- {\n- const auto f_start = (frame_id < 0) ? 0 : frame_id % this->n_frames;\n- const auto f_stop = (frame_id < 0) ? this->n_frames : f_start + 1;\n-\n- for (auto f = f_start; f < f_stop; f++)\n- {\n- std::copy(this->noise_buff[this->noise_counter].begin(),\n- this->noise_buff[this->noise_counter].end(),\n- this->noise.data() + f * this->N);\n-\n- for (auto i = 0; i < this->N; i++)\n- Y_N[f * this->N + i] = X_N[f * this->N + i] + this->noise[f * this->N + i];\n-\n- this->noise_counter = (this->noise_counter + 1) % (int) this->noise_buff.size();\n- }\n- }\n- }\n- else\n- {\n- if (add_users && this->n_frames > 1)\n- {\n- if (frame_id != -1)\n- {\n- std::stringstream message;\n- message << \"'frame_id' has to be equal to -1 ('frame_id' = \" << frame_id << \").\";\n- throw tools::invalid_argument(__FILE__, __LINE__, __func__, message.str());\n- }\n-\n- std::copy(this->noise_buff[this->noise_counter].begin(),\n- this->noise_buff[this->noise_counter].end(),\n- this->noise.data());\n-\n- std::copy(this->noise_buff[this->noise_counter].begin(),\n- this->noise_buff[this->noise_counter].end(),\n- Y_N);\n-\n- this->noise_counter = (this->noise_counter +1) % (int)this->noise_buff.size();\n-\n- }\n- else\n- {\n- const auto f_start = (frame_id < 0) ? 0 : frame_id % this->n_frames;\n- const auto f_stop = (frame_id < 0) ? this->n_frames : f_start + 1;\n-\n- for (auto f = f_start; f < f_stop; f++)\n- {\n- std::copy(this->noise_buff[this->noise_counter].begin(),\n- this->noise_buff[this->noise_counter].end(),\n- this->noise.data() + f * this->N);\n-\n- std::copy(this->noise_buff[this->noise_counter].begin(),\n- this->noise_buff[this->noise_counter].end(),\n- Y_N + f * this->N);\n-\n- this->noise_counter = (this->noise_counter + 1) % (int) this->noise_buff.size();\n- }\n- }\n- }\n-}\n// ==================================================================================== explicit template instantiation\n#include \"Tools/types.h\"\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Module/Channel/User/Channel_user.hpp",
"new_path": "src/Module/Channel/User/Channel_user.hpp",
"diff": "-#ifndef CHANNELS_USER_HPP_\n-#define CHANNELS_USER_HPP_\n+#ifndef CHANNEL_USER_HPP_\n+#define CHANNEL_USER_HPP_\n#include <vector>\n-#include <mipp.h>\n#include \"../Channel.hpp\"\n@@ -10,26 +9,37 @@ namespace aff3ct\n{\nnamespace module\n{\n+\n+/*!\n+ * \\class Channel_user\n+ *\n+ * \\brief The output is directly set by the data read in the given file.\n+ *\n+ * \\tparam R: type of the reals (floating-point representation) in the Channel.\n+ */\ntemplate <typename R = float>\nclass Channel_user : public Channel<R>\n{\n-private:\n- const bool add_users;\n- const bool additive_noise;\n- mipp::vector<mipp::vector<R>> noise_buff;\n- int noise_counter;\n-\npublic:\n- Channel_user(const int N, const std::string &filename, const bool add_users = false, const bool additive_noise = true, const int n_frames = 1);\n+ Channel_user(const int N, const std::string &filename, const bool add_users = false, const int n_frames = 1);\nvirtual ~Channel_user() = default;\n- void add_noise(const R *X_N, R *Y_N, const int frame_id = -1); using Channel<R>::add_noise;\n+ virtual void add_noise(const R *X_N, R *Y_N, const int frame_id = -1); using Channel<R>::add_noise;\n+\n+ static void read_noise_file(const std::string &filename, const int N, std::vector<std::vector<R>>& noise_buffer);\n+ static void read_as_text (const std::string &filename, const int N, std::vector<std::vector<R>>& noise_buffer);\n+ static void read_as_binary (const std::string &filename, const int N, std::vector<std::vector<R>>& noise_buffer);\nprotected:\n- void open_as_text (const std::string& filename);\n- void open_as_binary(const std::string& filename);\n+ const bool add_users;\n+\n+ virtual void set_noise(const int frame_id);\n+\n+private:\n+ std::vector<std::vector<R>> noise_buff;\n+ int noise_counter;\n};\n}\n}\n-#endif /* CHANNELS_USER_HPP_ */\n+#endif /* CHANNEL_USER_HPP_ */\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "src/Module/Channel/User/Channel_user_add.cpp",
"diff": "+#include <sstream>\n+\n+#include \"Tools/Exception/exception.hpp\"\n+\n+#include \"Channel_user_add.hpp\"\n+\n+using namespace aff3ct;\n+using namespace aff3ct::module;\n+\n+template <typename R>\n+Channel_user_add<R>\n+::Channel_user_add(const int N, const std::string &filename, const bool add_users, const int n_frames)\n+: Channel_user<R>(N, filename, add_users, n_frames)\n+{\n+ const std::string name = \"Channel_user_add\";\n+ this->set_name(name);\n+}\n+\n+template <typename R>\n+void Channel_user_add<R>\n+::add_noise(const R *X_N, R *Y_N, const int frame_id)\n+{\n+ if (this->add_users && this->n_frames > 1)\n+ {\n+ if (frame_id != -1)\n+ {\n+ std::stringstream message;\n+ message << \"'frame_id' has to be equal to -1 ('frame_id' = \" << frame_id << \").\";\n+ throw tools::invalid_argument(__FILE__, __LINE__, __func__, message.str());\n+ }\n+\n+ this->set_noise(0);\n+\n+ std::copy(this->noise.data(), this->noise.data() + this->N, Y_N);\n+\n+ std::fill(Y_N, Y_N + this->N, (R) 0);\n+ for (auto f = 0; f < this->n_frames; f++)\n+ for (auto i = 0; i < this->N; i++)\n+ Y_N[i] += X_N[f * this->N + i];\n+ }\n+ else\n+ {\n+ const auto f_start = (frame_id < 0) ? 0 : frame_id % this->n_frames;\n+ const auto f_stop = (frame_id < 0) ? this->n_frames : f_start + 1;\n+\n+ for (auto f = f_start; f < f_stop; f++)\n+ {\n+ this->set_noise(f);\n+\n+ for (auto i = 0; i < this->N; i++)\n+ Y_N[f * this->N + i] = X_N[f * this->N + i] + this->noise[f * this->N + i];\n+ }\n+ }\n+}\n+\n+// ==================================================================================== explicit template instantiation\n+#include \"Tools/types.h\"\n+#ifdef AFF3CT_MULTI_PREC\n+template class aff3ct::module::Channel_user_add<R_32>;\n+template class aff3ct::module::Channel_user_add<R_64>;\n+#else\n+template class aff3ct::module::Channel_user_add<R>;\n+#endif\n+// ==================================================================================== explicit template instantiation\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "src/Module/Channel/User/Channel_user_add.hpp",
"diff": "+#ifndef CHANNEL_USER_ADD_HPP_\n+#define CHANNEL_USER_ADD_HPP_\n+\n+#include <vector>\n+\n+#include \"Channel_user.hpp\"\n+\n+namespace aff3ct\n+{\n+namespace module\n+{\n+\n+/*!\n+ * \\class Channel_user_add\n+ *\n+ * \\brief Additive noise to the input with noise read from the given file.\n+ *\n+ * \\tparam R: type of the reals (floating-point representation) in the Channel.\n+ */\n+template <typename R = float>\n+class Channel_user_add : public Channel_user<R>\n+{\n+public:\n+ Channel_user_add(const int N, const std::string &filename, const bool add_users = false, const int n_frames = 1);\n+ virtual ~Channel_user_add() = default;\n+\n+ virtual void add_noise(const R *X_N, R *Y_N, const int frame_id = -1); using Channel<R>::add_noise;\n+};\n+}\n+}\n+\n+#endif /* CHANNEL_USER_ADD_HPP_ */\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "src/Module/Channel/User/Channel_user_be.cpp",
"diff": "+#include <sstream>\n+#include <mipp.h>\n+\n+#include \"Tools/Exception/exception.hpp\"\n+\n+#include \"Channel_user_be.hpp\"\n+\n+using namespace aff3ct;\n+using namespace aff3ct::module;\n+\n+template <typename R>\n+Channel_user_be<R>\n+::Channel_user_be(const int N, const std::string &filename, const int n_frames)\n+: Channel_user<R>(N, filename, false, n_frames)\n+{\n+ const std::string name = \"Channel_user_be\";\n+ this->set_name(name);\n+}\n+\n+template <typename R>\n+void Channel_user_be<R>\n+::add_noise(const R *X_N, R *Y_N, const int frame_id)\n+{\n+ Channel<R>::add_noise(X_N, Y_N, frame_id);\n+}\n+\n+template <typename R>\n+void Channel_user_be<R>\n+::_add_noise(const R *X_N, R *Y_N, const int frame_id)\n+{\n+ const mipp::Reg<R> r_erased = tools::unknown_symbol_val<R>();\n+ const mipp::Reg<E> r_false = (E)false;\n+\n+ this->set_noise(frame_id);\n+\n+\n+ auto event_draw = (E*)(this->noise.data() + this->N * frame_id);\n+\n+ const auto vec_loop_size = (this->N / mipp::nElReg<R>()) * mipp::nElReg<R>();\n+\n+ for (auto i = 0; i < vec_loop_size; i += mipp::nElReg<R>())\n+ {\n+ const mipp::Reg<R> r_in = X_N + i;\n+ const mipp::Reg<E> r_event = event_draw + i;\n+ const auto r_out = mipp::blend(r_in, r_erased, r_event == r_false);\n+ r_out.store(Y_N + i);\n+ }\n+\n+ for (auto i = vec_loop_size; i < this->N; i++)\n+ Y_N[i] = event_draw[i] ? tools::unknown_symbol_val<R>() : X_N[i];\n+}\n+\n+// ==================================================================================== explicit template instantiation\n+#include \"Tools/types.h\"\n+#ifdef AFF3CT_MULTI_PREC\n+template class aff3ct::module::Channel_user_be<R_32>;\n+template class aff3ct::module::Channel_user_be<R_64>;\n+#else\n+template class aff3ct::module::Channel_user_be<R>;\n+#endif\n+// ==================================================================================== explicit template instantiation\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "src/Module/Channel/User/Channel_user_be.hpp",
"diff": "+#ifndef CHANNEL_USER_BE_HPP_\n+#define CHANNEL_USER_BE_HPP_\n+\n+#include <vector>\n+\n+#include \"Tools/types.h\"\n+\n+#include \"Channel_user.hpp\"\n+\n+namespace aff3ct\n+{\n+namespace module\n+{\n+\n+/*!\n+ * \\class Channel_user_be\n+ *\n+ * \\brief Binary Erasure Channel with user given events from a file.\n+ *\n+ * \\tparam R: type of the reals (floating-point representation) in the Channel.\n+ */\n+template <typename R = float>\n+class Channel_user_be : public Channel_user<R>\n+{\n+public:\n+ using E = typename tools::matching_types<R>::B; //Event type\n+\n+ Channel_user_be(const int N, const std::string &filename, const int n_frames = 1);\n+ virtual ~Channel_user_be() = default;\n+\n+ virtual void add_noise(const R *X_N, R *Y_N, const int frame_id = -1);\n+\n+protected:\n+ virtual void _add_noise(const R *X_N, R *Y_N, const int frame_id = -1);\n+};\n+}\n+}\n+\n+#endif /* CHANNEL_USER_BE_HPP_ */\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "src/Module/Channel/User/Channel_user_bs.cpp",
"diff": "+#include <sstream>\n+#include <mipp.h>\n+\n+#include \"Tools/Exception/exception.hpp\"\n+\n+#include \"Channel_user_bs.hpp\"\n+\n+using namespace aff3ct;\n+using namespace aff3ct::module;\n+\n+template <typename R>\n+Channel_user_bs<R>\n+::Channel_user_bs(const int N, const std::string &filename, const int n_frames)\n+: Channel_user<R>(N, filename, false, n_frames)\n+{\n+ const std::string name = \"Channel_user_bs\";\n+ this->set_name(name);\n+}\n+\n+template <typename R>\n+void Channel_user_bs<R>\n+::add_noise(const R *X_N, R *Y_N, const int frame_id)\n+{\n+ Channel<R>::add_noise(X_N, Y_N, frame_id);\n+}\n+\n+template <typename R>\n+void Channel_user_bs<R>\n+::_add_noise(const R *X_N, R *Y_N, const int frame_id)\n+{\n+ const mipp::Reg<E> r_false = (E)false;\n+ const mipp::Reg<R> r_0 = (R)0.0;\n+ const mipp::Reg<R> r_1 = (R)1.0;\n+\n+ this->set_noise(frame_id);\n+\n+\n+ auto event_draw = (E*)(this->noise.data() + this->N * frame_id);\n+\n+ const auto vec_loop_size = (this->N / mipp::nElReg<R>()) * mipp::nElReg<R>();\n+\n+ for (auto i = 0; i < vec_loop_size; i += mipp::nElReg<R>())\n+ {\n+ const mipp::Reg<R> r_in = X_N + i;\n+ const mipp::Reg<E> r_event = event_draw + i;\n+\n+ const auto m_zero = r_in == r_0;\n+ const auto m_event = r_event != r_false;\n+\n+ const auto r_out = mipp::blend(r_0, r_1, m_event ^ m_zero);\n+ r_out.store(Y_N + i);\n+ }\n+\n+ for (auto i = vec_loop_size; i < this->N; i++)\n+ Y_N[i] = event_draw[i] != (X_N[i] == (R)0.0) ? (R)0.0 : (R)1.0;\n+}\n+\n+// ==================================================================================== explicit template instantiation\n+#include \"Tools/types.h\"\n+#ifdef AFF3CT_MULTI_PREC\n+template class aff3ct::module::Channel_user_bs<R_32>;\n+template class aff3ct::module::Channel_user_bs<R_64>;\n+#else\n+template class aff3ct::module::Channel_user_bs<R>;\n+#endif\n+// ==================================================================================== explicit template instantiation\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "src/Module/Channel/User/Channel_user_bs.hpp",
"diff": "+#ifndef CHANNEL_USER_BS_HPP_\n+#define CHANNEL_USER_BS_HPP_\n+\n+#include <vector>\n+\n+#include \"Tools/types.h\"\n+\n+#include \"Channel_user.hpp\"\n+\n+namespace aff3ct\n+{\n+namespace module\n+{\n+\n+/*!\n+ * \\class Channel_user_bs\n+ *\n+ * \\brief Binary Symmetric Channel with user given events from a file.\n+ *\n+ * \\tparam R: type of the reals (floating-point representation) in the Channel.\n+ */\n+template <typename R = float>\n+class Channel_user_bs : public Channel_user<R>\n+{\n+public:\n+ using E = typename tools::matching_types<R>::B; //Event type\n+\n+ Channel_user_bs(const int N, const std::string &filename, const int n_frames = 1);\n+ virtual ~Channel_user_bs() = default;\n+\n+ virtual void add_noise(const R *X_N, R *Y_N, const int frame_id = -1);\n+\n+protected:\n+ virtual void _add_noise(const R *X_N, R *Y_N, const int frame_id = -1);\n+};\n+}\n+}\n+\n+#endif /* CHANNEL_USER_BS_HPP_ */\n"
}
] |
C++
|
MIT License
|
aff3ct/aff3ct
|
Fix error tracker for BEC and BSC channels by adding USER_BSC and USER_BEC types.
|
8,483 |
15.11.2018 16:01:39
| -3,600 |
59c2d02dd75ab17a52fbceb1e609c962a11bb8f2
|
Fix channel user
|
[
{
"change_type": "MODIFY",
"old_path": "src/Module/Channel/User/Channel_user.cpp",
"new_path": "src/Module/Channel/User/Channel_user.cpp",
"diff": "@@ -19,7 +19,7 @@ Channel_user<R>\nif (filename.empty())\nthrow tools::invalid_argument(__FILE__, __LINE__, __func__, \"'filename' should not be empty.\");\n- Channel<R>::read_noise_file(filename, this->N, this->noise_buff);\n+ read_noise_file(filename, this->N, this->noise_buff);\n}\ntemplate <typename R>\n"
}
] |
C++
|
MIT License
|
aff3ct/aff3ct
|
Fix channel user
|
8,483 |
15.11.2018 16:02:20
| -3,600 |
e266443e9dd323bd5d36b461468545e1a2e5429a
|
Fix Modem OOK BSC when having null probability by flooring the value to 1e-10 to compute the log
|
[
{
"change_type": "MODIFY",
"old_path": "src/Module/Modem/OOK/Modem_OOK_BSC.cpp",
"new_path": "src/Module/Modem/OOK/Modem_OOK_BSC.cpp",
"diff": "@@ -23,7 +23,12 @@ void Modem_OOK_BSC<B,R,Q>\n{\nModem_OOK<B,R,Q>::set_noise(noise);\n- this->log_pe_1_pe = (Q)log(this->n->get_noise() / (1 - this->n->get_noise())); // trow if noise is not set\n+ auto proba = this->n->get_noise(); // trow if noise is not set\n+\n+ if (proba == (R)0.)\n+ proba = (R)1e-10;\n+\n+ this->log_pe_1_pe = (Q)log(proba / (1 - proba));\n}\ntemplate <typename B, typename R, typename Q>\n"
}
] |
C++
|
MIT License
|
aff3ct/aff3ct
|
Fix Modem OOK BSC when having null probability by flooring the value to 1e-10 to compute the log
|
8,483 |
15.11.2018 16:03:58
| -3,600 |
1f057a2dd68fcaedc26031ccb724103f4da74857
|
Lower the decimal precision of the noise range to 7 decimals but reduce roof to +- 214 dB -> this is for low event probabilities.
|
[
{
"change_type": "MODIFY",
"old_path": "src/Tools/general_utils.cpp",
"new_path": "src/Tools/general_utils.cpp",
"diff": "@@ -129,7 +129,7 @@ R aff3ct::tools::ebn0_to_esn0(const R ebn0, const R bit_rate, const int bps)\ntemplate <typename R>\nstd::vector<R> aff3ct::tools::generate_range(const std::vector<std::vector<R>>& range_description, const R default_step)\n{\n- const R float_precision = 1e5;\n+ const R float_precision = 1e7;\nstd::vector<int> range;\n"
}
] |
C++
|
MIT License
|
aff3ct/aff3ct
|
Lower the decimal precision of the noise range to 7 decimals but reduce roof to +- 214 dB -> this is for low event probabilities.
|
8,483 |
15.11.2018 16:13:06
| -3,600 |
b5d64b9b52a1fb57871b313fd0b7b81ff514fbf3
|
In evenr generator fast, manage the case where the probability is null to fill directly the draw with no events. Because else there is a bug making happening some events.
|
[
{
"change_type": "MODIFY",
"old_path": "src/Tools/Algo/Draw_generator/Event_generator/Fast/Event_generator_fast.cpp",
"new_path": "src/Tools/Algo/Draw_generator/Event_generator/Fast/Event_generator_fast.cpp",
"diff": "@@ -44,6 +44,12 @@ namespace tools\ntemplate <>\nvoid Event_generator_fast<R_32,B_32>\n::generate(B_32 *draw, const unsigned length, const R_32 event_probability)\n+{\n+ if (event_probability == (R_32)0.)\n+ {\n+ std::fill(draw, draw + length, (B_32)false);\n+ }\n+ else\n{\nconst mipp::Reg<R_32> r_ep = event_probability;\nconst mipp::Reg<B_32> r_one = (B_32)true;\n@@ -61,6 +67,7 @@ void Event_generator_fast<R_32,B_32>\nfor (auto i = vec_loop_size; i < length; i++)\ndraw[i] = mt19937.randf_cc() <= event_probability;\n}\n+}\n}\n}\n@@ -72,6 +79,12 @@ namespace tools\ntemplate <>\nvoid Event_generator_fast<R_64,B_64>\n::generate(B_64 *draw, const unsigned length, const R_64 event_probability)\n+{\n+ if (event_probability == (R_64)0.)\n+ {\n+ std::fill(draw, draw + length, (B_64)false);\n+ }\n+ else\n{\nconst mipp::Reg<R_64> r_ep = event_probability;\nconst mipp::Reg<B_64> r_one = (B_64)true;\n@@ -95,6 +108,7 @@ void Event_generator_fast<R_64,B_64>\nfor (auto i = vec_loop_size; i < length; i++)\ndraw[i] = (R_64)mt19937.randf_cc() <= event_probability;\n}\n+}\n}\n}\n"
}
] |
C++
|
MIT License
|
aff3ct/aff3ct
|
In evenr generator fast, manage the case where the probability is null to fill directly the draw with no events. Because else there is a bug making happening some events.
|
8,483 |
15.11.2018 17:43:56
| -3,600 |
2ce8bb594fd2286be774e2039d33f6bfc8b75189
|
Doc: Comment the channels throughputs tables to give details about the using algorithms.
|
[
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/simulation/parameters/chn/chn.rst",
"new_path": "doc/sphinx/source/simulation/parameters/chn/chn.rst",
"diff": "@@ -45,6 +45,10 @@ Description of the allowed values:\n+-------------------+--------------------------------+\n| ``USER_ADD`` | |chn-type_descr_user_add| |\n+-------------------+--------------------------------+\n+| ``USER_BEC`` | |chn-type_descr_user_bec| |\n++-------------------+--------------------------------+\n+| ``USER_BSC`` | |chn-type_descr_user_bsc| |\n++-------------------+--------------------------------+\n.. _Additive White Gaussian Noise: https://en.wikipedia.org/wiki/Additive_white_Gaussian_noise\n.. _Binary Erasure Channel: https://en.wikipedia.org/wiki/Binary_erasure_channel\n@@ -53,54 +57,65 @@ Description of the allowed values:\n.. |chn-type_descr_awgn| replace:: The `Additive White Gaussian Noise`_\n- channel: :math:`Y = X + N_G \\text{ with } N_G \\sim \\mathcal{N}(0,\\sigma)`\n+ channel: :math:`Y = X + Z \\text{ with } Z \\sim \\mathcal{N}(0,\\sigma)`\n.. |chn-type_descr_bec| replace:: The `Binary Erasure Channel`_\n:math:`Y_i = \\begin{cases}\n- erased & \\quad \\text{with a probability of } p_e \\\\\n+ erased & \\quad \\text{if } e = 1 \\\\\nX_i & \\quad \\text{else}\n- \\end{cases}`\n+ \\end{cases} \\text{with } P(e = 1) = p_e`\n.. |chn-type_descr_bsc| replace:: The `Binary Symmetric Channel`_\n:math:`Y_i = \\begin{cases}\n- !X_i & \\quad \\text{with a probability of } p_e \\\\\n+ !X_i & \\quad \\text{if } e = 1 \\\\\nX_i & \\quad \\text{else}\n- \\end{cases}`\n+ \\end{cases} \\text{with } P(e = 1) = p_e`\n-.. |chn-type_descr_no| replace:: The perfect channel: :math:`Y = X`\n+.. |chn-type_descr_no| replace:: The **perfect** channel:\n+ :math:`Y = X`\n-.. |chn-type_descr_optical| replace:: The optical channel: :math:`Y_i =\n- \\begin{cases}\n+.. |chn-type_descr_optical| replace:: The **optical** channel:\n+ :math:`Y_i = \\begin{cases}\nCDF_0(x) & \\quad \\text{ when } X_i = 0 \\\\\nCDF_1(x) & \\quad \\text{ when } X_i = 1\n\\end{cases} \\text{ with } x \\sim \\mathcal{U}(0,1)`\n+ and the CDFs given by user.\n.. |chn-type_descr_rayleigh| replace:: The `Rayleigh Fading`_ channel with\n- an AWGN gain: :math:`Y = X.H_G + N_G \\text{ with }\n- N_G \\sim \\mathcal{N}(0,\\sigma) \\text{ and }\n- H_G \\sim \\mathcal{N}(0,\\frac{1}{\\sqrt(2)})`\n+ an AWGN gain: :math:`Y = X.H + Z \\text{ with }\n+ Z \\sim \\mathcal{N}(0,\\sigma) \\text{ and }\n+ H \\sim \\mathcal{N}(0,\\frac{1}{\\sqrt 2})`\n-.. |chn-type_descr_rayleigh_user| replace:: The Rayleigh Fading channel with\n- the gain given in a file: :math:`Y = X.H + N_G\n- \\text{ with } N_G \\sim \\mathcal{N}(0,\\sigma) \\text{ and }\n+.. |chn-type_descr_rayleigh_user| replace:: The `Rayleigh Fading`_ channel with\n+ the gain given in a file: :math:`Y = X.H + Z\n+ \\text{ with } Z \\sim \\mathcal{N}(0,\\sigma) \\text{ and }\nH \\text{ given by the user}`\n-.. |chn-type_descr_user| replace:: A channel with a user defined\n- **output** given in a file: :math:`Y = Z\n- \\text{ with } Z \\text{ given by the user}`\n+.. |chn-type_descr_user| replace:: A **user defined output** channel\n+ from a file: :math:`Y = Z \\text{ with } Z \\text{ given by user}`\n-.. |chn-type_descr_user_add| replace:: A channel with a user defined\n- **additive noise** given in a file: :math:`Y = X +\n+.. |chn-type_descr_user_add| replace:: An **additive** channel with a user\n+ defined noise given in a file: :math:`Y = X +\nZ \\text{ with } Z \\text{ given by the user}`\n+.. |chn-type_descr_user_bec| replace:: The `Binary Erasure Channel`_ with a\n+ user defined event draw given in a file:\n+ :math:`Y_i = \\begin{cases}\n+ erased & \\quad \\text{if } e = 1 \\\\\n+ X_i & \\quad \\text{else}\n+ \\end{cases} \\text{ with } e \\text{ given by the user}`\n-.. note:: The ``AWGN``, ``NO`` and ``RAYLEIGH`` channels handle\n- complex modulations.\n+.. |chn-type_descr_user_bsc| replace:: The `Binary Symmetric Channel`_ with\n+ a user defined event draw given in a file:\n+ :math:`Y_i = \\begin{cases}\n+ !X_i & \\quad \\text{if } e = 1 \\\\\n+ X_i & \\quad \\text{else}\n+ \\end{cases} \\text{ with } e \\text{ given by the user}`\n-.. note:: The ``BEC``, ``BSC`` and ``OPTICAL`` channels work only with ``OOK``\n- modulation.\n+Where :math:`\\sigma, p_e` are the simulated noise points and are given by the\n+user through the :ref:`sim-sim-noise-range` argument.\n-.. note:: The :abbr:`CDF (Cumulative Distribution Function)` for the ``OPTICAL``\n+The :abbr:`CDF (Cumulative Distribution Function)` for the ``OPTICAL``\nchannel is given with the :ref:`sim-sim-pdf-path` argument. This file\ndescribes the :abbr:`PDF (Probability Density Function)` of the\n:abbr:`ROP (Received Optical Power)` at different value for a bit transmitted\n@@ -108,6 +123,13 @@ Description of the allowed values:\nmany PDF as ROP to test.\n+.. note:: The ``AWGN``, ``NO`` and ``RAYLEIGH`` channels handle\n+ complex modulations.\n+\n+.. note:: The ``BEC``, ``BSC`` and ``OPTICAL`` channels work only with ``OOK``\n+ modulation.\n+\n+\n.. _chn-chn-implem:\n``--chn-implem``\n@@ -137,12 +159,13 @@ Description of the allowed values:\n.. _GNU Scientific Library: https://www.gnu.org/software/gsl/\n.. _Intel Math Kernel Library: https://software.intel.com/en-us/mkl\n-.. |chn-implem_descr_std| replace:: A standard implementation.\n+.. |chn-implem_descr_std| replace:: A standard implementation using the C++\n+ standard objects and algorithms.\n.. |chn-implem_descr_fast| replace:: A much faster method using |SIMD|.\n.. |chn-implem_descr_gsl| replace:: A method using the\n- `GNU Scientific Library`_ that is not necessary really fast.\n+ `GNU Scientific Library`_.\n.. |chn-implem_descr_mkl| replace:: A method using the\n`Intel Math Kernel Library`_ optimized on Intel processors.\n@@ -152,8 +175,8 @@ Description of the allowed values:\ncompile with the good options (see :ref:`compilation_cmake_options`).\n-Numbers on :numref:`table_implem_awgn`, :numref:`table_implem_bec` and\n-:numref:`table_implem_optical` show the throughput of the channels on\n+Numbers on :numref:`comp_implem_awgn`, :numref:`comp_implem_bec` and\n+:numref:`comp_implem_optical` show the throughput of the channels on\nthe different implementations in function of the frame size. The conditions of\nthe experiment were an ``UNCODED`` simulation on 8 threads during 10 seconds per\nmeasurement on an *Intel(R) Xeon(R) CPU E3-1270 v5 @ 3.60GHz*.\n@@ -162,27 +185,47 @@ the :ref:`sim-sim-stats` option flag. Numbers on those tables were read on the\n*Average* column of the *add_noise* task of the *Channel* module.\n-.. _table_implem_awgn:\n+.. _comp_implem_awgn:\n.. csv-table:: Comparison of the throughput in :math:`[Mb/s]` of the methods\nfor the ``AWGN`` channel in function of the frame size.\n:delim: ;\n:file: implem_comparison_AWGN.csv\n-.. _table_implem_bec:\n+The :numref:`comp_implem_awgn` shows that the standard normal distribution\n+generator with a Mersenne Twister 19937 is quite fast next to a Box-Muller\n+algorithm from the GSL. However, the ``FAST`` Box-Muller method implementation\n+with also a Mersenne Twister is much faster than the ``MKL``'s Box-Muller on\n+short frames but the last takes some distance on longer ones.\n+\n+\n+.. _comp_implem_bec:\n.. csv-table:: Comparison of the throughput in :math:`[Mb/s]` of the methods\nfor the ``BEC` and ``BSC`` channel in function of the frame size.\n:delim: ;\n:file: implem_comparison_BEC.csv\n-.. _table_implem_optical:\n+You can see on :numref:`comp_implem_bec` that the ``MKL``'s Bernoulli solution\n+is up to four times faster than the ``FAST`` implementation using a\n+Mersenne Twister. The ``GSL``'s Bernoulli implementation is here\n+twice faster than a ``STD``'s Bernoulli algorithm solution associated with a\n+Mersenne Twister.\n+\n+\n+.. _comp_implem_optical:\n.. csv-table:: Comparison of the throughput in :math:`[Mb/s]` of the methods\nfor the ``OPTICAL`` channel in function of the frame size.\n:delim: ;\n:file: implem_comparison_OPTICAL.csv\n+You can see on :numref:`comp_implem_optical` that although using same\n+implementation as for the ``BEC`` to generate an uniform draw, the\n+throughputs are identical for all. This is due to an unoptimized interpolation\n+function using standard algorithm applied on each symbol to compute the output\n+according to the given CDFs.\n+\n.. _chn-chn-gain-occur:\n``--chn-gain-occur``\n"
}
] |
C++
|
MIT License
|
aff3ct/aff3ct
|
Doc: Comment the channels throughputs tables to give details about the using algorithms.
|
8,483 |
16.11.2018 09:12:10
| -3,600 |
1c11178861e1751c6211275fdbdd2f5298894da1
|
Change GSL gaussian noise generator with the gsl_ran_gaussian_ziggurat function.
|
[
{
"change_type": "MODIFY",
"old_path": "src/Tools/Algo/Draw_generator/Gaussian_noise_generator/GSL/Gaussian_noise_generator_GSL.cpp",
"new_path": "src/Tools/Algo/Draw_generator/Gaussian_noise_generator/GSL/Gaussian_noise_generator_GSL.cpp",
"diff": "@@ -30,7 +30,7 @@ void Gaussian_noise_generator_GSL<R>\n::generate(R *noise, const unsigned length, const R sigma, const R mu)\n{\nfor (unsigned i = 0; i < length; i++)\n- noise[i] = (R)gsl_ran_gaussian(rng.get(), sigma) + mu;\n+ noise[i] = (R)gsl_ran_gaussian_ziggurat(rng.get(), sigma) + mu;\n}\n// ==================================================================================== explicit template instantiation\n"
}
] |
C++
|
MIT License
|
aff3ct/aff3ct
|
Change GSL gaussian noise generator with the gsl_ran_gaussian_ziggurat function.
|
8,483 |
16.11.2018 09:52:09
| -3,600 |
a52d26ea9b0124f62c053b89f566abc166f72431
|
Doc: Update the througput of the GSL channels since it is using the Ziggurat algorithm now.
|
[
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/simulation/parameters/chn/chn.rst",
"new_path": "doc/sphinx/source/simulation/parameters/chn/chn.rst",
"diff": "@@ -165,9 +165,9 @@ Description of the allowed values:\n.. |chn-implem_descr_fast| replace:: A much faster method using |SIMD|.\n.. |chn-implem_descr_gsl| replace:: A method using the\n- `GNU Scientific Library`_.\n+ `GNU Scientific Library`_ but not parallelized.\n-.. |chn-implem_descr_mkl| replace:: A method using the\n+.. |chn-implem_descr_mkl| replace:: A parallelized method using the\n`Intel Math Kernel Library`_ optimized on Intel processors.\n.. attention:: All channels work with any implementation. However, to activate\n@@ -193,7 +193,7 @@ the :ref:`sim-sim-stats` option flag. Numbers on those tables were read on the\n:file: implem_comparison_AWGN.csv\nThe :numref:`comp_implem_awgn` shows that the standard normal distribution\n-generator with a Mersenne Twister 19937 is quite fast next to a Box-Muller\n+generator with a Mersenne Twister 19937 is quite fast next to a Ziggurat\nalgorithm from the GSL. However, the ``FAST`` Box-Muller method implementation\nwith also a Mersenne Twister is much faster than the ``MKL``'s Box-Muller on\nshort frames but the last takes some distance on longer ones.\n"
},
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/simulation/parameters/chn/implem_comparison_AWGN.csv",
"new_path": "doc/sphinx/source/simulation/parameters/chn/implem_comparison_AWGN.csv",
"diff": "Frame size;STD;FAST;MKL;GSL\n-16;31,8;99,12;29,8;11,76\n-32;30,05;134,94;53,72;12,34\n-64;30,78;165,92;93,8;12,86\n-128;31,24;188,06;148,31;12,96\n-256;31,41;199,14;204,53;12,87\n-512;31,52;199,43;267,74;13,2\n-1024;31,79;199,71;331,71;12,94\n-2048;31,61;200,16;342,06;12,89\n-4096;31,88;198,88;343,4;12,62\n-8192;30,43;195,78;342,59;13,01\n+16 ;31,80; 99,12; 29,80;20,94\n+32 ;30,05;134,94; 53,72;22,14\n+64 ;30,78;165,92; 93,80;25,86\n+128 ;31,24;188,06;148,31;25,59\n+256 ;31,41;199,14;204,53;28,28\n+512 ;31,52;199,43;267,74;26,21\n+1024;31,79;199,71;331,71;27,75\n+2048;31,61;200,16;342,06;27,77\n+4096;31,88;198,88;343,40;28,57\n+8192;30,43;195,78;342,59;27,98\n"
}
] |
C++
|
MIT License
|
aff3ct/aff3ct
|
Doc: Update the througput of the GSL channels since it is using the Ziggurat algorithm now.
|
8,483 |
16.11.2018 10:18:05
| -3,600 |
0818bd89bd05421bb14b54749fc568db461dd302
|
Doc: Work on monitors parameters.
|
[
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/simulation/parameters/mnt/mnt.rst",
"new_path": "doc/sphinx/source/simulation/parameters/mnt/mnt.rst",
"diff": "Monitor parameters\n------------------\n+The Monitor is the last module in the chain as it compares the decoded frame\n+with the initially generated one in the Source module. Furthermore, it can\n+also compute the mutual information at the output of the demodulator.\n+It has also the power to limit the currently running simulated noise point as it\n+can stop it when a given amount of frame errors is reached. An histogram of the\n+number of errors per frame for each noise point can be dumped, too.\n+\n+\n+.. _mnt-mnt-max-fe:\n+\n+``--mnt-max-fe, -e``\n+\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n+\n+ :Type: integer\n+ :Default: 100\n+ :Examples: ``--mnt-max-fe 25``\n+\n+Sets the maximum number of frame errors simulated for each noise point.\n+\n.. _mnt-mnt-err-hist:\n``--mnt-err-hist``\n@@ -11,7 +30,8 @@ Monitor parameters\n:Type: integer\n:Examples: ``--mnt-err-hist 1``\n-Activate the histogram of the number of errors per frame. Set the max number of bit error per frame included in the histogram (0 is no limit).\n+Activates the histogram of the number of errors per frame. Sets also the maximum\n+number of bit error per frame included in the histogram (0 is no limit).\n.. _mnt-mnt-err-hist-path:\n@@ -20,25 +40,26 @@ Activate the histogram of the number of errors per frame. Set the max number of\n:Type: file\n:Rights: write only\n- :Examples: ``--mnt-err-hist-path example/path/to/the/right/file``\n+ :Default: :file:`./hist`\n+ :Examples: ``--mnt-err-hist-path my/histogram/root/path/name``\n-Path to the output histogram (default is './hist', add automatically the current noise value and the extension '.txt').\n-\n-.. _mnt-mnt-max-fe:\n+Path to the output histogram. When files are dumped, the current noise value\n+is added to this name with the *.txt* extension.\n-``--mnt-max-fe, -e``\n-\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n+An output filename example is :file:`hist_2.000000.txt` for a noise value of\n+:math:`2\\ dB`.\n+For `Gnuplot <http://www.gnuplot.info/>`_ users you can then simply display the\n+histogram with a simple command:\n- :Type: integer\n- :Examples: ``--mnt-max-fe 1``\n+.. code-block:: bash\n-Max number of frame errors for each noise point simulation.\n+ gnuplot -e \"set key autotitle columnhead; plot 'hist_2.000000.txt' with lines; pause -1\"\n.. _mnt-mnt-mutinfo:\n``--mnt-mutinfo``\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n+Activates the computation of the mutual information.\n-Allow the computation of the mutual information.\n-\n+.. note:: Available only on ``BFER`` simulation types (:ref:`sim-sim-type`).\n\\ No newline at end of file\n"
}
] |
C++
|
MIT License
|
aff3ct/aff3ct
|
Doc: Work on monitors parameters.
|
8,483 |
16.11.2018 10:33:50
| -3,600 |
9942036f06c4cc75c6e21b7637430fb10c33ed59
|
Doc: change module parameters display order and add title reference anchors.
|
[
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/simulation/overview/overview.rst",
"new_path": "doc/sphinx/source/simulation/overview/overview.rst",
"diff": "+.. _simulation_overview:\n+\n+\nOverview\n--------\n"
},
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/simulation/parameters/parameters.rst",
"new_path": "doc/sphinx/source/simulation/parameters/parameters.rst",
"diff": "-.. _parameters:\n+.. _simulation_parameters:\nParameters\n^^^^^^^^^^\n@@ -10,11 +10,11 @@ Parameters\nsim/sim\nsrc/src\ncrc/crc\n- mdm/mdm\ncdc/cdc\n+ itl/itl\n+ mdm/mdm\nchn/chn\n+ qnt/qnt\nmnt/mnt\nter/ter\n- itl/itl\n- qnt/qnt\nglobal/global\n"
}
] |
C++
|
MIT License
|
aff3ct/aff3ct
|
Doc: change module parameters display order and add title reference anchors.
|
8,483 |
16.11.2018 10:45:14
| -3,600 |
24d184c502b47aee2fbe63829aa1e0d71ed5871b
|
Doc: Work on the terminal parameters.
|
[
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/simulation/parameters/ter/ter.rst",
"new_path": "doc/sphinx/source/simulation/parameters/ter/ter.rst",
"diff": "Terminal parameters\n-------------------\n+The Terminal is an observer module that reads the information to display\n+from the monitor in real time.\n+\n+.. hint:: The intermediate results are dumped on the **error output** of the\n+ program when the final display is made on the **standard output**.\n+ So when launching AFF3CT you can redirect the last one to a file to save\n+ results and still seeing the intermediate reports on your terminal.\n+ See :ref:`simulation_overview` for more details about how to launch AFF3CT.\n+\n+.. note:: Intermediate results of a same noise point are always displayed on the\n+ same line. They finish with a carrier return **\\\\r** character.\n+\n.. _ter-ter-freq:\n``--ter-freq``\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n:Type: integer\n+ :Default: 500\n:Examples: ``--ter-freq 1``\n-Display frequency in ms (refresh time step for each iteration, 0 = disable display refresh).\n+Sets the display frequency (refresh time) in *[ms]*, for each iteration.\n+Setting 0 disables the refresh to dump only the final result.\n.. _ter-ter-no:\n``--ter-no``\n\"\"\"\"\"\"\"\"\"\"\"\"\n-\n-Disable reporting for each iteration.\n+Disables completely the terminal report.\n.. _ter-ter-type:\n@@ -28,9 +41,10 @@ Disable reporting for each iteration.\n:Type: text\n:Allowed values: ``STD``\n+ :Default: ``STD``\n:Examples: ``--ter-type STD``\n-Type of the terminal to use to display results.\n+Type of the terminal to use to format the displayed results.\nDescription of the allowed values:\n@@ -40,6 +54,7 @@ Description of the allowed values:\n| ``STD`` | |ter-type_descr_std| |\n+---------+----------------------+\n-.. |ter-type_descr_std| replace:: TODO VALUE STD\n+.. |ter-type_descr_std| replace:: This is the standard format readable by\n+ :ref:`pyber`\n"
},
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/simulation/pyber/pyber.rst",
"new_path": "doc/sphinx/source/simulation/pyber/pyber.rst",
"diff": "+.. _pyber:\n+\nPyBER\n^^^^^\n"
}
] |
C++
|
MIT License
|
aff3ct/aff3ct
|
Doc: Work on the terminal parameters.
|
8,483 |
16.11.2018 12:01:30
| -3,600 |
3886f16e65916a5a0f461a2be92fe0e0a2868881
|
Doc: work on quantizer parameters.
|
[
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/simulation/parameters/qnt/qnt.rst",
"new_path": "doc/sphinx/source/simulation/parameters/qnt/qnt.rst",
"diff": "Quantizer parameters\n--------------------\n-.. _qnt-qnt-bits:\n+The Quantizer module is activated only when running quantified decoders, ie.\n+when the simulation precision is set to ``8`` or ``16``\n+(cf. :ref:`sim-sim-prec`).\n-``--qnt-bits``\n-\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n+It converts input floating points frames into output quantified fixed point\n+frames. The position of the fixed point is settable by the user.\n- :Type: integer\n- :Examples: ``--qnt-bits 1``\n+.. Danger:: The total number of bits used for the quantification does not fix\n+ a saturation for the decoder itself that uses the whole available bits given\n+ by the simulation precision.\n-The number of bits used for the quantizer.\n+.. Warning:: All codes do not work with a quantification process.\n-.. _qnt-qnt-dec:\n+.. TODO: list those codes that do not work with fixed point.\n-``--qnt-dec``\n-\"\"\"\"\"\"\"\"\"\"\"\"\"\n+.. _qnt-qnt-type:\n- :Type: integer\n- :Examples: ``--qnt-dec 1``\n+``--qnt-type``\n+\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n-The position of the fixed point in the quantified representation.\n+ :Type: text\n+ :Allowed values: ``CUSTOM`` ``POW2``\n+ :Default: ``POW2``\n+ :Examples: ``--qnt-type CUSTOM``\n-.. _qnt-qnt-implem:\n+Type of the quantizer to use in the simulation.\n-``--qnt-implem``\n-\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n- :Type: text\n- :Allowed values: ``FAST`` ``STD``\n- :Examples: ``--qnt-implem FAST``\n-Select the implementation of quantizer.\nDescription of the allowed values:\n-+----------+-------------------------+\n++------------+-------------------------+\n| Value | Description |\n-+==========+=========================+\n-| ``FAST`` | |qnt-implem_descr_fast| |\n-+----------+-------------------------+\n-| ``STD`` | |qnt-implem_descr_std| |\n-+----------+-------------------------+\n++============+=========================+\n+| ``CUSTOM`` | |qnt-type_descr_custom| |\n++------------+-------------------------+\n+| ``POW2`` | |qnt-type_descr_pow2| |\n++------------+-------------------------+\n+\n+.. |qnt-type_descr_custom| replace:: :math:`Q_i = \\begin{cases}\n+ +v_{sat} & \\text{when } v_i > +v_{sat} \\\\\n+ -v_{sat} & \\text{when } v_i < -v_{sat} \\\\\n+ v_i & \\text{else}\n+ \\end{cases}` with :math:`v_i = \\lfloor \\frac{Y_i}{\\Delta} \\rceil\n+ \\text{ and } v_{sat} = 2^{p_b - 1} - 1\n+ \\text{ and } \\Delta = \\frac{|p_r|}{v_{sat}}`\n-.. |qnt-implem_descr_fast| replace:: TODO VALUE FAST\n-.. |qnt-implem_descr_std| replace:: TODO VALUE STD\n+.. |qnt-type_descr_pow2| replace:: :math:`Q_i = \\begin{cases}\n+ +v_{sat} & \\text{when } v_i > +v_{sat} \\\\\n+ -v_{sat} & \\text{when } v_i < -v_{sat} \\\\\n+ v_i & \\text{else}\n+ \\end{cases}` with :math:`v_i = \\lfloor Y_i * F \\rceil\n+ \\text{ and } v_{sat} = 2^{p_b - 1} - 1\n+ \\text{ and } F = 2^{p_d}`\n+\n+Where :math:`p_r`, :math:`p_b` and :math:`p_d` are respectively given through\n+:ref:`qnt-qnt-range`, :ref:`qnt-qnt-bits` and :ref:`qnt-qnt-dec`.\n.. _qnt-qnt-range:\n@@ -58,28 +73,80 @@ Description of the allowed values:\nThe min/max bound for the tricky quantizer.\n-.. _qnt-qnt-type:\n-``--qnt-type``\n+.. _qnt-qnt-bits:\n+\n+``--qnt-bits``\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n+ :Type: integer\n+ :Default: 8 else see :numref:`bits_default_table`\n+ :Examples: ``--qnt-bits 1``\n+\n+Sets the number of bits used for the quantizer.\n+\n+\n+.. _bits_default_table:\n+\n+.. table:: Default values for the total number of bits for the different codes.\n+\n+ +----------+----------+-----------+---------+---------+------------+-----------+--------------+---------------+\n+ | Code | ``LDPC`` | ``POLAR`` | ``REP`` | ``RSC`` | ``RSC_DB`` | ``TURBO`` | ``TURBO_DB`` | ``TURBO_PROD``|\n+ +==========+==========+===========+=========+=========+============+===========+==============+===============+\n+ | Value | 6 | 6 | 6 | 6 | 6 | 6 | 6 ||bit_turboprod||\n+ +----------+----------+-----------+---------+---------+------------+-----------+--------------+---------------+\n+\n+.. |bit_turboprod| replace:: 6 on 8 bits and 8 on 16 bits\n+\n+.. _qnt-qnt-dec:\n+\n+``--qnt-dec``\n+\"\"\"\"\"\"\"\"\"\"\"\"\"\n+\n+ :Type: integer\n+ :Default: 3 else see :numref:`dec_default_table`\n+ :Examples: ``--qnt-dec 1``\n+\n+Sets the position of the fixed point in the quantified representation.\n+\n+.. _dec_default_table:\n+\n+.. table:: Default values for the fixed point position for the different codes.\n+\n+ +----------+----------+-----------+---------+-----------+------------+-----------+--------------+---------------+\n+ | Code | ``LDPC`` | ``POLAR`` | ``REP`` | ``RSC`` | ``RSC_DB`` | ``TURBO`` | ``TURBO_DB`` | ``TURBO_PROD``|\n+ +==========+==========+===========+=========+===========+============+===========+==============+===============+\n+ | Value | 2 | 1 | 2 | |dec_RSC| | |dec_RSCDB|||dec_turbo|| |dec_turbodb|||dec_turboprod||\n+ +----------+----------+-----------+---------+-----------+------------+-----------+--------------+---------------+\n+\n+.. |dec_RSC| replace:: 1 on 8 bits and 3 on 16 bits\n+.. |dec_RSCDB| replace:: 1 on 8 bits and 3 on 16 bits\n+.. |dec_turbo| replace:: 2 on 8 bits and 3 on 16 bits\n+.. |dec_turbodb| replace:: 2 on 8 bits and 3 on 16 bits\n+.. |dec_turboprod| replace:: 2 on 8 bits and 3 on 16 bits\n+\n+.. _qnt-qnt-implem:\n+\n+``--qnt-implem``\n+\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n+\n:Type: text\n- :Allowed values: ``CUSTOM`` ``POW2``\n- :Examples: ``--qnt-type CUSTOM``\n+ :Allowed values: ``FAST`` ``STD``\n+ :Default: ``STD``\n+ :Examples: ``--qnt-implem FAST``\n-Type of the quantizer to use in the simulation.\n+Selects the implementation of the quantizer.\nDescription of the allowed values:\n-+------------+-------------------------+\n++----------+-------------------------+\n| Value | Description |\n-+============+=========================+\n-| ``CUSTOM`` | |qnt-type_descr_custom| |\n-+------------+-------------------------+\n-| ``POW2`` | |qnt-type_descr_pow2| |\n-+------------+-------------------------+\n-\n-.. |qnt-type_descr_custom| replace:: TODO VALUE CUSTOM\n-.. |qnt-type_descr_pow2| replace:: TODO VALUE POW2\n-\n++==========+=========================+\n+| ``FAST`` | |qnt-implem_descr_fast| |\n++----------+-------------------------+\n+| ``STD`` | |qnt-implem_descr_std| |\n++----------+-------------------------+\n+.. |qnt-implem_descr_fast| replace:: A standard implementation\n+.. |qnt-implem_descr_std| replace:: A much faster method using |SIMD| but *only\n+ for* ``POW2`` *type*.\n"
}
] |
C++
|
MIT License
|
aff3ct/aff3ct
|
Doc: work on quantizer parameters.
|
8,483 |
16.11.2018 15:27:12
| -3,600 |
f1b5d6575636f6ea868d623fe4233d5e38ca7b4f
|
Doc: Update GSL throughput for AWGN channel with an unused computer.
|
[
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/simulation/parameters/chn/implem_comparison_AWGN.csv",
"new_path": "doc/sphinx/source/simulation/parameters/chn/implem_comparison_AWGN.csv",
"diff": "Frame size;STD;FAST;MKL;GSL\n-16 ;31,80; 99,12; 29,80;20,94\n-32 ;30,05;134,94; 53,72;22,14\n-64 ;30,78;165,92; 93,80;25,86\n-128 ;31,24;188,06;148,31;25,59\n-256 ;31,41;199,14;204,53;28,28\n-512 ;31,52;199,43;267,74;26,21\n-1024;31,79;199,71;331,71;27,75\n-2048;31,61;200,16;342,06;27,77\n-4096;31,88;198,88;343,40;28,57\n-8192;30,43;195,78;342,59;27,98\n+16 ;31,80; 99,12; 29,80;41,39\n+32 ;30,05;134,94; 53,72;46,76\n+64 ;30,78;165,92; 93,80;52,79\n+128 ;31,24;188,06;148,31;54,77\n+256 ;31,41;199,14;204,53;55,38\n+512 ;31,52;199,43;267,74;55,49\n+1024;31,79;199,71;331,71;56,15\n+2048;31,61;200,16;342,06;56,32\n+4096;31,88;198,88;343,40;57,42\n+8192;30,43;195,78;342,59;56,92\n"
}
] |
C++
|
MIT License
|
aff3ct/aff3ct
|
Doc: Update GSL throughput for AWGN channel with an unused computer.
|
8,483 |
16.11.2018 18:08:57
| -3,600 |
4ad43965a4fbc67973fcc1c1a71119c9d95d85c3
|
Doc: Fill the simulation parameters. Add the sim-mpi-comm argument.
|
[
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/conf.py",
"new_path": "doc/sphinx/source/conf.py",
"diff": "@@ -235,6 +235,9 @@ rst_epilog = \"\"\"\n.. |SIMD| replace:: :abbr:`SIMD (Single Instruction Multiple Data)`\n+.. |BFER| replace:: :abbr:`BFER (Bit and Frame Error Rate)`\n+.. |SNR| replace:: :abbr:`SNR (Signal Noise Ratio)`\n+\n\"\"\"\n# -- Extension configuration -------------------------------------------------\n\\ No newline at end of file\n"
},
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/simulation/parameters/sim/sim.rst",
"new_path": "doc/sphinx/source/simulation/parameters/sim/sim.rst",
"diff": "@@ -7,6 +7,48 @@ The simulation parameters allow the selection of the code to simulate on a\nselected chain, as well as the noise range to run.\nThey give also access to powerful tools to debug the simulated modules.\n+.. _sim-sim-type:\n+\n+``--sim-type``\n+\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n+\n+ :Type: text\n+ :Allowed values: ``BFER`` ``BFERI`` ``EXIT``\n+ :Default: ``BFER``\n+ :Examples: ``--sim-type BFERI``\n+\n+Selects the type of simulation to launch. This will personalize the available\n+arguments in function of the chosen chain.\n+\n+Description of the allowed values:\n+\n++-----------+------------------------+\n+| Value | Description |\n++===========+========================+\n+| ``BFER`` | |sim-type_descr_bfer| |\n++-----------+------------------------+\n+| ``BFERI`` | |sim-type_descr_bferi| |\n++-----------+------------------------+\n+| ``EXIT`` | |sim-type_descr_exit| |\n++-----------+------------------------+\n+\n+.. |sim-type_descr_bfer| replace:: The standard |BFER| chain (:numref:`image_bfer`)\n+.. |sim-type_descr_bferi| replace:: The iterative |BFER| chain (:numref:`image_bferi`)\n+.. |sim-type_descr_exit| replace:: The EXIT simulation chain\n+\n+.. _image_bfer:\n+\n+.. figure:: images/bfer.png\n+ :align: left\n+\n+ The standard |BFER| chain.\n+\n+.. _image_bferi:\n+\n+.. figure:: images/bferi.png\n+ :align: left\n+\n+ The iterative |BFER| chain.\n.. _sim-sim-cde-type:\n@@ -18,7 +60,8 @@ They give also access to powerful tools to debug the simulated modules.\n``RSC_DB`` ``TURBO`` ``TURBO_DB`` ``TURBO_PROD`` ``UNCODED``\n:Examples: ``-C BCH``\n-Select the code type you want to use.\n+Select the code type you want to use. This will personalize the available\n+arguments in function of the chosen code.\nDescription of the allowed values:\n@@ -77,6 +120,44 @@ Description of the allowed values:\nare available in ``BFERI`` simulation type.\n+.. _sim-sim-prec:\n+\n+``--sim-prec, -p``\n+\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n+\n+ :Type: integer\n+ :Default: ``32``\n+ :Allowed values: ``8`` ``16`` ``32`` ``64``\n+ :Examples: ``--sim-prec 8``\n+\n+Sets the simulation precision in bits.\n+\n+Description of the allowed values:\n+\n++--------+---------------------+\n+| Value | Description |\n++========+=====================+\n+| ``8`` | |sim-prec_descr_8| |\n++--------+---------------------+\n+| ``16`` | |sim-prec_descr_16| |\n++--------+---------------------+\n+| ``32`` | |sim-prec_descr_32| |\n++--------+---------------------+\n+| ``64`` | |sim-prec_descr_64| |\n++--------+---------------------+\n+\n+.. |sim-prec_descr_8| replace:: Precision on *8* bits\n+.. |sim-prec_descr_16| replace:: Precision on *16* bits\n+.. |sim-prec_descr_32| replace:: Precision on *32* bits\n+.. |sim-prec_descr_64| replace:: Precision on *64* bits\n+\n+The ``8`` and ``16`` precision activate the\n+:ref:`Quantizer <qnt-quantizer-parameters>` module in the chains for fixed\n+point decoding.\n+\n+.. note:: The ``EXIT`` simulation chain is not available with fixed point\n+ precision.\n+\n.. _sim-sim-noise-type:\n``--sim-noise-type, -E``\n@@ -85,7 +166,7 @@ Description of the allowed values:\n:Type: text\n:Allowed values: ``EBN0`` ``ESN0`` ``EP`` ``ROP``\n:Default: ``EBN0``\n- :Examples: ``--sim-noise-type EBN0``\n+ :Examples: ``-E EBN0``\nSelects the type of **noise** used to simulate.\n@@ -103,8 +184,8 @@ Description of the allowed values:\n| ``ROP`` | |sim-noise-type_descr_rop| |\n+----------+-----------------------------+\n-.. |sim-noise-type_descr_ebn0| replace:: Signal Noise Ratio per **information bit**\n-.. |sim-noise-type_descr_esn0| replace:: Signal Noise Ratio per **transmitted symbol**\n+.. |sim-noise-type_descr_ebn0| replace:: |SNR| per **information bit**\n+.. |sim-noise-type_descr_esn0| replace:: |SNR| per **transmitted symbol**\n.. |sim-noise-type_descr_ep| replace:: Event Probability\n.. |sim-noise-type_descr_rop| replace:: Received Optical Power\n@@ -124,7 +205,7 @@ Description of the allowed values:\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n:Type: real number\n- :Examples: ``--sim-noise-min 0.0``\n+ :Examples: ``-m 0.0``\nGives the minimal noise energy point to simulate.\n@@ -139,7 +220,7 @@ Gives the minimal noise energy point to simulate.\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n:Type: real number\n- :Examples: ``--sim-noise-max 5.0``\n+ :Examples: ``-M 5.0``\nGives the maximal noise energy to simulate.\n@@ -154,7 +235,7 @@ Gives the maximal noise energy to simulate.\n:Type: real number\n:Default: 0.1\n- :Examples: ``--sim-noise-step 1.0``\n+ :Examples: ``-s 1.0``\nGives the noise energy step between each simulation iteration.\n@@ -169,7 +250,7 @@ Gives the noise energy step between each simulation iteration.\n:Type: Matlab style vector\n:Default: step of 0.1\n- :Examples: ``--sim-noise-range \"0.5:1,1:0.05:1.2,1.21\"``\n+ :Examples: ``-R \"0.5:1,1:0.05:1.2,1.21\"``\nSet the noise energy range to run in a Matlab style vector.\nThe given example will run the following noise points::\n@@ -183,47 +264,83 @@ The given example will run the following noise points::\n:ref:`sim-sim-noise-step` are ignored. But it is not required anymore if\n:ref:`sim-sim-noise-min` and :ref:`sim-sim-noise-max` are set.\n+.. _sim-sim-pdf-path:\n+\n+``--sim-pdf-path``\n+\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n+\n+ :Type: file\n+ :Rights: read only\n+ :Examples: ``--sim-pdf-path example/path/to/the/right/file``\n+\n+Gives a file that contains PDF for different SNR.\n+To use with the ``OPTICAL`` :ref:`channel type <chn-chn-type>`.\n+\n+It sets the noise range from the given ones in the file.\n+However, it is overwritten by :ref:`sim-sim-noise-range` or limited\n+by :ref:`sim-sim-noise-min` and :ref:`sim-sim-noise-max` with a minimum step of\n+:ref:`sim-sim-noise-step` between two values.\n+\n+\n+.. _sim-sim-meta:\n+\n+``--sim-meta``\n+\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n+\n+ :Type: text\n+ :Examples: ``--sim-meta \"TODO CHECK VALUE\"``\n+\n+Prints the output with meta-data readable by :ref:`pyber_overview`.\n+The given text is considered as the simulation title.\n+Automatically printed meta-data are the *command* and the *title*.\n+\n.. _sim-sim-coded:\n``--sim-coded``\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n-Enable the coded monitoring (extends the monitored bits to the entire codeword).\n+Enables the coded monitoring. This means that the monitoring is done on the\n+entire codeword instead of only the information bits. This gives theoretically\n+an equal or worse |BFER| result.\n.. _sim-sim-coset:\n``--sim-coset, -c``\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n-Enable the coset approach.\n+Enables the COSET approach. This methods flips the value of the input and of the\n+output of the decoder in function of the original codeword bits. The flipped\n+values are the matching bit at 1 in the codeword. Then the decoder works like on\n+an all zero codeword. This is useful when developing a decoder without\n+associated encoder. This activates automatically the ``COSET`` encoder and\n+vice-versa.\n-.. _sim-sim-crc-start:\n+.. TODO : add a link to the COSET encoder.\n-``--sim-crc-start``\n-\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n-\n- :Type: integer\n- :Examples: ``--sim-crc-start 1``\n-\n-Iteration number to start the CRC checking in the turbo demodulation process.\n-\n-.. note::\n-\n- Available only for BFERI simulations\n.. _sim-sim-debug:\n``--sim-debug``\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n-Enable debug mode: print array values after each step.\n+Activates the debug mode. This prints the frame values after each module\n+step.\n+\n+.. note:: Debug mode runs the simulation on one thread only. Then you may need\n+ to remove the :ref:`sim-sim-threads` from your command line if you use it.\n+\n+.. hint:: To keep a readable debug log, use :ref:`mnt-mnt-max-fe` or\n+ :ref:`sim-sim-max-frame` to stop your\n+ simulation after that a given amount of frames have been played. You may also\n+ think about using :ref:`sim-sim-debug-limit` when playing with too long\n+ frames (more than 32 bits in function of your screen size).\n.. _sim-sim-debug-hex:\n``--sim-debug-hex``\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n-Debug mode prints values in the hexadecimal format.\n+Activates the debug mode and prints values in the hexadecimal format.\n.. _sim-sim-debug-limit:\n@@ -231,9 +348,11 @@ Debug mode prints values in the hexadecimal format.\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n:Type: integer\n+ :Default: 0\n:Examples: ``--sim-debug-limit 1``\n-Set the max number of elements to display in the debug mode.\n+Activates the debug mode and sets the max number of elements to display per\n+frame. A number of elements at 0 means there is no dump limit.\n.. _sim-sim-debug-prec:\n@@ -241,156 +360,149 @@ Set the max number of elements to display in the debug mode.\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n:Type: integer\n+ :Default: 2\n:Examples: ``--sim-debug-prec 1``\n-Set the precision of real elements when displayed in debug mode.\n-\n-.. _sim-sim-ite:\n-\n-``--sim-ite, -I``\n-\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n-\n- :Type: integer\n- :Examples: ``--sim-ite 1``\n-\n-Number of global iterations between the demodulator and the decoder.\n-\n-.. note::\n-\n- Available only for BFERI simulations\n-\n-.. _sim-sim-meta:\n-\n-``--sim-meta``\n-\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n-\n- :Type: text\n- :Examples: ``--sim-meta \"TODO CHECK VALUE\"``\n-\n-Print the output with metadata, takes the simulation title.\n+Activates the debug mode and sets the decimal precision (number of digits for\n+decimal part) of real elements.\n.. _sim-sim-no-colors:\n``--sim-no-colors``\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n+Disables the colors in the shell.\n-Disable the colors in the shell.\n-\n+.. note:: AFF3CT uses the `rang <https://github.com/agauniyal/rang>`_ library\n+ that is portable on every OS as it only depends on C++ standard library.\n+ Furthermore, rang doesn't interfere when redirecting cout/cerr/clog to\n+ somewhere else and leaves the decision to the library user.\n-.. _sim-sim-pdf-path:\n+.. _sim-sim-seed:\n-``--sim-pdf-path``\n+``--sim-seed, -S``\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n- :Type: file\n- :Rights: read only\n- :Examples: ``--sim-pdf-path example/path/to/the/right/file``\n+ :Type: integer\n+ :Default: 0\n+ :Examples: ``--sim-seed 42``\n-A file that contains PDF for different SNR. Set the SNR range from the given ones. Overwritten by -R or limited by -m and -M with a minimum step of -s.\n+Sets the seed used in the simulation to initialize the general pseudo random\n+generators. This last generator is used to generate the seeds of the different\n+random generators of all modules.\n-.. _sim-sim-prec:\n+.. note:: When using **MPI**, each node has its own seed generated from this\n+ initial value to guarantee the generation of different values between the\n+ different computers.\n-``--sim-prec, -p``\n-\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n+.. TODO : add link to MPI use\n- :Type: integer\n- :Allowed values: ``8`` ``16`` ``32`` ``64``\n- :Examples: ``--sim-prec 8``\n+.. _sim-sim-stats:\n-The simulation precision in bits.\n+``--sim-stats``\n+\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n-Description of the allowed values:\n+Displays the statistics module by module noise point after noise point.\n+Statistics show the time used by each module in the simulation, the\n+throughput and latency (min, max and average) by task.\n-+--------+---------------------+\n-| Value | Description |\n-+========+=====================+\n-| ``8`` | |sim-prec_descr_8| |\n-+--------+---------------------+\n-| ``16`` | |sim-prec_descr_16| |\n-+--------+---------------------+\n-| ``32`` | |sim-prec_descr_32| |\n-+--------+---------------------+\n-| ``64`` | |sim-prec_descr_64| |\n-+--------+---------------------+\n-\n-.. |sim-prec_descr_8| replace:: TODO VALUE 8\n-.. |sim-prec_descr_16| replace:: TODO VALUE 16\n-.. |sim-prec_descr_32| replace:: TODO VALUE 32\n-.. |sim-prec_descr_64| replace:: TODO VALUE 64\n+.. _sim-sim-threads:\n+``--sim-threads, -t``\n+\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n-.. _sim-sim-seed:\n+ :Type: integer\n+ :Default: 0\n+ :Examples: ``--sim-threads 1``\n-``--sim-seed, -S``\n-\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n+Specifies the number of threads used by the simulation.\n+A 0 value means the maximum number of thread supported by the processor, ie.\n+the number of core (physical + virtual).\n- :Type: integer\n- :Examples: ``--sim-seed 1``\n+..note:: The simulation throughput is linear with the number of physical cores\n+ used, but the contribution of the virtual cores is more limited.\n-Seed used in the simulation to initialize the pseudo random generators in general.\n+.. _sim-sim-crc-start:\n-.. _sim-sim-stats:\n+``--sim-crc-start``\n+\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n-``--sim-stats``\n-\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n+ :Type: integer\n+ :Default: 2\n+ :Examples: ``--sim-crc-start 1``\n+Sets the number of simulation iteration needed before starting the CRC checking\n+in the turbo demodulation process.\n-Display statistics module by module.\n+.. note:: Available only for BFERI simulations.\n-.. _sim-sim-threads:\n+.. _sim-sim-ite:\n-``--sim-threads, -t``\n-\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n+``--sim-ite, -I``\n+\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n:Type: integer\n- :Examples: ``--sim-threads 1``\n+ :Default: 15\n+ :Examples: ``--sim-ite 10``\n-Enable multi-threaded mode and specify the number of threads (0 means the maximum supported by the core.\n+Sets the number of global iterations between the demodulator and the decoder.\n-.. _sim-sim-type:\n+.. note:: Available only for BFERI simulations.\n-``--sim-type``\n-\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n+.. _sim-sim-max-frame:\n- :Type: text\n- :Allowed values: ``BFER`` ``BFERI`` ``EXIT``\n- :Examples: ``--sim-type BFER``\n+``--sim-max-frame, -n`` |image_advanced_argument|\n+\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n-Select the type of simulation to launch (default is BFER).\n+ :Type: integer\n+ :Default: 0\n+ :Examples: ``--sim-max-frame 1``\n-Description of the allowed values:\n+Maximum number of frames to play after what the current simulated noise point\n+is stopped. A 0 value means no limit. The simulation is also stopped except\n+if the :ref:`sim-sim-crit-nostop` option is used.\n-+-----------+------------------------+\n-| Value | Description |\n-+===========+========================+\n-| ``BFER`` | |sim-type_descr_bfer| |\n-+-----------+------------------------+\n-| ``BFERI`` | |sim-type_descr_bferi| |\n-+-----------+------------------------+\n-| ``EXIT`` | |sim-type_descr_exit| |\n-+-----------+------------------------+\n+.. _sim-sim-stop-time:\n+\n+``--sim-stop-time`` |image_advanced_argument|\n+\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n-.. |sim-type_descr_bfer| replace:: TODO VALUE BFER\n-.. |sim-type_descr_bferi| replace:: TODO VALUE BFERI\n-.. |sim-type_descr_exit| replace:: TODO VALUE EXIT\n+ :Type: integer\n+ :Default: 0\n+ :Examples: ``--sim-stop-time 1``\n+Time in *[sec]* after what the current simulated noise point is stopped.\n+A 0 value means no limit. The simulation is also stopped except\n+if the :ref:`sim-sim-crit-nostop` option is used.\n.. _sim-sim-crit-nostop:\n``--sim-crit-nostop`` |image_advanced_argument|\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n-\n-The stop criteria arguments -stop-time or -max-frame kill the current simulatated noise point but not the simulation.\n+The stop criteria arguments:ref:`sim-sim-max-frame` and :ref:`sim-sim-stop-time`\n+stop only the currently simulated noise point but not the simulation.\n.. _sim-sim-err-trk:\n``--sim-err-trk`` |image_advanced_argument|\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n+Tracks the bad frames. When a wrong frame is detected, the source frame,\n+the encoded frame and the noise applied by the channel are dumped in\n+their respective file. Then use the :ref:`sim-sim-err-trk-rev` argument\n+to run only these bad frames.\n+\n+.. _sim-sim-err-trk-rev:\n+\n+``--sim-err-trk-rev`` |image_advanced_argument|\n+\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n+\n+Automatically replays the saved frames while running with :ref:`sim-sim-err-trk`.\n-Enable the tracking of the bad frames (by default the frames are stored in the current folder).\n+.. tip:: To play back the bad frames, just add **-rev** to the\n+ :ref:`sim-sim-err-trk` argument and change nothing else to your command line\n+ except the debug mode arguments (:ref:`sim-sim-debug`).\n.. _sim-sim-err-trk-path:\n@@ -399,17 +511,22 @@ Enable the tracking of the bad frames (by default the frames are stored in the c\n:Type: file\n:Rights: read/write\n- :Examples: ``--sim-err-trk-path example/path/to/the/right/file``\n+ :Default: :file:`error_tracker`\n+ :Examples: ``--sim-err-trk-path errors/err``\nBase path for the files where the bad frames will be stored or read.\n+To this base path is added the noise point value and the matching module\n+extension. With the above example, you may get files like that:\n-.. _sim-sim-err-trk-rev:\n-\n-``--sim-err-trk-rev`` |image_advanced_argument|\n-\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n+ * :file:`errors/err_0.64.src`\n+ * :file:`errors/err_0.64.enc`\n+ * :file:`errors/err_0.64.chn`\n+.. note:: For |SNR| noise type, the value used to define the filename is the\n+ noise variance.\n-Automatically replay the saved frames.\n+.. attention:: Intermediate folders are not automatically created but only the\n+ files. So be careful to create them before running long simulations!\n.. _sim-sim-err-trk-thold:\n@@ -417,35 +534,39 @@ Automatically replay the saved frames.\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n:Type: integer\n+ :Default: 0\n:Examples: ``--sim-err-trk-thold 1``\n-Dump only frames with a bit error count above or equal to this threshold.\n-\n-.. _sim-sim-max-frame:\n-\n-``--sim-max-frame, -n`` |image_advanced_argument|\n-\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n-\n- :Type: integer\n- :Examples: ``--sim-max-frame 1``\n-\n-Maximum number of frames to play after what the current simulatated noise stops (0 is infinite).\n+Gives the threshold value of bit error count per frame that the error tracker\n+has to dump.\n.. _sim-sim-no-legend:\n``--sim-no-legend`` |image_advanced_argument|\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n+Strictly no legend will be displayed when launching the simulation.\n-Do not display any legend when launching the simulation.\n+.. tip::\n-.. _sim-sim-stop-time:\n+ Use this option when you want to complete an already existing\n+ simulation result file with new noise points. Pay attention to use ``>>``\n+ to redirect the standard output instead of ``>`` to add results at the end of\n+ the file and to not overwrite it.\n-``--sim-stop-time`` |image_advanced_argument|\n-\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n+.. _sim-sim-mpi-comm:\n+\n+``--sim-mpi-comm``\n+\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n:Type: integer\n- :Examples: ``--sim-stop-time 1``\n+ :Default: 1000\n+ :Examples: ``--sim-mpi-comm 1``\n-Time in sec after what the current simulatated noise stops (0 is infinite).\n+Sets the ``MPI`` communication frequency between the nodes in *[ms]*.\n+This corresponds to the frequency with which nodes will gather their results.\n+This operation may take a little time so a a too fast frequency may be\n+sub-productive.\n+.. note:: Available only when compiling with the MPI support\n+ :ref:`compilation_cmake_options`.\n"
},
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/simulation/parameters/ter/ter.rst",
"new_path": "doc/sphinx/source/simulation/parameters/ter/ter.rst",
"diff": "@@ -27,6 +27,9 @@ from the monitor in real time.\nSets the display frequency (refresh time) in *[ms]*, for each iteration.\nSetting 0 disables the refresh to dump only the final result.\n+When MPI is enabled, this value is by default set to the same value than\n+the :ref:`sim-sim-mpi-comm` argument.\n+\n.. _ter-ter-no:\n``--ter-no``\n@@ -55,6 +58,6 @@ Description of the allowed values:\n+---------+----------------------+\n.. |ter-type_descr_std| replace:: This is the standard format readable by\n- :ref:`pyber`\n+ :ref:`pyber_overview`\n"
},
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/simulation/pyber/pyber.rst",
"new_path": "doc/sphinx/source/simulation/pyber/pyber.rst",
"diff": "+.. _pyber_overview:\n+\nPyBER\n^^^^^\n"
}
] |
C++
|
MIT License
|
aff3ct/aff3ct
|
Doc: Fill the simulation parameters. Add the sim-mpi-comm argument.
|
8,483 |
16.11.2018 18:21:38
| -3,600 |
251d810d6de6a200cf26b22958948e339f264d16
|
Doc: work on global arguments.
|
[
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/compilation/compilation.rst",
"new_path": "doc/sphinx/source/compilation/compilation.rst",
"diff": "@@ -287,6 +287,8 @@ syntax to follow:\ncmake .. -DAFF3CT_OPTION=ON\n+.. _compilation_compiler_options:\n+\nCompiler Options\n----------------\n"
},
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/simulation/parameters/global/global.rst",
"new_path": "doc/sphinx/source/simulation/parameters/global/global.rst",
"diff": "Other parameters\n----------------\n+Those arguments are not associated to any module.\n+\n+\n.. _global-help:\n``--help, -h``\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n-\n-Print this help.\n+Prints the help with all the *required* and *optional* arguments.\n+The last change in function of the selected simulation type and code.\n.. _global-advanced-help:\n``--Help, -H``\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n-\n-Print this help with the advanced arguments.\n+Prints the help with in more the advanced arguments.\n.. _global-version:\n``--version, -v``\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n-\n-Print informations about the version of the code.\n+Prints informations about the version of the source code and\n+compilation options.\n.. _global-except-a2l:\n``--except-a2l`` |image_advanced_argument|\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n+Enhances the backtrace when displaying exception.\n+This change the program addresses into filenames and lines.\n+It may take some seconds to do this work.\n-Enhance the backtrace when displaying exception by changing program addresses into file names and lines (may take some seconds).\n+.. note:: This option works only on Unix based OS and if AFF3CT has been\n+ :ref:`compiled <compilation_compiler_options>` with debug symbols\n+ (``-g`` compile flag) and **without** ``NDEBUG`` macro (``-DNDEBUG`` flag).\n.. _global-except-no-bt:\n``--except-no-bt`` |image_advanced_argument|\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n-\n-Do not print the backtrace when displaying exception.\n-\n+Disables the print of backtrace when displaying exception.\n"
}
] |
C++
|
MIT License
|
aff3ct/aff3ct
|
Doc: work on global arguments.
|
8,482 |
16.11.2018 20:25:04
| -10,800 |
3a4dab072268167157b6b8a224af06f658376497
|
LLR calculation refactor
|
[
{
"change_type": "MODIFY",
"old_path": "src/Module/Modem/SCMA/Modem_SCMA.hxx",
"new_path": "src/Module/Modem/SCMA/Modem_SCMA.hxx",
"diff": "@@ -314,30 +314,24 @@ void Modem_SCMA<B,R,Q,PSI>\n// guess at each user\nfor (auto i = 0; i < CB.get_codebook_size(); i++) //codeword index\n{\n- guess(0,i) = msg_res_user(CB.get_user_to_resource(0,0),0,i) * msg_res_user(CB.get_user_to_resource(0,1),0,i);\n- guess(1,i) = msg_res_user(CB.get_user_to_resource(1,0),1,i) * msg_res_user(CB.get_user_to_resource(1,1),1,i);\n- guess(2,i) = msg_res_user(CB.get_user_to_resource(2,0),2,i) * msg_res_user(CB.get_user_to_resource(2,1),2,i);\n- guess(3,i) = msg_res_user(CB.get_user_to_resource(3,0),3,i) * msg_res_user(CB.get_user_to_resource(3,1),3,i);\n- guess(4,i) = msg_res_user(CB.get_user_to_resource(4,0),4,i) * msg_res_user(CB.get_user_to_resource(4,1),4,i);\n- guess(5,i) = msg_res_user(CB.get_user_to_resource(5,0),5,i) * msg_res_user(CB.get_user_to_resource(5,1),5,i);\n+ for (auto j = 0; j < CB.get_number_of_users(); j++) //user index\n+ {\n+ guess(j,i) = msg_res_user(CB.get_user_to_resource(j,0),j,i) * msg_res_user(CB.get_user_to_resource(j,1),j,i);\n+ }\n}\n// LLRs computation\n- Y_N2[0 * this->N + batch *2 +0] = (Q)(std::log(guess(0,0) + guess(0,2)) - std::log(guess(0,1) + guess(0,3)));\n- Y_N2[1 * this->N + batch *2 +0] = (Q)(std::log(guess(1,0) + guess(1,2)) - std::log(guess(1,1) + guess(1,3)));\n- Y_N2[2 * this->N + batch *2 +0] = (Q)(std::log(guess(2,0) + guess(2,2)) - std::log(guess(2,1) + guess(2,3)));\n- Y_N2[3 * this->N + batch *2 +0] = (Q)(std::log(guess(3,0) + guess(3,2)) - std::log(guess(3,1) + guess(3,3)));\n- Y_N2[4 * this->N + batch *2 +0] = (Q)(std::log(guess(4,0) + guess(4,2)) - std::log(guess(4,1) + guess(4,3)));\n- Y_N2[5 * this->N + batch *2 +0] = (Q)(std::log(guess(5,0) + guess(5,2)) - std::log(guess(5,1) + guess(5,3)));\n+ for (auto i = 0; i < CB.get_number_of_users(); i++) //user index\n+ {\n+ Y_N2[i * this->N + batch *2 +0] = (Q)(std::log(guess(i,0) + guess(i,2)) - std::log(guess(i,1) + guess(i,3)));\n+ }\nif((this->N % 2) != 1 || batch != ((this->N /2 +1) -1))\n{\n- Y_N2[0 * this->N + batch *2 +1] = (Q)(std::log(guess(0,0) + guess(0,1)) - std::log(guess(0,2) + guess(0,3)));\n- Y_N2[1 * this->N + batch *2 +1] = (Q)(std::log(guess(1,0) + guess(1,1)) - std::log(guess(1,2) + guess(1,3)));\n- Y_N2[2 * this->N + batch *2 +1] = (Q)(std::log(guess(2,0) + guess(2,1)) - std::log(guess(2,2) + guess(2,3)));\n- Y_N2[3 * this->N + batch *2 +1] = (Q)(std::log(guess(3,0) + guess(3,1)) - std::log(guess(3,2) + guess(3,3)));\n- Y_N2[4 * this->N + batch *2 +1] = (Q)(std::log(guess(4,0) + guess(4,1)) - std::log(guess(4,2) + guess(4,3)));\n- Y_N2[5 * this->N + batch *2 +1] = (Q)(std::log(guess(5,0) + guess(5,1)) - std::log(guess(5,2) + guess(5,3)));\n+ for (auto i = 0; i < CB.get_number_of_users(); i++) //user index\n+ {\n+ Y_N2[i * this->N + batch *2 +1] = (Q)(std::log(guess(i,0) + guess(i,1)) - std::log(guess(i,2) + guess(i,3)));\n+ }\n}\n}\n"
}
] |
C++
|
MIT License
|
aff3ct/aff3ct
|
LLR calculation refactor
|
8,483 |
16.11.2018 18:33:56
| -3,600 |
60119df272e595510db116f7d2c58ce29d3f8451
|
Doc: Add an introduction to the parameters.
|
[
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/simulation/parameters/parameters.rst",
"new_path": "doc/sphinx/source/simulation/parameters/parameters.rst",
"diff": "Parameters\n^^^^^^^^^^\n+AFF3CT contains many arguments classified in three categories:\n+\n+:Required: identified by the |image_required_argument| image, they are\n+ needed to launch a simulation.\n+:Optional: set up the simulation in many ways instead of the default\n+ configuration.\n+:Advanced: identified by the |image_advanced_argument| image, they lead\n+ to a more extensive use of the simulator.\n+\n+\n+The first arguments are those of the simulation. They settle the more important\n+part, the simulation and the code types.\n+Then come arguments that are also classified in function of the module of the\n+chain they impact.\n+\n+\n.. toctree::\n:maxdepth: 1\n:caption: Contents\n"
}
] |
C++
|
MIT License
|
aff3ct/aff3ct
|
Doc: Add an introduction to the parameters.
|
8,482 |
16.11.2018 21:29:14
| -10,800 |
ec5ba78f9c15a5d1c99d6b5cb019a56681ee9e5b
|
Add function for probability normalization
|
[
{
"change_type": "MODIFY",
"old_path": "src/Module/Modem/SCMA/Modem_SCMA.hpp",
"new_path": "src/Module/Modem/SCMA/Modem_SCMA.hpp",
"diff": "@@ -68,6 +68,7 @@ private:\nQ phi(const Q* Y_N1, int i, int j, int k, int re, int batch);\nQ phi(const Q* Y_N1, int i, int j, int k, int re, int batch, const R* H_N);\nvoid demodulate_batch(const Q* Y_N1, Q* Y_N2, int batch);\n+ Q normalize_prob(int user, int resource_ind, int resouce);\n};\n}\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Module/Modem/SCMA/Modem_SCMA.hxx",
"new_path": "src/Module/Modem/SCMA/Modem_SCMA.hxx",
"diff": "@@ -247,66 +247,11 @@ void Modem_SCMA<B,R,Q,PSI>\n// user to resource messaging\nfor (auto i = 0; i < CB.get_number_of_resources(); i++)\n{\n- msg_user_to_resources(0,CB.get_user_to_resource(0,0),i) = msg_res_user(CB.get_user_to_resource(0,1),0,i) /\n- (msg_res_user(CB.get_user_to_resource(0,1),0,0) +\n- msg_res_user(CB.get_user_to_resource(0,1),0,1) +\n- msg_res_user(CB.get_user_to_resource(0,1),0,2) +\n- msg_res_user(CB.get_user_to_resource(0,1),0,3));\n- msg_user_to_resources(0,CB.get_user_to_resource(0,1),i) = msg_res_user(CB.get_user_to_resource(0,0),0,i) /\n- (msg_res_user(CB.get_user_to_resource(0,0),0,0) +\n- msg_res_user(CB.get_user_to_resource(0,0),0,1) +\n- msg_res_user(CB.get_user_to_resource(0,0),0,2) +\n- msg_res_user(CB.get_user_to_resource(0,0),0,3));\n- msg_user_to_resources(1,CB.get_user_to_resource(1,0),i) = msg_res_user(CB.get_user_to_resource(1,1),1,i) /\n- (msg_res_user(CB.get_user_to_resource(1,1),1,0) +\n- msg_res_user(CB.get_user_to_resource(1,1),1,1) +\n- msg_res_user(CB.get_user_to_resource(1,1),1,2) +\n- msg_res_user(CB.get_user_to_resource(1,1),1,3));\n- msg_user_to_resources(1,CB.get_user_to_resource(1,1),i) = msg_res_user(CB.get_user_to_resource(1,0),1,i) /\n- (msg_res_user(CB.get_user_to_resource(1,0),1,0) +\n- msg_res_user(CB.get_user_to_resource(1,0),1,1) +\n- msg_res_user(CB.get_user_to_resource(1,0),1,2) +\n- msg_res_user(CB.get_user_to_resource(1,0),1,3));\n- msg_user_to_resources(2,CB.get_user_to_resource(2,0),i) = msg_res_user(CB.get_user_to_resource(2,1),2,i) /\n- (msg_res_user(CB.get_user_to_resource(2,1),2,0) +\n- msg_res_user(CB.get_user_to_resource(2,1),2,1) +\n- msg_res_user(CB.get_user_to_resource(2,1),2,2) +\n- msg_res_user(CB.get_user_to_resource(2,1),2,3));\n- msg_user_to_resources(2,CB.get_user_to_resource(2,1),i) = msg_res_user(CB.get_user_to_resource(2,0),2,i) /\n- (msg_res_user(CB.get_user_to_resource(2,0),2,0) +\n- msg_res_user(CB.get_user_to_resource(2,0),2,1) +\n- msg_res_user(CB.get_user_to_resource(2,0),2,2) +\n- msg_res_user(CB.get_user_to_resource(2,0),2,3));\n- msg_user_to_resources(3,CB.get_user_to_resource(3,0),i) = msg_res_user(CB.get_user_to_resource(3,1),3,i) /\n- (msg_res_user(CB.get_user_to_resource(3,1),3,0) +\n- msg_res_user(CB.get_user_to_resource(3,1),3,1) +\n- msg_res_user(CB.get_user_to_resource(3,1),3,2) +\n- msg_res_user(CB.get_user_to_resource(3,1),3,3));\n- msg_user_to_resources(3,CB.get_user_to_resource(3,1),i) = msg_res_user(CB.get_user_to_resource(3,0),3,i) /\n- (msg_res_user(CB.get_user_to_resource(3,0),3,0) +\n- msg_res_user(CB.get_user_to_resource(3,0),3,1) +\n- msg_res_user(CB.get_user_to_resource(3,0),3,2) +\n- msg_res_user(CB.get_user_to_resource(3,0),3,3));\n- msg_user_to_resources(4,CB.get_user_to_resource(4,0),i) = msg_res_user(CB.get_user_to_resource(4,1),4,i) /\n- (msg_res_user(CB.get_user_to_resource(4,1),4,0) +\n- msg_res_user(CB.get_user_to_resource(4,1),4,1) +\n- msg_res_user(CB.get_user_to_resource(4,1),4,2) +\n- msg_res_user(CB.get_user_to_resource(4,1),4,3));\n- msg_user_to_resources(4,CB.get_user_to_resource(4,1),i) = msg_res_user(CB.get_user_to_resource(4,0),4,i) /\n- (msg_res_user(CB.get_user_to_resource(4,0),4,0) +\n- msg_res_user(CB.get_user_to_resource(4,0),4,1) +\n- msg_res_user(CB.get_user_to_resource(4,0),4,2) +\n- msg_res_user(CB.get_user_to_resource(4,0),4,3));\n- msg_user_to_resources(5,CB.get_user_to_resource(5,0),i) = msg_res_user(CB.get_user_to_resource(5,1),5,i) /\n- (msg_res_user(CB.get_user_to_resource(5,1),5,0) +\n- msg_res_user(CB.get_user_to_resource(5,1),5,1) +\n- msg_res_user(CB.get_user_to_resource(5,1),5,2) +\n- msg_res_user(CB.get_user_to_resource(5,1),5,3));\n- msg_user_to_resources(5,CB.get_user_to_resource(5,1),i) = msg_res_user(CB.get_user_to_resource(5,0),5,i) /\n- (msg_res_user(CB.get_user_to_resource(5,0),5,0) +\n- msg_res_user(CB.get_user_to_resource(5,0),5,1) +\n- msg_res_user(CB.get_user_to_resource(5,0),5,2) +\n- msg_res_user(CB.get_user_to_resource(5,0),5,3));\n+ for (auto j = 0; j < CB.get_number_of_users(); j++) //user index\n+ {\n+ msg_user_to_resources(j,CB.get_user_to_resource(j,0),i) = normalize_prob(j,1,i);\n+ msg_user_to_resources(j,CB.get_user_to_resource(j,1),i) = normalize_prob(j,0,i);\n+ }\n}\n}\n// end of iterations\n@@ -355,6 +300,23 @@ Q Modem_SCMA<B,R,Q,PSI>\nreturn phi;\n}\n+template <typename B, typename R, typename Q, tools::proto_psi<Q> PSI>\n+Q Modem_SCMA<B,R,Q,PSI>\n+::normalize_prob(int user, int resource_ind, int resouce)\n+{\n+ Q sum = 0;\n+ Q norm_prob = 0;\n+\n+ for(auto i = 0; i < CB.get_codebook_size(); i++) //codeword index\n+ {\n+ sum += msg_res_user(CB.get_user_to_resource(user,resource_ind),user,i);\n+ }\n+\n+ norm_prob = msg_res_user(CB.get_user_to_resource(user,resource_ind),user,resouce)/sum;\n+\n+ return norm_prob;\n+}\n+\ntemplate <typename B, typename R, typename Q, tools::proto_psi<Q> PSI>\nQ Modem_SCMA<B,R,Q,PSI>\n::phi(const Q* Y_N1, int i, int j, int k, int re, int batch, const R* H_N)\n"
}
] |
C++
|
MIT License
|
aff3ct/aff3ct
|
Add function for probability normalization
|
8,482 |
17.11.2018 13:38:52
| -10,800 |
1a2ca4c13d52d1c8255826bf95377ed4d2f2597b
|
Rename normalize_prob -> normalize_prob_msg_res_user for better code understanding
|
[
{
"change_type": "MODIFY",
"old_path": "src/Module/Modem/SCMA/Modem_SCMA.hpp",
"new_path": "src/Module/Modem/SCMA/Modem_SCMA.hpp",
"diff": "@@ -68,7 +68,7 @@ private:\nQ phi(const Q* Y_N1, int i, int j, int k, int re, int batch);\nQ phi(const Q* Y_N1, int i, int j, int k, int re, int batch, const R* H_N);\nvoid demodulate_batch(const Q* Y_N1, Q* Y_N2, int batch);\n- Q normalize_prob(int user, int resource_ind, int resouce);\n+ Q normalize_prob_msg_res_user(int user, int resource_ind, int resouce);\n};\n}\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Module/Modem/SCMA/Modem_SCMA.hxx",
"new_path": "src/Module/Modem/SCMA/Modem_SCMA.hxx",
"diff": "@@ -249,8 +249,8 @@ void Modem_SCMA<B,R,Q,PSI>\n{\nfor (auto j = 0; j < CB.get_number_of_users(); j++) //user index\n{\n- msg_user_to_resources(j, CB.get_user_to_resource(j, 0), i) = normalize_prob(j, 1, i);\n- msg_user_to_resources(j, CB.get_user_to_resource(j, 1), i) = normalize_prob(j, 0, i);\n+ msg_user_to_resources(j, CB.get_user_to_resource(j, 0), i) = normalize_prob_msg_res_user(j, 1, i);\n+ msg_user_to_resources(j, CB.get_user_to_resource(j, 1), i) = normalize_prob_msg_res_user(j, 0, i);\n}\n}\n}\n@@ -302,7 +302,7 @@ Q Modem_SCMA<B,R,Q,PSI>\ntemplate <typename B, typename R, typename Q, tools::proto_psi<Q> PSI>\nQ Modem_SCMA<B,R,Q,PSI>\n-::normalize_prob(int user, int resource_ind, int resouce)\n+::normalize_prob_msg_res_user(int user, int resource_ind, int resouce)\n{\nQ sum = 0;\nQ norm_prob = 0;\n"
}
] |
C++
|
MIT License
|
aff3ct/aff3ct
|
Rename normalize_prob -> normalize_prob_msg_res_user for better code understanding
|
8,483 |
19.11.2018 09:10:40
| -3,600 |
09a776e32919117ba33de43d3277fefcef021935
|
Doc: Cosmetics and add notes in simulation paratmeters.
|
[
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/simulation/parameters/sim/sim.rst",
"new_path": "doc/sphinx/source/simulation/parameters/sim/sim.rst",
"diff": "@@ -112,13 +112,16 @@ Description of the allowed values:\n.. |sim-cde-type_descr_rsc| replace:: The `Recursive Systematic Convolutional`_ code\n.. |sim-cde-type_descr_rsc_db| replace:: The `Recursive Systematic Convolutional`_ code with Double Binary symbols\n.. |sim-cde-type_descr_turbo| replace:: The `Turbo`_ codes\n-.. |sim-cde-type_descr_turbo_db| replace:: The `Turbo`_ codes Double Binary symbols\n+.. |sim-cde-type_descr_turbo_db| replace:: The `Turbo`_ codes with Double Binary symbols\n.. |sim-cde-type_descr_turbo_prod| replace:: The `Turbo Product`_ code\n.. |sim-cde-type_descr_uncoded| replace:: An uncoded simulation\n.. note:: Only ``POLAR``, ``RSC``, ``RSC_DB``, ``LDPC`` and ``UNCODED`` codes\nare available in ``BFERI`` simulation type.\n+.. note:: Only ``POLAR`` and ``RSC`` codes are available in ``EXIT``\n+ simulation type.\n+\n.. _sim-sim-prec:\n@@ -130,7 +133,10 @@ Description of the allowed values:\n:Allowed values: ``8`` ``16`` ``32`` ``64``\n:Examples: ``--sim-prec 8``\n-Sets the simulation precision in bits.\n+Sets the simulation precision in bits. The ``8`` and ``16`` precision activate\n+the :ref:`Quantizer <qnt-quantizer-parameters>` module in the chains for fixed\n+point decoding.\n+\nDescription of the allowed values:\n@@ -151,9 +157,6 @@ Description of the allowed values:\n.. |sim-prec_descr_32| replace:: Precision on *32* bits\n.. |sim-prec_descr_64| replace:: Precision on *64* bits\n-The ``8`` and ``16`` precision activate the\n-:ref:`Quantizer <qnt-quantizer-parameters>` module in the chains for fixed\n-point decoding.\n.. note:: The ``EXIT`` simulation chain is not available with fixed point\nprecision.\n@@ -170,6 +173,23 @@ point decoding.\nSelects the type of **noise** used to simulate.\n+``ESN0`` is automatically calculated from ``EBN0`` and vice-versa with\n+the following equation:\n+\n+.. centered::\n+ :math:`\\frac{E_S}{N_0} = \\frac{E_B}{N_0} + 10.\\log(R.bps)`\n+\n+where :math:`R` is the bit rate and :math:`bps` the number of bits per symbol.\n+\n+Actually, with those noise types, only the noise variance :math:`\\sigma` is\n+given to the different modules, including the channel:\n+\n+.. centered::\n+ :math:`\\sigma = \\sqrt{\\frac{ups}{2 \\times 10^{\\frac{E_S}{N_0} / 10}}}`\n+\n+where :math:`ups` is the up-sampling factor.\n+\n+\nDescription of the allowed values:\n+----------+-----------------------------+\n@@ -189,10 +209,8 @@ Description of the allowed values:\n.. |sim-noise-type_descr_ep| replace:: Event Probability\n.. |sim-noise-type_descr_rop| replace:: Received Optical Power\n-.. note:: ``ESN0`` is automatically calculated from ``EBN0`` and vice-versa.\n-\n.. note:: When selecting ``EP`` the simulator runs in reverse order, ie. from\n- the greatest probability to the smallest one.\n+ the greatest event probability to the smallest one.\n.. hint:: When selecting a ``BEC`` or ``BSC`` channel the ``EP`` noise type is\nautomatically set except if you give another one. This is the same for the\n@@ -209,9 +227,9 @@ Description of the allowed values:\nGives the minimal noise energy point to simulate.\n-.. attention:: This argument is another way to set the noise. It is ignored or\n- not required if :ref:`sim-sim-noise-range` is given, so you may find other\n- piece of information in its description.\n+.. attention:: This argument is another way to set the noise range to simulate.\n+ It is ignored or not required if the argument :ref:`sim-sim-noise-range` is given,\n+ so you may find other piece of information in its description.\n.. _sim-sim-noise-max:\n@@ -224,9 +242,9 @@ Gives the minimal noise energy point to simulate.\nGives the maximal noise energy to simulate.\n-.. attention:: This argument is another way to set the noise. It is ignored or\n- not required if :ref:`sim-sim-noise-range` is given, so you may find other\n- piece of information in its description.\n+.. attention:: This argument is another way to set the noise range to simulate.\n+ It is ignored or not required if the argument :ref:`sim-sim-noise-range` is given,\n+ so you may find other piece of information in its description.\n.. _sim-sim-noise-step:\n@@ -239,9 +257,9 @@ Gives the maximal noise energy to simulate.\nGives the noise energy step between each simulation iteration.\n-.. attention:: This argument is another way to set the noise. It is ignored or\n- not required if :ref:`sim-sim-noise-range` is given, so you may find other\n- piece of information in its description.\n+.. attention:: This argument is another way to set the noise range to simulate.\n+ It is ignored or not required if the argument :ref:`sim-sim-noise-range` is given,\n+ so you may find other piece of information in its description.\n.. _sim-sim-noise-range:\n@@ -253,12 +271,12 @@ Gives the noise energy step between each simulation iteration.\n:Examples: ``-R \"0.5:1,1:0.05:1.2,1.21\"``\nSet the noise energy range to run in a Matlab style vector.\n-The given example will run the following noise points::\n+The above example will run the following noise points::\n0.5, 0.6, 0.7, 0.8, 0.9, 1.0, 1.05, 1.1, 1.15, 1.2, 1.21\n-.. attention:: The numerical limit for a noise point is a maximum of about\n- :math:`\\pm 214` with a precision :math:`10^{-7}`.\n+.. attention:: The numerical range for a noise point is\n+ :math:`\\left[-214.748; 213.952 \\right]` with a precision of :math:`10^{-7}`.\n.. note:: If given, :ref:`sim-sim-noise-min`, :ref:`sim-sim-noise-max`, and\n:ref:`sim-sim-noise-step` are ignored. But it is not required anymore if\n@@ -292,7 +310,7 @@ by :ref:`sim-sim-noise-min` and :ref:`sim-sim-noise-max` with a minimum step of\nPrints the output with meta-data readable by :ref:`pyber_overview`.\nThe given text is considered as the simulation title.\n-Automatically printed meta-data are the *command* and the *title*.\n+The just run *command* and the *title* meta-data are automatically printed.\n.. _sim-sim-coded:\n@@ -394,9 +412,14 @@ random generators of all modules.\n.. note:: When using **MPI**, each node has its own seed generated from this\ninitial value to guarantee the generation of different values between the\ndifferent computers.\n-\n.. TODO : add link to MPI use\n+.. note:: |AFF3CT| uses pseudo-random generators in order to be able to replay\n+ the same results from a run to another. It is helpful to debug source code.\n+ However, when simulating in multi-thread, computer load is not controllable\n+ and so results may differ as threads do not necessary run at the same speed.\n+\n+\n.. _sim-sim-stats:\n``--sim-stats``\n@@ -516,7 +539,7 @@ Automatically replays the saved frames while running with :ref:`sim-sim-err-trk`\nBase path for the files where the bad frames will be stored or read.\nTo this base path is added the noise point value and the matching module\n-extension. With the above example, you may get files like that:\n+extension. With the above example, you may get files such as:\n* :file:`errors/err_0.64.src`\n* :file:`errors/err_0.64.enc`\n@@ -525,8 +548,9 @@ extension. With the above example, you may get files like that:\n.. note:: For |SNR| noise type, the value used to define the filename is the\nnoise variance.\n-.. attention:: Intermediate folders are not automatically created but only the\n- files. So be careful to create them before running long simulations!\n+.. danger:: Intermediate folders are not automatically created but only the\n+ files. You won't get any warning message, so be careful to create them before\n+ running long simulations!\n.. _sim-sim-err-trk-thold:\n@@ -551,8 +575,8 @@ Strictly no legend will be displayed when launching the simulation.\nUse this option when you want to complete an already existing\nsimulation result file with new noise points. Pay attention to use ``>>``\n- to redirect the standard output instead of ``>`` to add results at the end of\n- the file and to not overwrite it.\n+ instead of ``>`` to redirect the standard output in order to add results at\n+ the end of the file and not overwriting it.\n.. _sim-sim-mpi-comm:\n@@ -565,8 +589,10 @@ Strictly no legend will be displayed when launching the simulation.\nSets the ``MPI`` communication frequency between the nodes in *[ms]*.\nThis corresponds to the frequency with which nodes will gather their results.\n-This operation may take a little time so a a too fast frequency may be\n+This operation takes some computation resources so a too fast frequency may be\nsub-productive.\n.. note:: Available only when compiling with the MPI support\n:ref:`compilation_cmake_options`.\n+\n+.. TODO : add link to MPI use\n\\ No newline at end of file\n"
}
] |
C++
|
MIT License
|
aff3ct/aff3ct
|
Doc: Cosmetics and add notes in simulation paratmeters.
|
8,483 |
19.11.2018 09:37:22
| -3,600 |
8bbd0ffd6a0e2b68f6cddbf1a3f4b8017465c6d9
|
Cosmetics in SCMA
|
[
{
"change_type": "MODIFY",
"old_path": "src/Module/Modem/SCMA/Modem_SCMA.hpp",
"new_path": "src/Module/Modem/SCMA/Modem_SCMA.hpp",
"diff": "@@ -68,7 +68,7 @@ private:\nQ phi(const Q* Y_N1, int i, int j, int k, int re, int batch);\nQ phi(const Q* Y_N1, int i, int j, int k, int re, int batch, const R* H_N);\nvoid demodulate_batch(const Q* Y_N1, Q* Y_N2, int batch);\n- Q normalize_prob_msg_res_user(int user, int resource_ind, int resouce);\n+ Q normalize_prob_msg_res_user(int user, int resource_ind, int resource);\n};\n}\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Module/Modem/SCMA/Modem_SCMA.hxx",
"new_path": "src/Module/Modem/SCMA/Modem_SCMA.hxx",
"diff": "@@ -284,36 +284,30 @@ template <typename B, typename R, typename Q, tools::proto_psi<Q> PSI>\nQ Modem_SCMA<B,R,Q,PSI>\n::phi(const Q* Y_N1, int i, int j, int k, int re, int batch)\n{\n- Q phi;\n- std::complex<Q> tmp;\n-\nauto Y_N = std::complex<Q>(Y_N1[batch *8 + 2*re], Y_N1[batch*8 + 2*re +1]);\n- const auto CB0 = std::complex<Q>((Q)CB(CB.get_resource_to_user(re, 0), re, i).real(), (Q)CB(CB.get_resource_to_user(re, 0), re, i).imag());\n- const auto CB1 = std::complex<Q>((Q)CB(CB.get_resource_to_user(re, 1), re, j).real(), (Q)CB(CB.get_resource_to_user(re, 1), re, j).imag());\n- const auto CB2 = std::complex<Q>((Q)CB(CB.get_resource_to_user(re, 2), re, k).real(), (Q)CB(CB.get_resource_to_user(re, 2), re, k).imag());\n-\n- tmp = Y_N - (CB0 + CB1 + CB2);\n+ const auto CB0 = std::complex<Q>(CB(CB.get_resource_to_user(re, 0), re, i)); // convert from R to Q\n+ const auto CB1 = std::complex<Q>(CB(CB.get_resource_to_user(re, 1), re, j));\n+ const auto CB2 = std::complex<Q>(CB(CB.get_resource_to_user(re, 2), re, k));\n- phi = PSI(tmp, (Q)n0);\n+ auto tmp = Y_N - (CB0 + CB1 + CB2);\n+ auto phi = PSI(tmp, (Q)n0);\nreturn phi;\n}\ntemplate <typename B, typename R, typename Q, tools::proto_psi<Q> PSI>\nQ Modem_SCMA<B,R,Q,PSI>\n-::normalize_prob_msg_res_user(int user, int resource_ind, int resouce)\n+::normalize_prob_msg_res_user(int user, int resource_ind, int resource)\n{\nQ sum = 0;\n- Q norm_prob = 0;\nfor(auto i = 0; i < CB.get_codebook_size(); i++) //codeword index\n{\nsum += msg_res_user(CB.get_user_to_resource(user, resource_ind), user, i);\n}\n- norm_prob = msg_res_user(CB.get_user_to_resource(user, resource_ind), user, resouce)/sum;\n-\n+ auto norm_prob = msg_res_user(CB.get_user_to_resource(user, resource_ind), user, resource) / sum;\nreturn norm_prob;\n}\n"
}
] |
C++
|
MIT License
|
aff3ct/aff3ct
|
Cosmetics in SCMA
|
8,483 |
19.11.2018 09:37:43
| -3,600 |
8772d77dc694ff1ca1e9472906deef7ed7446b36
|
Fix SCMA filter
|
[
{
"change_type": "MODIFY",
"old_path": "src/Module/Modem/SCMA/Modem_SCMA.hxx",
"new_path": "src/Module/Modem/SCMA/Modem_SCMA.hxx",
"diff": "@@ -350,7 +350,7 @@ void Modem_SCMA<B,R,Q,PSI>\nthrow tools::invalid_argument(__FILE__, __LINE__, __func__, message.str());\n}\n- std::copy(Y_N1, Y_N1 + this->N_fil + this->n_frames, Y_N2);\n+ std::copy(Y_N1, Y_N1 + this->N_fil * this->n_frames, Y_N2);\n}\n}\n}\n"
}
] |
C++
|
MIT License
|
aff3ct/aff3ct
|
Fix SCMA filter
|
8,490 |
19.11.2018 15:23:56
| -3,600 |
3499d0d53380261104e39361c3f0a26b63aba6a9
|
Doc: fix bad legend.
|
[
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/simulation/overview/overview.rst",
"new_path": "doc/sphinx/source/simulation/overview/overview.rst",
"diff": "@@ -43,7 +43,7 @@ illustrates those parameters in a simplified communication chain.\n:figwidth: 70 %\n:align: center\n- |SNR|-related parameters in the communication chain.\n+ Code-related parameters in the communication chain.\nThe simulator computes the |BER| and the |FER| for a |SNR| range (by default the\n|SNR| is :math:`E_b/N_0` in dB). ``-m`` is the first |SNR| value to simulate\n@@ -58,7 +58,7 @@ between each |SNR| (c.f. section :ref:`sim-sim-noise-step`). The\n:figwidth: 60 %\n:align: center\n- Noise-related parameters in the communication chain.\n+ |SNR|-related parameters in the communication chain.\nSurviving the Help\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n"
}
] |
C++
|
MIT License
|
aff3ct/aff3ct
|
Doc: fix bad legend.
|
8,490 |
20.11.2018 14:26:51
| -3,600 |
968148712fa4c8645b49d0a2cc976f284ddceb88
|
Doc: improve the simulation overview.
|
[
{
"change_type": "DELETE",
"old_path": "doc/sphinx/source/simulation/overview/images/arg_advanced.png",
"new_path": "doc/sphinx/source/simulation/overview/images/arg_advanced.png",
"diff": "Binary files a/doc/sphinx/source/simulation/overview/images/arg_advanced.png and /dev/null differ\n"
},
{
"change_type": "DELETE",
"old_path": "doc/sphinx/source/simulation/overview/images/arg_encoder.png",
"new_path": "doc/sphinx/source/simulation/overview/images/arg_encoder.png",
"diff": "Binary files a/doc/sphinx/source/simulation/overview/images/arg_encoder.png and /dev/null differ\n"
},
{
"change_type": "DELETE",
"old_path": "doc/sphinx/source/simulation/overview/images/arg_simulation.png",
"new_path": "doc/sphinx/source/simulation/overview/images/arg_simulation.png",
"diff": "Binary files a/doc/sphinx/source/simulation/overview/images/arg_simulation.png and /dev/null differ\n"
},
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/simulation/overview/overview.rst",
"new_path": "doc/sphinx/source/simulation/overview/overview.rst",
"diff": "Overview\n--------\n-.. * describe the BER/FER simulator chains, and EXIT chart (add figures)\n-.. * detail the command line arguments philosophy:\n-\n-.. - give a simple example and explain the main arguments (-C -N -K -m -M)\n-.. - explain the sub-arguments\n-.. - explain the redundant arguments (--type --implem --help --Help)\n-\n-.. * tell that it is possible to use an `ini` file\n-\nThe |AFF3CT| toolbox comes with a simulator dedicated to the **communication\nchains**. The simulator focuses on **the channel coding level**. It can be used\nto reproduce/validate **state-of-the-art BER/FER performances** as well as an\n**exploration tool to bench various configurations**.\n+.. _Monte Carlo method: https://en.wikipedia.org/wiki/Monte_Carlo_method\n+\n+The |AFF3CT| simulator is based on a `Monte Carlo method`_: the transmitter\n+emits frames that are **randomly noised by the channel** and then the receiver\n+try to decode the noised frames. The transmitter continue to emit frames until\n+a fixed number of frame errors in achieved (typically 100 frame errors).\n+A frame error occurs when the original frame from the transmitter differs from\n+the the receiver decoded frame. As a consequence, when the |SNR| decreases,\n+the number of frames to simulate increases as well as the simulation time.\n+\nBasic Arguments\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\nThe |AFF3CT| simulator is a **command line program** which can take many\ndifferent arguments. The command line interface make possible to write scripts\n-that run a battery of simulations for instance.\n-\n-Here is a minimalist command line using |AFF3CT|:\n+that run a battery of simulations for instance. Here is a minimalist command\n+line using |AFF3CT|:\n.. code-block:: bash\naff3ct -C POLAR -K 1723 -N 2048 -m 1.0 -M 4.0 -s 1.0\n``-C`` is a required parameter that defines the type of channel code that will\n-be used in the communication chain (see the :ref:`sim-sim-cde-type` section for\n-more information). ``-K`` is the number of information bits and ``-N`` is the\n-frame size (bits transmitted over the channel). The :numref:`fig_sim_code`\n-illustrates those parameters in a simplified communication chain.\n+be used in the communication chain (see the :ref:`sim-sim-cde-type` section).\n+``-K`` is the number of information bits and ``-N`` is the frame size (bits\n+transmitted over the channel). The :numref:`fig_sim_code` illustrates those\n+parameters in a simplified communication chain.\n.. _fig_sim_code:\n@@ -60,44 +60,58 @@ between each |SNR| (c.f. section :ref:`sim-sim-noise-step`). The\n|SNR|-related parameters in the communication chain.\n-Surviving the Help\n-\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n-\n-|AFF3CT| proposes a very complete help option with the ``-h`` flag:\n-\n-.. code-block:: bash\n-\n- aff3ct -C POLAR -K 1723 -N 2048 -m 1.0 -M 4.0 -s 1.0 -h\n-\n-.. _fig_arg_simulation:\n+Output\n+\"\"\"\"\"\"\n-.. figure:: images/arg_simulation.png\n- :align: center\n-\n- Simulation parameters.\n-\n-.. _fig_arg_encoder:\n-\n-.. figure:: images/arg_encoder.png\n- :align: center\n-\n- Encoder parameters.\n-\n-:numref:`fig_arg_simulation` and :numref:`fig_arg_encoder` present samples of\n-the help output. The ``{R}`` tag denotes required argument for a given code and\n-simulation. Using the uppercase (``-H``) argument, advanced arguments are shown,\n-denoted with a ``{A}`` tag (c.f. :numref:`fig_arg_advanced`):\n+The output of the command\n+(``aff3ct -C POLAR -K 1723 -N 2048 -m 1.0 -M 4.0 -s 1.0``) will look like:\n.. code-block:: bash\n- aff3ct -C POLAR -K 1723 -N 2048 -m 1.0 -M 4.0 -s 1.0 -H\n-\n-.. _fig_arg_advanced:\n-\n-.. figure:: images/arg_advanced.png\n- :align: center\n-\n- Advanced simulation parameter.\n+ # ----------------------------------------------------\n+ # ---- A FAST FORWARD ERROR CORRECTION TOOLBOX >> ----\n+ # ----------------------------------------------------\n+ # Parameters :\n+ # [...]\n+ #\n+ # The simulation is running...\n+ # ---------------------||------------------------------------------------------||---------------------\n+ # Signal Noise Ratio || Bit Error Rate (BER) and Frame Error Rate (FER) || Global throughput\n+ # (SNR) || || and elapsed time\n+ # ---------------------||------------------------------------------------------||---------------------\n+ # ----------|----------||----------|----------|----------|----------|----------||----------|----------\n+ # Es/N0 | Eb/N0 || FRA | BE | FE | BER | FER || SIM_THR | ET/RT\n+ # (dB) | (dB) || | | | | || (Mb/s) | (hhmmss)\n+ # ----------|----------||----------|----------|----------|----------|----------||----------|----------\n+ 0.25 | 1.00 || 104 | 16425 | 104 | 9.17e-02 | 1.00e+00 || 4.995 | 00h00'00\n+ 1.25 | 2.00 || 104 | 12285 | 104 | 6.86e-02 | 1.00e+00 || 13.678 | 00h00'00\n+ 2.25 | 3.00 || 147 | 5600 | 102 | 2.21e-02 | 6.94e-01 || 14.301 | 00h00'00\n+ 3.25 | 4.00 || 5055 | 2769 | 100 | 3.18e-04 | 1.98e-02 || 30.382 | 00h00'00\n+ # End of the simulation.\n+\n+All the line beginning by the ``#`` character are intended present the\n+simulation but there are not computational results. On the top, there is the\n+list of the simulation parameters (above the ``# Parameters :`` line). After\n+that, the simulation results are shown, each line corresponds to the decoding\n+performance considering a given |SNR|. Each line is composed by the following\n+columns:\n+\n+* ``Es/N0``: the |SNR| expressed as :math:`E_s/N_0` in dB (c.f. the :ref:`sim-sim-noise-type` section),\n+* ``Eb/N0``: the |SNR| expressed as :math:`E_b/N_0` in dB (c.f. the :ref:`sim-sim-noise-type` section),\n+* ``FRA``: the number of simulated frames,\n+* ``BE``: the number of bit errors,\n+* ``FE``: the number of frame errors (see the :ref:`mnt-mnt-max-fe` section if you want to modify it),\n+* ``BER``: the bit error rate (:math:`BER = \\frac{BE}{FRA \\times K}`),\n+* ``FER``: the frame error rate (:math:`FER = \\frac{FE}{FRA}`),\n+* ``SIM_THR``: the simulation throughput (:math:`SIM_{THR} = \\frac{K \\times FRA}{T}` where :math:`T` is the simulation time),\n+* ``ET/RT``: during the computation of the point, this column displays an estimation of the remaining time (``RT``), once the computations are done this is the total elapsed time (``ET``).\n+\n+.. note:: You may notice slightly different values in |BER| and |FER| columns if\n+ you run the command line on your computer. This is because the\n+ simulation is **multi-threaded by default**: the order of threads\n+ execution is **not predictable**. If you want to have reproducible\n+ results you can launch |AFF3CT| in **mono-threaded mode** (see the\n+ :ref:`sim-sim-threads` section).\nPhilosophy\n\"\"\"\"\"\"\"\"\"\"\n@@ -117,7 +131,7 @@ runtime.\n:figwidth: 90 %\n:align: center\n- Modules and tasks of the communication chain.\n+ Modules and tasks of in the simulation.\nEach module or task has its own set of arguments. Still, some of the\n"
}
] |
C++
|
MIT License
|
aff3ct/aff3ct
|
Doc: improve the simulation overview.
|
8,483 |
21.11.2018 12:24:06
| -3,600 |
71a813d202820167923341cb0a9f2591c39db388
|
Add detail about rectangular QAM
|
[
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/simulation/parameters/mdm/mdm.rst",
"new_path": "doc/sphinx/source/simulation/parameters/mdm/mdm.rst",
"diff": "@@ -66,7 +66,7 @@ Description of the allowed values:\n.. |mdm-type_descr_ook| replace:: The `On-Off Keying`_\n.. |mdm-type_descr_pam| replace:: The `Pulse-Amplitude Modulation`_\n.. |mdm-type_descr_psk| replace:: The `Phase-Shift Keying`_\n-.. |mdm-type_descr_qam| replace:: The `Quadrature-Amplitude Modulation`_\n+.. |mdm-type_descr_qam| replace:: The Rectangular `Quadrature-Amplitude Modulation`_\n.. |mdm-type_descr_scma| replace:: The `SubCarrier Multiple Access`_\n.. |mdm-type_descr_user| replace:: A user defined constellation given in a file\nthrough :ref:`mdm-mdm-const-path`\n@@ -89,6 +89,8 @@ Selects the number of bits per symbol, ie. the number of bits used to generate a\nsymbol. You can't change this value for ``BPSK`` and ``OOK`` types as it is\nforced to 1. Likewise, it is forced to 3 with ``SCMA``.\n+.. note:: For ``QAM`` type, only even values of bits per symbol are supported.\n+\n.. _mdm-mdm-const-path:\n``--mdm-const-path``\n"
}
] |
C++
|
MIT License
|
aff3ct/aff3ct
|
Add detail about rectangular QAM
|
8,483 |
21.11.2018 12:24:26
| -3,600 |
4ddb55923377cddb32f9dbc77c1da984cc0e4601
|
Rework channel to add details about math formulas.
|
[
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/simulation/parameters/chn/chn.rst",
"new_path": "doc/sphinx/source/simulation/parameters/chn/chn.rst",
"diff": "@@ -20,8 +20,8 @@ error-correcting codes.\n:Default: ``AWGN``\n:Examples: ``--chn-type AWGN``\n-Type of the channel to use in the simulation ('USER' has an output got from a\n-file when 'USER_ADD' has an additive noise got from a file).\n+Set the type of the channel to use in the simulation ('USER' has an output got\n+from a file when 'USER_ADD' has an additive noise got from a file).\nDescription of the allowed values:\n@@ -58,72 +58,81 @@ Description of the allowed values:\n.. |chn-type_descr_awgn| replace:: The `Additive White Gaussian Noise`_\n- channel: :math:`Y = X + Z \\text{ with } Z \\sim \\mathcal{N}(0,\\sigma)`\n+ channel: :math:`Y = X + Z \\text{ with } Z \\sim \\mathcal{N}(0,\\sigma^2)`.\n.. |chn-type_descr_bec| replace:: The `Binary Erasure Channel`_\n:math:`Y_i = \\begin{cases}\nerased & \\quad \\text{if } e = 1 \\\\\nX_i & \\quad \\text{else}\n- \\end{cases} \\text{with } P(e = 1) = p_e`\n+ \\end{cases} \\text{with } P(e = 1) = p_e \\text{ and } P(e = 0) = 1 - p_e`.\n.. |chn-type_descr_bsc| replace:: The `Binary Symmetric Channel`_\n:math:`Y_i = \\begin{cases}\n!X_i & \\quad \\text{if } e = 1 \\\\\nX_i & \\quad \\text{else}\n- \\end{cases} \\text{with } P(e = 1) = p_e`\n+ \\end{cases} \\text{with } P(e = 1) = p_e \\text{ and } P(e = 0) = 1 - p_e`.\n.. |chn-type_descr_no| replace:: The **perfect** channel:\n- :math:`Y = X`\n+ :math:`Y = X`.\n.. |chn-type_descr_optical| replace:: The **optical** channel:\n:math:`Y_i = \\begin{cases}\nCDF_0(x) & \\quad \\text{ when } X_i = 0 \\\\\nCDF_1(x) & \\quad \\text{ when } X_i = 1\n\\end{cases} \\text{ with } x \\sim \\mathcal{U}(0,1)`\n- and the CDFs given by user.\n+ and the :math:`CDF_0` and :math:`CDF_1` are given by the user and selected\n+ in function of the current :math:`ROP`.\n.. |chn-type_descr_rayleigh| replace:: The `Rayleigh Fading`_ channel with\nan AWGN gain: :math:`Y = X.H + Z \\text{ with }\nZ \\sim \\mathcal{N}(0,\\sigma) \\text{ and }\n- H \\sim \\mathcal{N}(0,\\frac{1}{\\sqrt 2})`\n+ H \\sim \\mathcal{N}(0,\\frac{1}{\\sqrt 2})`.\n.. |chn-type_descr_rayleigh_user| replace:: The `Rayleigh Fading`_ channel with\nthe gain given in a file: :math:`Y = X.H + Z\n\\text{ with } Z \\sim \\mathcal{N}(0,\\sigma) \\text{ and }\n- H \\text{ given by the user}`\n+ H \\text{ given by the user}`.\n.. |chn-type_descr_user| replace:: A **user defined output** channel\n- from a file: :math:`Y = Z \\text{ with } Z \\text{ given by user}`\n+ from a file: :math:`Y = Z \\text{ with } Z \\text{ given by user}`.\n.. |chn-type_descr_user_add| replace:: An **additive** channel with a user\ndefined noise given in a file: :math:`Y = X +\n- Z \\text{ with } Z \\text{ given by the user}`\n+ Z \\text{ with } Z \\text{ given by the user}`.\n.. |chn-type_descr_user_bec| replace:: The `Binary Erasure Channel`_ with a\nuser defined event draw given in a file:\n:math:`Y_i = \\begin{cases}\nerased & \\quad \\text{if } e = 1 \\\\\nX_i & \\quad \\text{else}\n- \\end{cases} \\text{ with } e \\text{ given by the user}`\n+ \\end{cases} \\text{ with } e \\text{ given by the user}`.\n.. |chn-type_descr_user_bsc| replace:: The `Binary Symmetric Channel`_ with\na user defined event draw given in a file:\n:math:`Y_i = \\begin{cases}\n!X_i & \\quad \\text{if } e = 1 \\\\\nX_i & \\quad \\text{else}\n- \\end{cases} \\text{ with } e \\text{ given by the user}`\n+ \\end{cases} \\text{ with } e \\text{ given by the user}`.\n-Where :math:`\\sigma, p_e` are the simulated noise points and are given by the\n-user through the :ref:`sim-sim-noise-range` argument.\n+Where:\n+ * :math:`\\sigma` is the *Gaussian noise variance*, :math:`p_e` is the\n+ *event probability* and :math:`ROP` is the *Received optical power* of the\n+ simulated noise points.\n+ They are given by the user through the :ref:`sim-sim-noise-range` argument.\n+ * :math:`X` is the original modulated signal and :math:`Y` the noisy output.\n+ * :math:`\\mathcal{N}(\\mu,\\sigma^2)` is the\n+ `Gaussian distribution <https://en.wikipedia.org/wiki/Normal_distribution>`_\n+ * :math:`\\mathcal{U}(a,b)` is the\n+ `Uniform distribution <https://en.wikipedia.org/wiki/Uniform_distribution_(continuous)>`_\n-The :abbr:`CDF (Cumulative Distribution Function)` for the ``OPTICAL``\n-channel is given with the :ref:`sim-sim-pdf-path` argument. This file\n-describes the :abbr:`PDF (Probability Density Function)` of the\n-:abbr:`ROP (Received Optical Power)` at different value for a bit transmitted\n-at 0 and another for a bit transmitted at 1. So this file contains twice as\n-many PDF as ROP to test.\n+The :abbr:`CDF (Cumulative Distribution Function)` are computed for the\n+``OPTICAL`` channel from the given :abbr:`PDF (Probability Density Function)`\n+with the :ref:`sim-sim-pdf-path` argument. This file describes the latter for the\n+different :abbr:`ROP (Received Optical Power)`. There must be a PDF for a bit\n+transmitted at 0 and another for a bit transmitted at 1.\n+\n.. note:: The ``AWGN``, ``NO`` and ``RAYLEIGH`` channels handle\ncomplex modulations.\n@@ -141,7 +150,7 @@ many PDF as ROP to test.\n:Default: ``STD``\n:Examples: ``--chn-implem FAST``\n-Selects the implementation of the algorithm to generate the noise.\n+Select the implementation of the algorithm to generate the noise.\nDescription of the allowed values:\n@@ -163,15 +172,15 @@ Description of the allowed values:\n.. |chn-implem_descr_std| replace:: A standard implementation using the C++\nstandard objects and algorithms.\n-.. |chn-implem_descr_fast| replace:: A much faster method using |SIMD|.\n+.. |chn-implem_descr_fast| replace:: A much faster optimized method.\n.. |chn-implem_descr_gsl| replace:: A method using the\n- `GNU Scientific Library`_ but not parallelized.\n+ `GNU Scientific Library`_.\n-.. |chn-implem_descr_mkl| replace:: A parallelized method using the\n+.. |chn-implem_descr_mkl| replace:: A method using the\n`Intel Math Kernel Library`_ optimized on Intel processors.\n-.. attention:: All channels work with any implementation. However, to activate\n+.. attention:: All channels work with any implementation. However, to enable\nthe ``GSL`` or the ``MKL`` implementation you need to\ncompile with the good options (see :ref:`compilation_cmake_options`).\n@@ -236,7 +245,7 @@ according to the given CDFs.\n:Default: 1\n:Examples: ``--chn-gain-occur 10``\n-The number of times a gain is used on consecutive symbols. It is used in the\n+Give the number of times a gain is used on consecutive symbols. It is used in the\n``RAYLEIGH_USER`` channel while applying gains read from the given file.\n.. _chn-chn-path:\n@@ -248,6 +257,7 @@ The number of times a gain is used on consecutive symbols. It is used in the\n:Rights: read\n:Examples: ``--chn-path example/path/to/the/right/file``\n+Give the path to a file differently in function of the channel type.\nFor ``USER`` type, the file must contain noisy output values.\nFor ``USER_ADD`` type, the file must contain noise values to add to input.\nFor ``RAYLEIGH_USER`` type, the file must contain gain values.\n"
}
] |
C++
|
MIT License
|
aff3ct/aff3ct
|
Rework channel to add details about math formulas.
|
8,490 |
21.11.2018 14:17:45
| -3,600 |
d6cfa4e22db75c86fc82d540f6a8883f5e0d18b8
|
Doc: detail the AFF3CT motivations.
|
[
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/conf.py",
"new_path": "doc/sphinx/source/conf.py",
"diff": "@@ -239,6 +239,8 @@ rst_epilog = \"\"\"\n.. |AFF3CT| replace:: :abbr:`AFF3CT (A Fast Forward Error Correction Toolbox!)`\n.. |PyBER| replace:: PyBER\n.. |GUI| replace:: :abbr:`GUI (Graphical User Interface)`\n+.. |API| replace:: :abbr:`API (Application Programming Interface)`\n+.. |SDR| replace:: :abbr:`SDR (Software-Defined Radio)`\n\"\"\"\n"
},
{
"change_type": "ADD",
"old_path": "doc/sphinx/source/images/comm_chain.pdf",
"new_path": "doc/sphinx/source/images/comm_chain.pdf",
"diff": "Binary files /dev/null and b/doc/sphinx/source/images/comm_chain.pdf differ\n"
},
{
"change_type": "ADD",
"old_path": "doc/sphinx/source/images/comm_chain.png",
"new_path": "doc/sphinx/source/images/comm_chain.png",
"diff": "Binary files /dev/null and b/doc/sphinx/source/images/comm_chain.png differ\n"
},
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/index.rst",
"new_path": "doc/sphinx/source/index.rst",
"diff": "@@ -3,25 +3,60 @@ AFF3CT Documentation\n####################\n.. _Forward Error Correction: https://en.wikipedia.org/wiki/Forward_error_correction\n-.. _Monte Carlo: https://en.wikipedia.org/wiki/Monte_Carlo_method\n-.. _BFER: https://en.wikipedia.org/wiki/Bit_error_rate\n-.. _EXIT chart: https://en.wikipedia.org/wiki/EXIT_chart\n+.. _Monte Carlo method: https://en.wikipedia.org/wiki/Monte_Carlo_method\n-|AFF3CT| (A Fast Forward Error Correction Toolbox!) is a toolbox dedicated\n-to the `Forward Error Correction`_ (FEC or channel coding). It is written in\n-**C++11** and it supports a large range of codes: from the well-spread\n-**Turbo codes** to the new **Polar codes** including the\n-**Low-Density Parity-Check (LDPC) codes**. |AFF3CT| can be used in two different\n-ways, as:\n+|AFF3CT| is a toolbox dedicated to the `Forward Error Correction`_ (FEC or\n+**channel coding**). It is written in **C++** and it supports a large range of\n+codes: from the well-spread **Turbo codes** to the new **Polar codes** including\n+the **Low-Density Parity-Check (LDPC) codes**. |AFF3CT| includes many tools but\n+the most important ones are:\n.. hlist::\n- :columns: 1\n+ :columns: 2\n- * a **standalone application** for `Monte Carlo`_ `BFER`_ and `EXIT chart`_\n- simulations (see the :ref:`simulation` section),\n- * a dedicated **toolbox** or **library** for your projects, many modules\n- (like codecs, modems, channels, ...) are available and easy to use (see\n- the :ref:`library` section).\n+ * a **standalone simulator** to simulate communication chains (c.f.\n+ :numref:`fig_comm_chain`) based on a `Monte Carlo method`_,\n+ * a **toolbox** or a **library** that can be used through a well-documented\n+ |API|.\n+\n+.. _fig_comm_chain:\n+\n+.. figure:: images/comm_chain.png\n+ :figwidth: 80 %\n+ :align: center\n+\n+ The communication chain.\n+\n+**The simulator targets high speed simulations** and extensively uses parallel\n+techniques like |SIMD|, multi-threading and multi-nodes programming models.\n+Below, a list of the features that motivated the creation of the simulator:\n+\n+#. **reproduce state-of-the-art decoding performances**,\n+#. **explore various channel code configurations**, find new trade-offs,\n+#. **prototype hardware implementation** (fixed-point ready receivers, hardware in the loop tools),\n+#. **reuse tried and tested modules** and add your own,\n+#. **alternative to MATLAB and Simulink**, if you seek to reduce simulations time.\n+\n+.. #. track erroneous frames at low error rate level\n+\n+|AFF3CT| was first intended to be a simulator but as it developed, the need to\n+reuse sub-parts of the code intensified: **the library was born**. Below is a\n+list of possible applications for the library:\n+\n+#. **build custom communication chains** that are not possible with the simulator,\n+#. **facilitate hardware prototyping**,\n+#. enable various modules to be used in |SDR| contexts.\n+\n+The documentation is organized in five main sections:\n+\n+.. hlist::\n+ :columns: 2\n+\n+ * a getting started guide,\n+ * a tutorial to compile and install the code,\n+ * a description of the simulator,\n+ * a description of the library |API|,\n+ * a description of the source code for developers.\n.. toctree::\n:caption: Contents\n"
}
] |
C++
|
MIT License
|
aff3ct/aff3ct
|
Doc: detail the AFF3CT motivations.
|
8,490 |
21.11.2018 15:17:44
| -3,600 |
97eb62aa252ba43b6b66a0fce6af6f4ef67e6719
|
Use RestructuredText instead of Markdown for the README + reorganize the README.
|
[
{
"change_type": "MODIFY",
"old_path": "README.rst",
"new_path": "README.rst",
"diff": "-# AFF3CT Short Presentation\n+AFF3CT: A Fast Forward Error Correction Toolbox!\n+================================================\n-**AFF3CT** (A Fast Forward Error Correction Toolbox!) is a library dedicated to the [Forward Error Correction](https://en.wikipedia.org/wiki/Forward_error_correction) (FEC or channel coding).\n-It is written in **C++11** and it supports a large range of codes: from the well-spread **Turbo codes** to the very new **Polar codes** including the **Low-Density Parity-Check (LDPC) codes**.\n-AFF3CT can be used in two different ways, as:\n-- a dedicated **toolbox** or **library** for your projects, many modules (like codecs, modems, channels, ...) are available and easy to use,\n-- a **standalone application** for [Monte Carlo](https://en.wikipedia.org/wiki/Monte_Carlo_method) [BER/FER](https://en.wikipedia.org/wiki/Bit_error_rate) and [EXIT chart](https://en.wikipedia.org/wiki/EXIT_chart) simulations.\n+**AFF3CT** is a simulator dedicated to the Forward Error Correction (FEC or\n+**channel coding**). It is written in **C++** and it supports a large range of\n+codes: from the well-spread **Turbo codes** to the very new **Polar codes**\n+including the **Low-Density Parity-Check (LDPC) codes**. **AFF3CT** is a command\n+line program and it simulates communication chains based on a Monte Carlo\n+method.\n-The following section focuses on the compilation and the execution of the AFF3CT standalone application.\n+It is very easy to use, for instance, to estimate the BER/FER decoding\n+performances of the (2048,1723) Polar code from 1.0 to 4.0 dB:\n-# How to Compile and Run the Code\n+.. code-block:: bash\n-This project use `cmake` in order to generate any type of projects (Makefile, Visual Studio, Eclipse, CLion, etc.).\n+ aff3ct -C POLAR -K 1723 -N 2048 -m 1.0 -M 4.0\n-## Get the Git Submodules\n+And the output will be:\n-AFF3CT depends on some other Git repositories (or submodules). It is highly recommended to get those submodules before trying to do anything else. Here is the command to get all the required submodules:\n+.. code-block:: bash\n- $ git submodule update --init --recursive\n+ # ----------------------------------------------------\n+ # ---- A FAST FORWARD ERROR CORRECTION TOOLBOX >> ----\n+ # ----------------------------------------------------\n+ # Parameters :\n+ # [...]\n+ #\n+ # The simulation is running...\n+ # ---------------------||------------------------------------------------------||---------------------\n+ # Signal Noise Ratio || Bit Error Rate (BER) and Frame Error Rate (FER) || Global throughput\n+ # (SNR) || || and elapsed time\n+ # ---------------------||------------------------------------------------------||---------------------\n+ # ----------|----------||----------|----------|----------|----------|----------||----------|----------\n+ # Es/N0 | Eb/N0 || FRA | BE | FE | BER | FER || SIM_THR | ET/RT\n+ # (dB) | (dB) || | | | | || (Mb/s) | (hhmmss)\n+ # ----------|----------||----------|----------|----------|----------|----------||----------|----------\n+ 0.25 | 1.00 || 104 | 16425 | 104 | 9.17e-02 | 1.00e+00 || 4.995 | 00h00'00\n+ 1.25 | 2.00 || 104 | 12285 | 104 | 6.86e-02 | 1.00e+00 || 13.678 | 00h00'00\n+ 2.25 | 3.00 || 147 | 5600 | 102 | 2.21e-02 | 6.94e-01 || 14.301 | 00h00'00\n+ 3.25 | 4.00 || 5055 | 2769 | 100 | 3.18e-04 | 1.98e-02 || 30.382 | 00h00'00\n+ # End of the simulation.\n-## Example of a Makefile Project Generation (with the C++ GNU Compiler)\n+Features\n+--------\n-Open a terminal and type (from the `AFF3CT` root folder):\n+**The simulator targets high speed simulations** and extensively uses parallel\n+techniques like SIMD, multi-threading and multi-nodes programming models.\n+Below, a list of the features that motivated the creation of the simulator:\n- $ mkdir build\n- $ cd build\n- $ cmake .. -G\"Unix Makefiles\" -DCMAKE_CXX_COMPILER=g++ -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS=\"-funroll-loops -march=native\"\n+ #. **reproduce state-of-the-art decoding performances**,\n+ #. **explore various channel code configurations**, find new trade-offs,\n+ #. **prototype hardware implementation** (fixed-point receivers, hardware in\n+ the loop tools),\n+ #. **reuse tried and tested modules** and add yours,\n+ #. **alternative to MATLAB and Simulink**, if you seek to reduce simulations\n+ time.\n-## Compile the Code with the Makefile\n+Installation\n+------------\n- $ make -j4\n+First make sure to have installed a C++11 compiler, CMake and Git. Then install\n+AFF3CT by running:\n-This command will use the generated Makefile.\n+.. code-block:: bash\n-## Run the Code\n-Here is an example of run. You can skip the computations of the current SNR point with the `ctrl+c` combination on the keyboard.\n-If you use `ctrl+c` twice in a small time-step (500ms), the program will stop.\n+ git clone --recursive https://github.com/aff3ct/aff3ct.git\n+ mkdir aff3ct/build\n+ cd aff3ct/build\n+ cmake .. -DCMAKE_BUILD_TYPE=Release\n+ make -j4\n-### Decoding of the Polar Codes with the Successive Cancellation List Decoder (SCL)\n+Constribute\n+-----------\n-Open a terminal and type (from the `$ROOT_AFF3CT/build/` folder):\n+- Source Code: https://github.com/aff3ct/aff3ct\n+- Contributing guidelines: https://github.com/aff3ct/aff3ct/blob/master/CONTRIBUTING.md\n- $ ./bin/aff3ct -C POLAR -m 1 -M 4 -s 0.25 -K 1755 -N 2048 --crc-poly 32-GZIP --dec-type ASCL\n+Support\n+-------\n-Expected output:\n+If you are having issues, please let us know.\n+We have an issue tracker at: https://github.com/aff3ct/aff3ct/issues\n- # ----------------------------------------------------\n- # ---- A FAST FORWARD ERROR CORRECTION TOOLBOX >> ----\n- # ----------------------------------------------------\n- # Parameters :\n- # [...]\n- #\n- # The simulation is running...\n- # ----------------------------------------------------------------------||---------------------\n- # Bit Error Rate (BER) and Frame Error Rate (FER) depending || Global throughput\n- # on the Signal Noise Ratio (SNR) || and elapsed time\n- # ----------------------------------------------------------------------||---------------------\n- # -------|-------|----------|----------|----------|----------|----------||----------|----------\n- # Es/N0 | Eb/N0 | FRA | BE | FE | BER | FER || SIM_THR | ET/RT\n- # (dB) | (dB) | | | | | || (Mb/s) | (hhmmss)\n- # -------|-------|----------|----------|----------|----------|----------||----------|----------\n- 0.25 | 1.00 | 103 | 15522 | 103 | 8.75e-02 | 1.00e+00 || 2.37 | 00h00'00\n- 0.50 | 1.25 | 103 | 14705 | 103 | 8.29e-02 | 1.00e+00 || 5.04 | 00h00'00\n- 0.75 | 1.50 | 103 | 13801 | 103 | 7.78e-02 | 1.00e+00 || 5.26 | 00h00'00\n- 1.00 | 1.75 | 103 | 12988 | 103 | 7.32e-02 | 1.00e+00 || 5.22 | 00h00'00\n- 1.25 | 2.00 | 103 | 12072 | 103 | 6.80e-02 | 1.00e+00 || 5.20 | 00h00'00\n- 1.50 | 2.25 | 103 | 10801 | 103 | 6.09e-02 | 1.00e+00 || 5.12 | 00h00'00\n- 1.75 | 2.50 | 106 | 8266 | 103 | 4.53e-02 | 9.72e-01 || 5.23 | 00h00'00\n- 2.00 | 2.75 | 138 | 6789 | 102 | 2.86e-02 | 7.39e-01 || 6.09 | 00h00'00\n- 2.25 | 3.00 | 182 | 4777 | 103 | 1.52e-02 | 5.66e-01 || 7.12 | 00h00'00\n- 2.50 | 3.25 | 497 | 3751 | 102 | 4.38e-03 | 2.05e-01 || 11.76 | 00h00'00\n- 2.75 | 3.50 | 2445 | 2723 | 100 | 6.46e-04 | 4.09e-02 || 19.59 | 00h00'00\n- 3.00 | 3.75 | 18817 | 2552 | 100 | 7.87e-05 | 5.31e-03 || 26.25 | 00h00'01\n- 3.25 | 4.00 | 174249 | 1910 | 100 | 6.36e-06 | 5.74e-04 || 28.97 | 00h00'10\n- # End of the simulation.\n+License\n+-------\n+\n+The project is licensed under the MIT license.\n+\n+External Links\n+--------------\n-# More\n+- Official website: https://aff3ct.github.io\n+- Documentation: https://aff3ct.readthedocs.io\n-A list of the AFF3CT related web pages:\n-- [Official wiki](https://github.com/aff3ct/aff3ct/wiki)\n-- [Official website](https://aff3ct.github.io/)\n-- [Scientific publications](https://aff3ct.github.io/publications.html)\n-- [Contributing guidelines](https://github.com/aff3ct/aff3ct/blob/master/CONTRIBUTING.md)\n"
}
] |
C++
|
MIT License
|
aff3ct/aff3ct
|
Use RestructuredText instead of Markdown for the README + reorganize the README.
|
8,490 |
21.11.2018 16:02:17
| -3,600 |
67cce63a804f2c3f89224e1c1ca14effccc64972
|
Use RestructuredText instead of Markdown for the contributing guide.
|
[
{
"change_type": "DELETE",
"old_path": "CONTRIBUTING.md",
"new_path": null,
"diff": "-# Contributing Guidelines\n-\n-We're really glad you're reading this, because we need volunteer developers to expand this project.\n-\n-Here are some important resources to communicate with us:\n-\n- * [The official website](http://aff3ct.github.io/),\n- * Send us an email to [aff3ct@googlegroups.com](mailto:aff3ct@googlegroups.com),\n- * Join our [diffusion list](https://groups.google.com/d/forum/aff3ct),\n- * Bugs? Report issues on [GitHub](https://github.com/aff3ct/aff3ct/issues).\n-\n-## Submitting changes\n-\n-Please send a [GitHub Pull Request to AFF3CT](https://github.com/aff3ct/aff3ct/pull/new/master) with a clear list of what you've done (read more about [pull requests](https://help.github.com/articles/about-pull-requests/)).\n-\n-Always write a clear log message for your commits. One-line messages are fine for small changes, but bigger changes should look like this:\n-\n- $ git commit -m \"A brief summary of the commit\n- >\n- > A paragraph describing what changed and its impact.\"\n-\n-## Testing\n-\n-We try to maintain a database of BER/FER reference simulations. Please give us some new references which solicit the code you added.\n-We use those references in [an automated regression test script](https://github.com/aff3ct/aff3ct/blob/master/ci/test-regression.py).\n-To propose new references please use our [dedicated repository](https://github.com/aff3ct/error_rate_references) and send us a pull request on it.\n-\n-## Coding conventions\n-\n-Start reading our code and you'll get the hang of it.\n-For the readability, we apply some coding conventions:\n-\n- * We indent using tabulation (hard tabs).\n- * We ALWAYS put spaces after list items and method parameters (`[1, 2, 3]`, not `[1,2,3]`), around operators (`x += 1`, not `x+=1`), and around hash arrows.\n- * We use the [snake case](https://en.wikipedia.org/wiki/Snake_case) (`my_variable`, not `myVariable`), classes start with an upper case (`My_class`, not `my_class`) and variables/methods/functions start with a lower case.\n- * The number of characters is limited to 120 per line of code.\n-\n-This is open source software. Consider the people who will read your code, and make it look nice for them.\n-It's sort of like driving a car: Perhaps you love doing donuts when you're alone, but with passengers the goal is to make the ride as smooth as possible.\n-\n-## Documentation\n-\n-At this time, AFF3CT is not as documented as we would like to be. If you are interested in enrich the AFF3CT documentation, we are open to receive suggestions.\n-You can also propose new pages for [the wiki](https://github.com/aff3ct/aff3ct/wiki).\n-\n-Thanks,\n-\n-the AFF3CT team\n\\ No newline at end of file\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "CONTRIBUTING.rst",
"diff": "+Contributing Guidelines\n+=======================\n+\n+We're really glad you're reading this, because we need volunteer developers to\n+expand this project.\n+\n+Here are some important resources to communicate with us:\n+\n+ * The official website: http://aff3ct.github.io,\n+ * Bugs? Report issues on GitHub: https://github.com/aff3ct/aff3ct/issues.\n+\n+Submitting changes\n+------------------\n+\n+.. _GitHub Pull Request to AFF3CT: https://github.com/aff3ct/aff3ct/pull/new/\n+.. _pull requests: https://help.github.com/articles/about-pull-requests/\n+\n+Please send a `GitHub Pull Request to AFF3CT`_ with a clear list of what you've\n+done (read more about `pull requests`_).\n+\n+Always write a clear log message for your commits. One-line messages are fine\n+for small changes, but bigger changes should look like this:\n+\n+.. code-block:: bash\n+\n+ $ git commit -m \"A brief summary of the commit\n+ >\n+ > A paragraph describing what changed and its impact.\"\n+\n+Testing\n+-------\n+\n+.. _an automated regression test script: https://github.com/aff3ct/aff3ct/blob/master/ci/test-regression.py\n+.. _dedicated repository: https://github.com/aff3ct/error_rate_references\n+\n+We maintain a database of BER/FER reference simulations. Please give us some new\n+references which solicit the code you added. We use those references in\n+`an automated regression test script`_. To propose new references please use our\n+`dedicated repository`_ and send us a pull request on it.\n+\n+Coding conventions\n+------------------\n+\n+.. _snake case: https://en.wikipedia.org/wiki/Snake_case\n+\n+Start reading our code and you'll get the hang of it. For the readability, we\n+apply some coding conventions:\n+\n+ * we indent using tabulation (hard tabs),\n+ * we ALWAYS put spaces after list items and method parameters (``[1, 2, 3]``,\n+ not ``[1,2,3]``), around operators (``x += 1``, not ``x+=1``), and around\n+ hash arrows,\n+ * we use the `_snake case`_ (``my_variable``, not ``myVariable``), classes\n+ start with an upper case (`My_class`, not `my_class`) and\n+ variables/methods/functions start with a lower case,\n+ * the number of characters is limited to 120 per line of code.\n+\n+This is open source software. Consider the people who will read your code, and\n+make it look nice for them. It's sort of like driving a car: Perhaps you love\n+doing donuts when you're alone, but with passengers the goal is to make the ride\n+as smooth as possible.\n+\n+Thanks,\n+\n+the AFF3CT team\n\\ No newline at end of file\n"
}
] |
C++
|
MIT License
|
aff3ct/aff3ct
|
Use RestructuredText instead of Markdown for the contributing guide.
|
8,483 |
21.11.2018 16:09:47
| -3,600 |
4b7761d87bac3cf7aee76f4e528e748442b291c9
|
Add sim debug frame max option to limit the number of displayed frames when debuging.
|
[
{
"change_type": "MODIFY",
"old_path": "src/Factory/Simulation/Simulation.cpp",
"new_path": "src/Factory/Simulation/Simulation.cpp",
"diff": "@@ -82,6 +82,11 @@ void Simulation::parameters\ntools::Integer(tools::Positive(), tools::Non_zero()),\n\"set the max number of elements to display in the debug mode.\");\n+ args.add(\n+ {p+\"-debug-frame\"},\n+ tools::Integer(tools::Positive(), tools::Non_zero()),\n+ \"set the max number of frames to display in the debug mode.\");\n+\nargs.add(\n{p+\"-stats\"},\ntools::None(),\n@@ -138,6 +143,11 @@ void Simulation::parameters\nthis->debug = true;\nthis->debug_precision = vals.to_int({p+\"-debug-prec\"});\n}\n+ if(vals.exist({p+\"-debug-frame\"}))\n+ {\n+ this->debug = true;\n+ this->debug_frame_max = vals.to_int({p+\"-debug-frame\"});\n+ }\nif(vals.exist({p+\"-threads\", \"t\"}) && vals.to_int({p+\"-threads\", \"t\"}) > 0)\nif(vals.exist({p+\"-threads\", \"t\"})) this->n_threads = vals.to_int({p+\"-threads\", \"t\"});\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Factory/Simulation/Simulation.hpp",
"new_path": "src/Factory/Simulation/Simulation.hpp",
"diff": "@@ -46,6 +46,7 @@ struct Simulation : Launcher\nint global_seed = 0;\nint debug_limit = 0;\nint debug_precision = 2;\n+ int debug_frame_max = 0;\n// ---------------------------------------------------------------------------------------------------- METHODS\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Module/Task.cpp",
"new_path": "src/Module/Task.cpp",
"diff": "@@ -23,6 +23,7 @@ Task::Task(const Module &module, const std::string &name, const bool autoalloc,\ndebug_hex(false),\ndebug_limit(-1),\ndebug_precision(2),\n+ debug_frame_max(-1),\ncodelet([]() -> int { throw tools::unimplemented_error(__FILE__, __LINE__, __func__); return 0; }),\nn_calls(0),\nduration_total(std::chrono::nanoseconds(0)),\n@@ -106,6 +107,11 @@ void Task::set_debug_precision(const uint8_t prec)\nthis->debug_precision = prec;\n}\n+void Task::set_debug_frame_max(const uint32_t limit)\n+{\n+ this->debug_frame_max = limit;\n+}\n+\n// trick to compile on the GNU compiler version 4 (where 'std::hexfloat' is unavailable)\n#if !defined(__clang__) && !defined(__llvm__) && defined(__GNUC__) && defined(__cplusplus) && __GNUC__ < 5\nnamespace std {\n@@ -118,9 +124,22 @@ Hexfloat hexfloat;\nstd::ostream& operator<<(std::ostream &os, const std::Hexfloat &obj) { obj.message(os); return os; }\n#endif\n+uint32_t n_digits_dec(uint32_t v)\n+{\n+ uint32_t count = 0;\n+ while (v)\n+ {\n+ count++;\n+ v /= 10;\n+ }\n+\n+ return count;\n+}\n+\n+\ntemplate <typename T>\nstatic inline void display_data(const T *data,\n- const size_t fra_size, const size_t n_fra, const size_t limit,\n+ const size_t fra_size, const size_t n_fra, const size_t limit, const size_t max_frame,\nconst uint8_t p, const uint8_t n_spaces, const bool hex)\n{\nconstexpr bool is_float_type = std::is_same<float, T>::value || std::is_same<double, T>::value;\n@@ -134,34 +153,45 @@ static inline void display_data(const T *data,\nelse\nstd::cout << std::fixed << std::setprecision(p) << std::dec;\n- if (n_fra == 1)\n+ if (n_fra == 1 && max_frame != 0)\n{\n- for (auto i = 0; i < (int)limit; i++)\n+ for (size_t i = 0; i < limit; i++)\n{\nif (hex)\n- std::cout << (!is_float_type ? \"0x\" : \"\") << +data[i] << (i < (int)limit -1 ? \", \" : \"\");\n+ std::cout << (!is_float_type ? \"0x\" : \"\") << +data[i] << (i < limit -1 ? \", \" : \"\");\nelse\n- std::cout << std::setw(p +3) << +data[i] << (i < (int)limit -1 ? \", \" : \"\");\n+ std::cout << std::setw(p +3) << +data[i] << (i < limit -1 ? \", \" : \"\");\n}\nstd::cout << (limit < fra_size ? \", ...\" : \"\");\n}\nelse\n{\n- std::string spaces = \"#\"; for (auto s = 0; s < (int)n_spaces -1; s++) spaces += \" \";\n- for (auto f = 0; f < (int)n_fra; f++)\n+ std::string spaces = \"#\";\n+ for (uint8_t s = 0; s < n_spaces -1; s++)\n+ spaces += \" \";\n+\n+ const auto n_digits = n_digits_dec(max_frame);\n+\n+ for (size_t f = 0; f < max_frame; f++)\n{\n- std::string fra_id = \"f\" + std::to_string(f+1) + \":\";\n- std::cout << (f >= 1 ? spaces : \"\") << rang::style::bold << rang::fg::gray << fra_id\n- << rang::style::reset << \"(\";\n- for (auto i = 0; i < (int)limit; i++)\n+ std::cout << (f >= 1 ? spaces : \"\") << rang::style::bold << rang::fg::gray << \"f\" << std::setw(n_digits)\n+ << f+1 << rang::style::reset << \"(\";\n+\n+ for (size_t i = 0; i < limit; i++)\n{\nif (hex)\nstd::cout << (!is_float_type ? \"0x\" : \"\") << +data[f * fra_size +i]\n- << (i < (int)limit -1 ? \", \" : \"\");\n+ << (i < limit -1 ? \", \" : \"\");\nelse\n- std::cout << std::setw(p +3) << +data[f * fra_size +i] << (i < (int)limit -1 ? \", \" : \"\");\n+ std::cout << std::setw(p +3) << +data[f * fra_size +i] << (i < limit -1 ? \", \" : \"\");\n+ }\n+ std::cout << (limit < fra_size ? \", ...\" : \"\") << \")\" << (f < n_fra -1 ? \", \\n\" : \"\");\n}\n- std::cout << (limit < fra_size ? \", ...\" : \"\") << \")\" << (f < (int)n_fra -1 ? \", \\n\" : \"\");\n+\n+ if (max_frame < n_fra)\n+ {\n+ std::cout << (f >= 1 ? spaces : \"\") << rang::style::bold << rang::fg::gray << \"f\" << std::setw(n_digits)\n+ << max_frame + 1 << \"->\" << \"f\" << n_fra << \":\" << rang::style::reset << \"(...)\\n\";\n}\n}\n@@ -214,15 +244,16 @@ int Task::exec()\nauto n_elmts = s->get_databytes() / (size_t)s->get_datatype_size();\nauto fra_size = n_elmts / n_fra;\nauto limit = debug_limit != -1 ? std::min(fra_size, (size_t)debug_limit) : fra_size;\n+ auto max_frame = debug_frame_max != -1 ? std::min(n_fra, (size_t)debug_frame_max) : n_fra;\nauto p = debug_precision;\nauto h = debug_hex;\nstd::cout << \"# {IN} \" << s->get_name() << spaces << \" = [\";\n- if (s->get_datatype() == typeid(int8_t )) display_data((int8_t *)s->get_dataptr(), fra_size, n_fra, limit, p, (uint8_t)max_n_chars +12, h);\n- else if (s->get_datatype() == typeid(int16_t)) display_data((int16_t*)s->get_dataptr(), fra_size, n_fra, limit, p, (uint8_t)max_n_chars +12, h);\n- else if (s->get_datatype() == typeid(int32_t)) display_data((int32_t*)s->get_dataptr(), fra_size, n_fra, limit, p, (uint8_t)max_n_chars +12, h);\n- else if (s->get_datatype() == typeid(int64_t)) display_data((int64_t*)s->get_dataptr(), fra_size, n_fra, limit, p, (uint8_t)max_n_chars +12, h);\n- else if (s->get_datatype() == typeid(float )) display_data((float *)s->get_dataptr(), fra_size, n_fra, limit, p, (uint8_t)max_n_chars +12, h);\n- else if (s->get_datatype() == typeid(double )) display_data((double *)s->get_dataptr(), fra_size, n_fra, limit, p, (uint8_t)max_n_chars +12, h);\n+ if (s->get_datatype() == typeid(int8_t )) display_data((int8_t *)s->get_dataptr(), fra_size, n_fra, limit, max_frame, p, (uint8_t)max_n_chars +12, h);\n+ else if (s->get_datatype() == typeid(int16_t)) display_data((int16_t*)s->get_dataptr(), fra_size, n_fra, limit, max_frame, p, (uint8_t)max_n_chars +12, h);\n+ else if (s->get_datatype() == typeid(int32_t)) display_data((int32_t*)s->get_dataptr(), fra_size, n_fra, limit, max_frame, p, (uint8_t)max_n_chars +12, h);\n+ else if (s->get_datatype() == typeid(int64_t)) display_data((int64_t*)s->get_dataptr(), fra_size, n_fra, limit, max_frame, p, (uint8_t)max_n_chars +12, h);\n+ else if (s->get_datatype() == typeid(float )) display_data((float *)s->get_dataptr(), fra_size, n_fra, limit, max_frame, p, (uint8_t)max_n_chars +12, h);\n+ else if (s->get_datatype() == typeid(double )) display_data((double *)s->get_dataptr(), fra_size, n_fra, limit, max_frame, p, (uint8_t)max_n_chars +12, h);\nstd::cout << \"]\" << std::endl;\n}\n}\n@@ -264,15 +295,16 @@ int Task::exec()\nauto n_elmts = s->get_databytes() / (size_t)s->get_datatype_size();\nauto fra_size = n_elmts / n_fra;\nauto limit = debug_limit != -1 ? std::min(fra_size, (size_t)debug_limit) : fra_size;\n+ auto max_frame = debug_frame_max != -1 ? std::min(n_fra, (size_t)debug_frame_max) : n_fra;\nauto p = debug_precision;\nauto h = debug_hex;\nstd::cout << \"# {OUT} \" << s->get_name() << spaces << \" = [\";\n- if (s->get_datatype() == typeid(int8_t )) display_data((int8_t *)s->get_dataptr(), fra_size, n_fra, limit, p, (uint8_t)max_n_chars +12, h);\n- else if (s->get_datatype() == typeid(int16_t)) display_data((int16_t*)s->get_dataptr(), fra_size, n_fra, limit, p, (uint8_t)max_n_chars +12, h);\n- else if (s->get_datatype() == typeid(int32_t)) display_data((int32_t*)s->get_dataptr(), fra_size, n_fra, limit, p, (uint8_t)max_n_chars +12, h);\n- else if (s->get_datatype() == typeid(int64_t)) display_data((int64_t*)s->get_dataptr(), fra_size, n_fra, limit, p, (uint8_t)max_n_chars +12, h);\n- else if (s->get_datatype() == typeid(float )) display_data((float *)s->get_dataptr(), fra_size, n_fra, limit, p, (uint8_t)max_n_chars +12, h);\n- else if (s->get_datatype() == typeid(double )) display_data((double *)s->get_dataptr(), fra_size, n_fra, limit, p, (uint8_t)max_n_chars +12, h);\n+ if (s->get_datatype() == typeid(int8_t )) display_data((int8_t *)s->get_dataptr(), fra_size, n_fra, limit, max_frame, p, (uint8_t)max_n_chars +12, h);\n+ else if (s->get_datatype() == typeid(int16_t)) display_data((int16_t*)s->get_dataptr(), fra_size, n_fra, limit, max_frame, p, (uint8_t)max_n_chars +12, h);\n+ else if (s->get_datatype() == typeid(int32_t)) display_data((int32_t*)s->get_dataptr(), fra_size, n_fra, limit, max_frame, p, (uint8_t)max_n_chars +12, h);\n+ else if (s->get_datatype() == typeid(int64_t)) display_data((int64_t*)s->get_dataptr(), fra_size, n_fra, limit, max_frame, p, (uint8_t)max_n_chars +12, h);\n+ else if (s->get_datatype() == typeid(float )) display_data((float *)s->get_dataptr(), fra_size, n_fra, limit, max_frame, p, (uint8_t)max_n_chars +12, h);\n+ else if (s->get_datatype() == typeid(double )) display_data((double *)s->get_dataptr(), fra_size, n_fra, limit, max_frame, p, (uint8_t)max_n_chars +12, h);\nstd::cout << \"]\" << std::endl;\n}\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Module/Task.hpp",
"new_path": "src/Module/Task.hpp",
"diff": "@@ -43,6 +43,7 @@ protected:\nbool debug_hex;\nint32_t debug_limit;\nuint8_t debug_precision;\n+ int32_t debug_frame_max;\nstd::function<int(void)> codelet;\nstd::vector<mipp::vector<uint8_t>> out_buffers;\n@@ -84,6 +85,7 @@ public:\nvoid set_debug_hex (const bool debug_hex);\nvoid set_debug_limit (const uint32_t limit );\nvoid set_debug_precision(const uint8_t prec );\n+ void set_debug_frame_max(const uint32_t limit );\ninline bool is_autoalloc ( ) const { return this->autoalloc; }\ninline bool is_autoexec ( ) const { return this->autoexec; }\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Simulation/Simulation.cpp",
"new_path": "src/Simulation/Simulation.cpp",
"diff": "@@ -42,6 +42,8 @@ void Simulation\nt->set_debug_limit((uint32_t)params.debug_limit);\nif (params.debug_precision)\nt->set_debug_precision((uint8_t)params.debug_precision);\n+ if (params.debug_frame_max)\n+ t->set_debug_frame_max((uint32_t)params.debug_frame_max);\n}\nif (!t->is_stats() && !t->is_debug())\n"
}
] |
C++
|
MIT License
|
aff3ct/aff3ct
|
Add sim debug frame max option to limit the number of displayed frames when debuging.
|
8,483 |
21.11.2018 16:37:07
| -3,600 |
4f8f442737df54c9a2ed5a4f08006dcfec2401a5
|
Fix the display of the debug
|
[
{
"change_type": "MODIFY",
"old_path": "src/Module/Task.cpp",
"new_path": "src/Module/Task.cpp",
"diff": "@@ -191,7 +191,7 @@ static inline void display_data(const T *data,\nif (max_frame < n_fra)\n{\nstd::cout << (f >= 1 ? spaces : \"\") << rang::style::bold << rang::fg::gray << \"f\" << std::setw(n_digits)\n- << max_frame + 1 << \"->\" << \"f\" << n_fra << \":\" << rang::style::reset << \"(...)\\n\";\n+ << max_frame + 1 << \"->\" << \"f\" << n_fra << \":\" << rang::style::reset << \"(...)\";\n}\n}\n"
}
] |
C++
|
MIT License
|
aff3ct/aff3ct
|
Fix the display of the debug
|
8,482 |
21.11.2018 20:05:29
| -10,800 |
4fe37f15e47a57d0623d7e3a02b54cc4b6918584
|
Delete unused argument in demodulate_batch function
|
[
{
"change_type": "MODIFY",
"old_path": "src/Module/Modem/SCMA/Modem_SCMA.hpp",
"new_path": "src/Module/Modem/SCMA/Modem_SCMA.hpp",
"diff": "@@ -67,7 +67,7 @@ public:\nprivate:\nQ phi(const Q* Y_N1, int i, int j, int k, int re, int batch);\nQ phi(const Q* Y_N1, int i, int j, int k, int re, int batch, const R* H_N);\n- void demodulate_batch(const Q* Y_N1, Q* Y_N2, int batch);\n+ void demodulate_batch(Q* Y_N2, int batch);\nQ normalize_prob_msg_res_user(int user, int resource_ind, int resource);\n};\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Module/Modem/SCMA/Modem_SCMA.hxx",
"new_path": "src/Module/Modem/SCMA/Modem_SCMA.hxx",
"diff": "@@ -143,7 +143,7 @@ void Modem_SCMA<B,R,Q,PSI>\nfor (auto re = 0; re < CB.get_number_of_resources(); re++)\narr_phi(re,i,j,k) = phi(Y_N1, i, j, k, re, batch, H_N);\n- demodulate_batch(Y_N1,Y_N2,batch);\n+ demodulate_batch(Y_N2, batch);\n}\n}\n@@ -176,13 +176,13 @@ void Modem_SCMA<B,R,Q,PSI>\nfor (auto re = 0; re < CB.get_number_of_resources(); re++)\narr_phi(re,i,j,k) = phi(Y_N1, i, j, k, re, batch);\n- demodulate_batch(Y_N1,Y_N2,batch);\n+ demodulate_batch(Y_N2, batch);\n}\n}\ntemplate <typename B, typename R, typename Q, tools::proto_psi<Q> PSI>\nvoid Modem_SCMA<B,R,Q,PSI>\n-::demodulate_batch(const Q* Y_N1, Q* Y_N2, int batch)\n+::demodulate_batch(Q* Y_N2, int batch)\n{\nif (!std::is_same<R,Q>::value)\nthrow tools::invalid_argument(__FILE__, __LINE__, __func__, \"Type 'R' and 'Q' have to be the same.\");\n"
}
] |
C++
|
MIT License
|
aff3ct/aff3ct
|
Delete unused argument in demodulate_batch function
|
8,482 |
21.11.2018 20:13:42
| -10,800 |
799f9873d28dc2915d4312d9d838ba27217b2522
|
Headers are guarded against multiple inclusions
|
[
{
"change_type": "MODIFY",
"old_path": "src/Module/Modem/SCMA/Modem_SCMA.hxx",
"new_path": "src/Module/Modem/SCMA/Modem_SCMA.hxx",
"diff": "+#ifndef MODEM_SCMA_HXX_\n+#define MODEM_SCMA_HXX_\n+\n#include <cassert>\n#include <iomanip>\n#include <type_traits>\n@@ -355,3 +358,5 @@ void Modem_SCMA<B,R,Q,PSI>\n}\n}\n}\n+\n+#endif // MODEM_SCMA_HXX_\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Tools/Code/SCMA/modem_SCMA_functions.hxx",
"new_path": "src/Tools/Code/SCMA/modem_SCMA_functions.hxx",
"diff": "+#ifndef MODEM_SCMA_FUNCTIONS_HXX_\n+#define MODEM_SCMA_FUNCTIONS_HXX_\n+\n#include <cmath>\n#include \"modem_SCMA_functions.hpp\"\n@@ -31,3 +34,5 @@ inline R psi_3(const std::complex<R>& d, const R& n0)\n}\n}\n}\n+\n+#endif // MODEM_SCMA_FUNCTIONS_HXX_\n"
}
] |
C++
|
MIT License
|
aff3ct/aff3ct
|
Headers are guarded against multiple inclusions
|
8,482 |
22.11.2018 12:05:27
| -10,800 |
9e3610a56c703de3d90366ed9b03045895ef0866
|
Add system_bps attribute in Codebook class
The value may be float
|
[
{
"change_type": "MODIFY",
"old_path": "src/Module/Modem/SCMA/Modem_SCMA.hxx",
"new_path": "src/Module/Modem/SCMA/Modem_SCMA.hxx",
"diff": "@@ -43,11 +43,10 @@ Modem_SCMA<B,R,Q,PSI>\nthrow tools::invalid_argument(__FILE__, __LINE__, __func__, message.str());\n}\n- if (bps != 3) // TODO: With what should \"3\" be replaced ? -> have added \"bps\" attribute to the class, maybe you'll\n- // need to use it in the code to have it generic\n+ if (fabs(bps - CB.get_system_bps()) > std::numeric_limits<double>::epsilon())\n{\nstd::stringstream message;\n- message << \"'bps' has to be equal to 3 ('bps' = \" << bps << \").\";\n+ message << \"'bps' has to be equal to \" << CB.get_system_bps() << \" ('bps' = \" << bps << \").\";\nthrow tools::invalid_argument(__FILE__, __LINE__, __func__, message.str());\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Tools/Code/SCMA/Codebook.hpp",
"new_path": "src/Tools/Code/SCMA/Codebook.hpp",
"diff": "@@ -24,6 +24,7 @@ public:\nint get_number_of_resources () const;\nint get_number_of_resources_per_user() const;\nint get_number_of_users_per_resource() const;\n+ double get_system_bps () const;\nint get_resource_to_user(int r, int idx) const;\nint get_user_to_resource(int u, int idx) const;\n@@ -34,6 +35,7 @@ private:\nint number_of_resources_per_user = 0;\nint number_of_users_per_resource = 0;\nint codebook_size = 0;\n+ double system_bps = 0; // overall system spectral eff., may be float (e.g., 3 bps per user, 6 users, 4 resources -> 4.5)\nstd::vector<std::vector<std::vector<std::complex<R>>>> data;\nstd::vector<std::vector<int>> resource_to_user;\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Tools/Code/SCMA/Codebook.hxx",
"new_path": "src/Tools/Code/SCMA/Codebook.hxx",
"diff": "@@ -135,7 +135,6 @@ void Codebook<R>\n}\n}\n-\nresource_to_user.resize(number_of_resources);\nfor (int r = 0; r < number_of_resources; ++r)\n{\n@@ -165,6 +164,8 @@ void Codebook<R>\n}\n}\n}\n+\n+ system_bps = log2((double)codebook_size) * number_of_users / number_of_resources;\n}\ntemplate <typename R>\n@@ -222,6 +223,13 @@ inline int Codebook<R>\nreturn user_to_resource[u][r];\n}\n+template <typename R>\n+inline double Codebook<R>\n+::get_system_bps() const\n+{\n+ return system_bps;\n+}\n+\n}\n}\n"
}
] |
C++
|
MIT License
|
aff3ct/aff3ct
|
Add system_bps attribute in Codebook class
The value may be float
|
8,482 |
22.11.2018 12:21:29
| -10,800 |
e755575ca0ccb904b29b3d93c58ee8ba0652a312
|
Add member number_of_real_symbols and method get_number_of_real_symbols
|
[
{
"change_type": "MODIFY",
"old_path": "src/Tools/Code/SCMA/Codebook.hpp",
"new_path": "src/Tools/Code/SCMA/Codebook.hpp",
"diff": "@@ -24,6 +24,7 @@ public:\nint get_number_of_resources () const;\nint get_number_of_resources_per_user() const;\nint get_number_of_users_per_resource() const;\n+ int get_number_of_real_symbols () const;\ndouble get_system_bps () const;\nint get_resource_to_user(int r, int idx) const;\n@@ -35,6 +36,7 @@ private:\nint number_of_resources_per_user = 0;\nint number_of_users_per_resource = 0;\nint codebook_size = 0;\n+ int number_of_real_symbols = 0;\ndouble system_bps = 0; // overall system spectral eff., may be float (e.g., 3 bps per user, 6 users, 4 resources -> 4.5)\nstd::vector<std::vector<std::vector<std::complex<R>>>> data;\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Tools/Code/SCMA/Codebook.hxx",
"new_path": "src/Tools/Code/SCMA/Codebook.hxx",
"diff": "@@ -223,6 +223,13 @@ inline int Codebook<R>\nreturn user_to_resource[u][r];\n}\n+template <typename R>\n+inline int Codebook<R>\n+::get_number_of_real_symbols() const\n+{\n+ return 2 * number_of_resources;\n+}\n+\ntemplate <typename R>\ninline double Codebook<R>\n::get_system_bps() const\n"
}
] |
C++
|
MIT License
|
aff3ct/aff3ct
|
Add member number_of_real_symbols and method get_number_of_real_symbols
|
8,482 |
22.11.2018 12:29:48
| -10,800 |
553c8aba0171160ea441ffd838c103f21b82ef37
|
Value "8" replacrd by CB.get_number_of_real_symbols()
|
[
{
"change_type": "MODIFY",
"old_path": "src/Module/Modem/SCMA/Modem_SCMA.hxx",
"new_path": "src/Module/Modem/SCMA/Modem_SCMA.hxx",
"diff": "@@ -82,7 +82,7 @@ void Modem_SCMA<B,R,Q,PSI>\nthrow tools::invalid_argument(__FILE__, __LINE__, __func__, message.str());\n}\n- const auto N_mod = 8 * ((this->N + 1) / 2); // TODO: With what should \"8\" be replaced ?\n+ const auto N_mod = CB.get_number_of_real_symbols() * ((this->N + 1) / 2);\nfor (auto f = 0 ; f < this->n_frames ; f++)\n{\n@@ -95,8 +95,8 @@ void Modem_SCMA<B,R,Q,PSI>\nfor (auto i = 0 ; i < CB.get_number_of_resources() ; i++)\n{\n- X_N2[f * N_mod + 8 * j + 2 * i ] = CB(f, i, idx).real();\n- X_N2[f * N_mod + 8 * j + 2 * i +1] = CB(f, i, idx).imag();\n+ X_N2[f * N_mod + CB.get_number_of_real_symbols() * j + 2 * i ] = CB(f, i, idx).real();\n+ X_N2[f * N_mod + CB.get_number_of_real_symbols() * j + 2 * i +1] = CB(f, i, idx).imag();\n}\n}\n}\n@@ -109,8 +109,8 @@ void Modem_SCMA<B,R,Q,PSI>\nfor (auto i = 0 ; i < CB.get_number_of_resources() ; i++)\n{\n- X_N2[f * N_mod + 8 * (this->N / 2) + 2 * i ] = CB(f, i, idx).real(); // TODO: With what should \"8\" be replaced ?\n- X_N2[f * N_mod + 8 * (this->N / 2) + 2 * i +1] = CB(f, i, idx).imag(); // TODO: With what should \"2\" be replaced ?\n+ X_N2[f * N_mod + CB.get_number_of_real_symbols() * (this->N / 2) + 2 * i ] = CB(f, i, idx).real();\n+ X_N2[f * N_mod + CB.get_number_of_real_symbols() * (this->N / 2) + 2 * i +1] = CB(f, i, idx).imag();\n}\n}\n}\n@@ -287,7 +287,8 @@ template <typename B, typename R, typename Q, tools::proto_psi<Q> PSI>\nQ Modem_SCMA<B,R,Q,PSI>\n::phi(const Q* Y_N1, int i, int j, int k, int re, int batch)\n{\n- auto Y_N = std::complex<Q>(Y_N1[batch *8 + 2*re], Y_N1[batch*8 + 2*re +1]);\n+ auto Y_N = std::complex<Q>(Y_N1[batch * CB.get_number_of_real_symbols() + 2 * re],\n+ Y_N1[batch * CB.get_number_of_real_symbols() + 2 * re +1]);\nconst auto CB0 = std::complex<Q>(CB(CB.get_resource_to_user(re, 0), re, i)); // convert from R to Q\nconst auto CB1 = std::complex<Q>(CB(CB.get_resource_to_user(re, 1), re, j));\n@@ -322,14 +323,21 @@ Q Modem_SCMA<B,R,Q,PSI>\nstd::complex<Q> tmp;\nconst auto Nmod = size_mod(this->N, 3);\n- const auto Y_N = std::complex<Q>(Y_N1[batch *8 + 2*re], Y_N1[batch*8 + 2*re +1]);\n-\n- const auto H_N0 = std::complex<Q>((Q)H_N[CB.get_resource_to_user(re, 0) * Nmod + 8 * batch + 2 * re ],\n- (Q)H_N[CB.get_resource_to_user(re, 0) * Nmod + 8 * batch + 2 * re +1]);\n- const auto H_N1 = std::complex<Q>((Q)H_N[CB.get_resource_to_user(re, 1) * Nmod + 8 * batch + 2 * re ],\n- (Q)H_N[CB.get_resource_to_user(re, 1) * Nmod + 8 * batch + 2 * re +1]);\n- const auto H_N2 = std::complex<Q>((Q)H_N[CB.get_resource_to_user(re, 2) * Nmod + 8 * batch + 2 * re ],\n- (Q)H_N[CB.get_resource_to_user(re, 2) * Nmod + 8 * batch + 2 * re +1]);\n+ const auto Y_N = std::complex<Q>(Y_N1[batch * CB.get_number_of_real_symbols() + 2 * re],\n+ Y_N1[batch * CB.get_number_of_real_symbols() + 2 * re +1]);\n+\n+ const auto H_N0 = std::complex<Q>((Q)H_N[CB.get_resource_to_user(re, 0) * Nmod\n+ + CB.get_number_of_real_symbols() * batch + 2 * re ],\n+ (Q)H_N[CB.get_resource_to_user(re, 0) * Nmod\n+ + CB.get_number_of_real_symbols() * batch + 2 * re +1]);\n+ const auto H_N1 = std::complex<Q>((Q)H_N[CB.get_resource_to_user(re, 1) * Nmod\n+ + CB.get_number_of_real_symbols() * batch + 2 * re ],\n+ (Q)H_N[CB.get_resource_to_user(re, 1) * Nmod\n+ + CB.get_number_of_real_symbols() * batch + 2 * re +1]);\n+ const auto H_N2 = std::complex<Q>((Q)H_N[CB.get_resource_to_user(re, 2) * Nmod\n+ + CB.get_number_of_real_symbols() * batch + 2 * re ],\n+ (Q)H_N[CB.get_resource_to_user(re, 2) * Nmod\n+ + CB.get_number_of_real_symbols() * batch + 2 * re +1]);\nconst auto CB0 = std::complex<Q>(CB(CB.get_resource_to_user(re, 0), re, i));\nconst auto CB1 = std::complex<Q>(CB(CB.get_resource_to_user(re, 1), re, j));\n"
}
] |
C++
|
MIT License
|
aff3ct/aff3ct
|
Value "8" replacrd by CB.get_number_of_real_symbols()
|
8,490 |
22.11.2018 11:36:36
| -3,600 |
a3ebbf456ddd37c0aa5fb5e433bb878672d4d0c2
|
Doc: replace 'bash' by 'console'.
|
[
{
"change_type": "MODIFY",
"old_path": "CONTRIBUTING.rst",
"new_path": "CONTRIBUTING.rst",
"diff": "@@ -21,7 +21,7 @@ done (read more about `pull requests`_).\nAlways write a clear log message for your commits. One-line messages are fine\nfor small changes, but bigger changes should look like this:\n-.. code-block:: bash\n+.. code-block:: console\n$ git commit -m \"A brief summary of the commit\n>\n"
},
{
"change_type": "MODIFY",
"old_path": "README.rst",
"new_path": "README.rst",
"diff": "@@ -11,13 +11,13 @@ method.\nIt is very easy to use, for instance, to estimate the BER/FER decoding\nperformances of the (2048,1723) Polar code from 1.0 to 4.0 dB:\n-.. code-block:: bash\n+.. code-block:: console\naff3ct -C POLAR -K 1723 -N 2048 -m 1.0 -M 4.0\nAnd the output will be:\n-.. code-block:: bash\n+.. code-block:: console\n# ----------------------------------------------------\n# ---- A FAST FORWARD ERROR CORRECTION TOOLBOX >> ----\n@@ -61,7 +61,7 @@ Installation\nFirst make sure to have installed a C++11 compiler, CMake and Git. Then install\nAFF3CT by running:\n-.. code-block:: bash\n+.. code-block:: console\ngit clone --recursive https://github.com/aff3ct/aff3ct.git\nmkdir aff3ct/build\n"
}
] |
C++
|
MIT License
|
aff3ct/aff3ct
|
Doc: replace 'bash' by 'console'.
|
8,490 |
22.11.2018 11:48:02
| -3,600 |
dd943dd9c882f6890d0dd01f0e5ed2c8cac5b314
|
Doc: rm Simulink.
|
[
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/user/introduction/introduction.rst",
"new_path": "doc/sphinx/source/user/introduction/introduction.rst",
"diff": "@@ -38,8 +38,7 @@ Below, a list of the features that motivated the creation of the simulator:\n#. **prototype hardware implementation** (fixed-point receivers, hardware in\nthe loop tools),\n#. **reuse tried and tested modules** and add yours,\n- #. **alternative to MATLAB and Simulink**, if you seek to reduce simulations\n- time.\n+ #. **alternative to MATLAB**, if you seek to reduce simulations time.\n|AFF3CT| was first intended to be a simulator but as it developed, the need to\nreuse sub-parts of the code intensified: **the library was born**. Below is a\n"
}
] |
C++
|
MIT License
|
aff3ct/aff3ct
|
Doc: rm Simulink.
|
8,483 |
22.11.2018 16:06:11
| -3,600 |
e44ba0062f195c1c6c1d820cde232d50d5a6d8dc
|
Doc: Add the --sim-debug-frame argument
|
[
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/user/simulation/parameters/sim/sim.rst",
"new_path": "doc/sphinx/source/user/simulation/parameters/sim/sim.rst",
"diff": "@@ -355,7 +355,7 @@ step.\n``--sim-debug-hex``\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n-Enable the debug mode and prints values in the hexadecimal format.\n+Enable the debug mode and *print values in the hexadecimal format*.\n.. _sim-sim-debug-limit:\n@@ -366,9 +366,21 @@ Enable the debug mode and prints values in the hexadecimal format.\n:Default: 0\n:Examples: ``--sim-debug-limit 1``\n-Enable the debug mode and sets the max number of elements to display per\n+Enable the debug mode and set *the max number of elements* to display per\nframe. A number of elements at 0 means there is no dump limit.\n+.. _sim-sim-debug-frame:\n+\n+``--sim-debug-frame``\n+\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n+\n+ :Type: integer\n+ :Default: 0\n+ :Examples: ``--sim-debug-frame 10``\n+\n+Enable the debug mode and set *the max number of frames* to display per module.\n+A number of elements at 0 means there is no dump limit.\n+\n.. _sim-sim-debug-prec:\n``--sim-debug-prec``\n@@ -378,7 +390,7 @@ frame. A number of elements at 0 means there is no dump limit.\n:Default: 2\n:Examples: ``--sim-debug-prec 1``\n-Enable the debug mode and sets the decimal precision (number of digits for\n+Enable the debug mode and set *the decimal precision* (number of digits for\ndecimal part) of real elements.\n.. _sim-sim-no-colors:\n"
}
] |
C++
|
MIT License
|
aff3ct/aff3ct
|
Doc: Add the --sim-debug-frame argument
|
8,483 |
22.11.2018 16:18:09
| -3,600 |
2ed8c7f42bdfd72d8a761af7021753b59d2b1b9a
|
Rename --sim-debug-xxx args into --sim-dbg-xxx.
|
[
{
"change_type": "MODIFY",
"old_path": "src/Factory/Simulation/Simulation.cpp",
"new_path": "src/Factory/Simulation/Simulation.cpp",
"diff": "@@ -46,44 +46,44 @@ void Simulation::parameters\nargs.add(\n{p+\"-stop-time\"},\ntools::Integer(tools::Positive()),\n- \"time in sec after what the current simulatated noise stops (0 is infinite).\",\n+ \"time in sec after what the current simulated noise stops (0 is infinite).\",\ntools::arg_rank::ADV);\nargs.add(\n- {p+\"-max-frame\", \"n\"},\n+ {p+\"-max-fra\", \"n\"},\ntools::Integer(tools::Positive()),\n- \"maximum number of frames to play after what the current simulatated noise stops (0 is infinite).\",\n+ \"maximum number of frames to play after what the current simulated noise stops (0 is infinite).\",\ntools::arg_rank::ADV);\nargs.add(\n{p+\"-crit-nostop\"},\ntools::None(),\n- \"The stop criteria arguments -stop-time or -max-frame kill the current simulatated noise point\"\n+ \"The stop criteria arguments -stop-time or -max-fra kill the current simulated noise point\"\n\" but not the simulation.\",\ntools::arg_rank::ADV);\nargs.add(\n- {p+\"-debug\"},\n+ {p+\"-dbg\"},\ntools::None(),\n\"enable debug mode: print array values after each step.\");\nargs.add(\n- {p+\"-debug-hex\"},\n+ {p+\"-dbg-hex\"},\ntools::None(),\n\"debug mode prints values in the hexadecimal format.\");\nargs.add(\n- {p+\"-debug-prec\"},\n+ {p+\"-dbg-prec\"},\ntools::Integer(tools::Positive()),\n\"set the precision of real elements when displayed in debug mode.\");\nargs.add(\n- {p+\"-debug-limit\", \"d\"},\n+ {p+\"-dbg-limit\", \"d\"},\ntools::Integer(tools::Positive(), tools::Non_zero()),\n\"set the max number of elements to display in the debug mode.\");\nargs.add(\n- {p+\"-debug-frame\"},\n+ {p+\"-dbg-fra\"},\ntools::Integer(tools::Positive(), tools::Non_zero()),\n\"set the max number of frames to display in the debug mode.\");\n@@ -123,30 +123,30 @@ void Simulation::parameters\nif(vals.exist({p+\"-meta\" })) this->meta = vals.at ({p+\"-meta\" });\nif(vals.exist({p+\"-stop-time\" })) this->stop_time = seconds(vals.to_int({p+\"-stop-time\" }));\n- if(vals.exist({p+\"-max-frame\", \"n\"})) this->max_frame = vals.to_int({p+\"-max-frame\", \"n\"});\n+ if(vals.exist({p+\"-max-fra\", \"n\"})) this->max_frame = vals.to_int({p+\"-max-fra\", \"n\"});\nif(vals.exist({p+\"-seed\", \"S\"})) this->global_seed = vals.to_int({p+\"-seed\", \"S\"});\nif(vals.exist({p+\"-stats\" })) this->statistics = true;\n- if(vals.exist({p+\"-debug\" })) this->debug = true;\n+ if(vals.exist({p+\"-dbg\" })) this->debug = true;\nif(vals.exist({p+\"-crit-nostop\" })) this->crit_nostop = true;\n- if(vals.exist({p+\"-debug-limit\", \"d\"}))\n+ if(vals.exist({p+\"-dbg-limit\", \"d\"}))\n{\nthis->debug = true;\n- this->debug_limit = vals.to_int({p+\"-debug-limit\", \"d\"});\n+ this->debug_limit = vals.to_int({p+\"-dbg-limit\", \"d\"});\n}\n- if(vals.exist({p+\"-debug-hex\"}))\n+ if(vals.exist({p+\"-dbg-hex\"}))\n{\nthis->debug = true;\nthis->debug_hex = true;\n}\n- if(vals.exist({p+\"-debug-prec\"}))\n+ if(vals.exist({p+\"-dbg-prec\"}))\n{\nthis->debug = true;\n- this->debug_precision = vals.to_int({p+\"-debug-prec\"});\n+ this->debug_precision = vals.to_int({p+\"-dbg-prec\"});\n}\n- if(vals.exist({p+\"-debug-frame\"}))\n+ if(vals.exist({p+\"-dbg-fra\"}))\n{\nthis->debug = true;\n- this->debug_frame_max = vals.to_int({p+\"-debug-frame\"});\n+ this->debug_frame_max = vals.to_int({p+\"-dbg-fra\"});\n}\nif(vals.exist({p+\"-threads\", \"t\"}) && vals.to_int({p+\"-threads\", \"t\"}) > 0)\n"
}
] |
C++
|
MIT License
|
aff3ct/aff3ct
|
Rename --sim-debug-xxx args into --sim-dbg-xxx.
|
8,483 |
22.11.2018 16:19:39
| -3,600 |
98467f04550c7fbf4877fc04b8b4e91586114320
|
Rename --mnt-max-frame into --mnt-max-fra
|
[
{
"change_type": "MODIFY",
"old_path": "src/Factory/Module/Monitor/BFER/Monitor_BFER.cpp",
"new_path": "src/Factory/Module/Monitor/BFER/Monitor_BFER.cpp",
"diff": "@@ -46,7 +46,7 @@ void Monitor_BFER::parameters\n\"max number of frame errors for each noise point simulation.\");\nargs.add(\n- {p+\"-max-frame\", \"n\"},\n+ {p+\"-max-fra\", \"n\"},\ntools::Integer(tools::Positive()),\n\"maximum number of frames for each noise point simulation.\",\ntools::arg_rank::ADV);\n@@ -74,7 +74,7 @@ void Monitor_BFER::parameters\nif(vals.exist({p+\"-max-fe\", \"e\"})) this->n_frame_errors = vals.to_int({p+\"-max-fe\", \"e\"});\nif(vals.exist({p+\"-err-hist\" })) this->err_hist = vals.to_int({p+\"-err-hist\" });\nif(vals.exist({p+\"-err-hist-path\" })) this->err_hist_path = vals.at ({p+\"-err-hist-path\" });\n- if(vals.exist({p+\"-max-frame\", \"n\"})) this->max_frame = vals.to_int({p+\"-max-frame\", \"n\"});\n+ if(vals.exist({p+\"-max-fra\", \"n\"})) this->max_frame = vals.to_int({p+\"-max-fra\", \"n\"});\n}\nvoid Monitor_BFER::parameters\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Launcher/Simulation/BFER_ite.cpp",
"new_path": "src/Launcher/Simulation/BFER_ite.cpp",
"diff": "@@ -77,7 +77,7 @@ void BFER_ite<B,R,Q>\nthis->args.erase({pqnt+\"-fra\", \"F\"});\nthis->args.erase({pmnt+\"-info-bits\", \"K\"});\nthis->args.erase({pmnt+\"-fra\", \"F\"});\n- this->args.erase({pmnt+\"-max-frame\", \"n\"});\n+ this->args.erase({pmnt+\"-max-fra\", \"n\"});\nthis->args.erase({pter+\"-info-bits\", \"K\"});\nthis->args.erase({pter+\"-cw-size\", \"N\"});\nthis->args.erase({psim+\"-mutinfo\" });\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Launcher/Simulation/BFER_std.cpp",
"new_path": "src/Launcher/Simulation/BFER_std.cpp",
"diff": "@@ -74,7 +74,7 @@ void BFER_std<B,R,Q>\nthis->args.erase({pmnt+\"-info-bits\", \"K\"});\nthis->args.erase({pmnt+\"-fra-size\", \"N\"});\nthis->args.erase({pmnt+\"-fra\", \"F\"});\n- this->args.erase({pmnt+\"-max-frame\", \"n\"});\n+ this->args.erase({pmnt+\"-max-fra\", \"n\"});\nthis->args.erase({pmnt+\"-trials\", \"n\"});\nthis->args.erase({pter+\"-info-bits\", \"K\"});\nthis->args.erase({pter+\"-cw-size\", \"N\"});\n"
}
] |
C++
|
MIT License
|
aff3ct/aff3ct
|
Rename --mnt-max-frame into --mnt-max-fra
|
8,483 |
22.11.2018 16:36:44
| -3,600 |
2c9edf74d85f1f38f4c812158956052903a90b0f
|
Doc: change --sim-debug-xxx args to --sim-dbg-xxx
|
[
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/user/simulation/parameters/sim/sim.rst",
"new_path": "doc/sphinx/source/user/simulation/parameters/sim/sim.rst",
"diff": "@@ -333,10 +333,10 @@ vice-versa.\n.. TODO : add a link to the COSET encoder.\n-.. _sim-sim-debug:\n+.. _sim-sim-dbg:\n-``--sim-debug``\n-\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n+``--sim-dbg``\n+\"\"\"\"\"\"\"\"\"\"\"\"\"\nEnable the debug mode. This prints the frame values after each module\nstep.\n@@ -345,50 +345,50 @@ step.\nto remove the :ref:`sim-sim-threads` from your command line if you use it.\n.. hint:: To keep a readable debug log, use :ref:`mnt-mnt-max-fe` or\n- :ref:`sim-sim-max-frame` to stop your\n+ :ref:`sim-sim-max-fra` to stop your\nsimulation after that a given amount of frames have been played. You may also\n- think about using :ref:`sim-sim-debug-limit` when playing with too long\n+ think about using :ref:`sim-sim-dbg-limit` when playing with too long\nframes (more than 32 bits in function of your screen size).\n-.. _sim-sim-debug-hex:\n+.. _sim-sim-dbg-hex:\n-``--sim-debug-hex``\n-\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n+``--sim-dbg-hex``\n+\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\nEnable the debug mode and *print values in the hexadecimal format*.\n-.. _sim-sim-debug-limit:\n+.. _sim-sim-dbg-limit:\n-``--sim-debug-limit, -d``\n-\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n+``--sim-dbg-limit, -d``\n+\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n:Type: integer\n:Default: 0\n- :Examples: ``--sim-debug-limit 1``\n+ :Examples: ``--sim-dbg-limit 1``\nEnable the debug mode and set *the max number of elements* to display per\nframe. A number of elements at 0 means there is no dump limit.\n-.. _sim-sim-debug-frame:\n+.. _sim-sim-dbg-fra:\n-``--sim-debug-frame``\n-\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n+``--sim-dbg-fra``\n+\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n:Type: integer\n:Default: 0\n- :Examples: ``--sim-debug-frame 10``\n+ :Examples: ``--sim-dbg-fra 10``\nEnable the debug mode and set *the max number of frames* to display per module.\nA number of elements at 0 means there is no dump limit.\n-.. _sim-sim-debug-prec:\n+.. _sim-sim-dbg-prec:\n-``--sim-debug-prec``\n-\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n+``--sim-dbg-prec``\n+\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n:Type: integer\n:Default: 2\n- :Examples: ``--sim-debug-prec 1``\n+ :Examples: ``--sim-dbg-prec 1``\nEnable the debug mode and set *the decimal precision* (number of digits for\ndecimal part) of real elements.\n@@ -481,14 +481,14 @@ Set the number of global iterations between the demodulator and the decoder.\n.. note:: Available only for BFERI simulations.\n-.. _sim-sim-max-frame:\n+.. _sim-sim-max-fra:\n-``--sim-max-frame, -n`` |image_advanced_argument|\n-\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n+``--sim-max-fra, -n`` |image_advanced_argument|\n+\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n:Type: integer\n:Default: 0\n- :Examples: ``--sim-max-frame 1``\n+ :Examples: ``--sim-max-fra 1``\nSet the maximum number of frames to play after what the current simulated noise\npoint is stopped. A 0 value means no limit. The simulation is also stopped\n@@ -512,7 +512,7 @@ if the :ref:`sim-sim-crit-nostop` option is used.\n``--sim-crit-nostop`` |image_advanced_argument|\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n-Set the stop criteria arguments:ref:`sim-sim-max-frame` and\n+Set the stop criteria arguments:ref:`sim-sim-max-fra` and\n:ref:`sim-sim-stop-time` stop only the currently simulated noise point but not\nthe simulation.\n@@ -535,7 +535,7 @@ Automatically replay the saved frames while running with :ref:`sim-sim-err-trk`.\n.. tip:: To play back the bad frames, just add **-rev** to the\n:ref:`sim-sim-err-trk` argument and change nothing else to your command line\n- except the debug mode arguments (:ref:`sim-sim-debug`).\n+ except the debug mode arguments (:ref:`sim-sim-dbg`).\n.. _sim-sim-err-trk-path:\n"
}
] |
C++
|
MIT License
|
aff3ct/aff3ct
|
Doc: change --sim-debug-xxx args to --sim-dbg-xxx
|
8,482 |
24.11.2018 14:34:22
| -10,800 |
694327747d60399663ac66a6c268937aa90a4819
|
Change type and explicit casting
|
[
{
"change_type": "MODIFY",
"old_path": "src/Tools/Code/SCMA/Codebook.hpp",
"new_path": "src/Tools/Code/SCMA/Codebook.hpp",
"diff": "@@ -25,7 +25,7 @@ public:\nint get_number_of_resources_per_user() const;\nint get_number_of_users_per_resource() const;\nint get_number_of_real_symbols () const;\n- double get_system_bps () const;\n+ float get_system_bps () const;\nint get_resource_to_user(int r, int idx) const;\nint get_user_to_resource(int u, int idx) const;\n@@ -37,7 +37,7 @@ private:\nint number_of_users_per_resource = 0;\nint codebook_size = 0;\nint number_of_real_symbols = 0;\n- double system_bps = 0; // overall system spectral eff., may be float (e.g., 3 bps per user, 6 users, 4 resources -> 4.5)\n+ float system_bps = 0; // overall system spectral eff., may be float (e.g., 3 bps per user, 6 users, 4 resources -> 4.5)\nstd::vector<std::vector<std::vector<std::complex<R>>>> data;\nstd::vector<std::vector<int>> resource_to_user;\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Tools/Code/SCMA/Codebook.hxx",
"new_path": "src/Tools/Code/SCMA/Codebook.hxx",
"diff": "@@ -165,7 +165,7 @@ void Codebook<R>\n}\n}\n- system_bps = log2((double)codebook_size) * number_of_users / number_of_resources;\n+ system_bps = log2((float)codebook_size) * (float)number_of_users / (float)number_of_resources;\n}\ntemplate <typename R>\n@@ -231,7 +231,7 @@ inline int Codebook<R>\n}\ntemplate <typename R>\n-inline double Codebook<R>\n+inline float Codebook<R>\n::get_system_bps() const\n{\nreturn system_bps;\n"
}
] |
C++
|
MIT License
|
aff3ct/aff3ct
|
Change type and explicit casting
|
8,483 |
27.11.2018 16:47:53
| -3,600 |
49fc9a84213de1b8e643b29861981b4b11bd0a48
|
Doc: Work on Turbo prod.
|
[
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/conf.py",
"new_path": "doc/sphinx/source/conf.py",
"diff": "@@ -228,63 +228,64 @@ rst_epilog = \"\"\"\n:width: 80px\n:height: 25px\n-.. |version| replace:: \"\"\" + version + \"\"\"\n-.. |release| replace:: \"\"\" + release + \"\"\"\n-.. |PyBER| replace:: PyBER\n-.. |MATLAB| replace:: MATLAB\n-.. |SIMD| replace:: :abbr:`SIMD (Single Instruction Multiple Data)`\n-.. |BER| replace:: :abbr:`BER (Bit Error Rate)`\n-.. |FER| replace:: :abbr:`FER (Frame Error Rate)`\n-.. |BFER| replace:: :abbr:`BER/FER (Bit and Frame Error Rate)`\n-.. |SNR| replace:: :abbr:`SNR (Signal Noise Ratio)`\n.. |AFF3CT| replace:: :abbr:`AFF3CT (A Fast Forward Error Correction Toolbox!)`\n-.. |GUI| replace:: :abbr:`GUI (Graphical User Interface)`\n+.. |AMS| replace:: :abbr:`AMS (Approximate Min-Star)`\n.. |API| replace:: :abbr:`API (Application Programming Interface)`\n-.. |SDR| replace:: :abbr:`SDR (Software-Defined Radio)`\n-.. |PDF| replace:: :abbr:`PDF (Probability Density Function)`\n-.. |ROP| replace:: :abbr:`ROP (Received Optical Power)`\n-.. |EP| replace:: :abbr:`EP (Event Probability)`\n-.. |AZCW| replace:: :abbr:`AZCW (All Zero Code Words)`\n+.. |ARP| replace:: :abbr:`ARP (Almost Regular Permutation)`\n+.. |ASCL| replace:: :abbr:`ASCL (Adaptive Successive Cancellation List)`\n.. |AWGN| replace:: :abbr:`AWGN (Additive White Gaussian Noise)`\n+.. |AZCW| replace:: :abbr:`AZCW (All Zero Code Words)`\n+.. |BCH| replace:: :abbr:`BCH (Bose, Ray-Chaudhuri and Hocquenghem)`\n+.. |BCJR| replace:: :abbr:`BCJR (Bahl, Cocke, Jelinek and Raviv algorithm or Maximum A Posteriori (MAP))`\n.. |BEC| replace:: :abbr:`BEC (Binary Erasure Channel)`\n-.. |BSC| replace:: :abbr:`BSC (Binary Symmetric Channel)`\n-.. |PSK| replace:: :abbr:`PSK (Phase-Shift Keying)`\n-.. |QAM| replace:: :abbr:`QAM (Quadrature Amplitude Modulation)`\n-.. |PAM| replace:: :abbr:`PAM (Pulse-Amplitude Modulation)`\n-.. |OOK| replace:: :abbr:`OOK (On-Off Keying)`\n-.. |CPM| replace:: :abbr:`CPM (Continuous Phase Modulation)`\n-.. |SCMA| replace:: :abbr:`SCMA (Sparse Code Multiple Access)`\n+.. |BER| replace:: :abbr:`BER (Bit Error Rate)`\n+.. |BFER| replace:: :abbr:`BER/FER (Bit and Frame Error Rate)`\n.. |BPSK| replace:: :abbr:`BPSK (Bit Phase-Shift Keying)`\n-.. |ML| replace:: :abbr:`ML (Maximum Likelihood)`\n.. |BP| replace:: :abbr:`BP (Belief Propagation)`\n-.. |SPA| replace:: :abbr:`SPA (Sum-Product Algorithm)`\n+.. |BSC| replace:: :abbr:`BSC (Binary Symmetric Channel)`\n+.. |CCSDS| replace:: :abbr:`CCSDS (Consultative Committee for Space Data Systems)`\n+.. |CPM| replace:: :abbr:`CPM (Continuous Phase Modulation)`\n+.. |CP| replace:: :abbr:`CP (Chase-Pyndiah)`\n+.. |DVB-RCS1| replace:: :abbr:`DVB-RCS1(Digital Video Broadcasting - Return Channel via Satellite 1)`\n+.. |DVB-RCS2| replace:: :abbr:`DVB-RCS2(Digital Video Broadcasting - Return Channel via Satellite 2)`\n+.. |DVB-S1| replace:: :abbr:`DVB-S1 (Digital Video Broadcasting - Satellite 1)`\n+.. |DVB-S2| replace:: :abbr:`DVB-S2 (Digital Video Broadcasting - Satellite 2)`\n+.. |EP| replace:: :abbr:`EP (Event Probability)`\n+.. |EXIT| replace:: :abbr:`EXIT (EXtrinsic Information Transfer chart)`\n+.. |FER| replace:: :abbr:`FER (Frame Error Rate)`\n+.. |GALA| replace:: :abbr:`GALA (Gallager A)`\n+.. |GSM| replace:: :abbr:`GSM (Global System for Mobile Communications)`\n+.. |GUI| replace:: :abbr:`GUI (Graphical User Interface)`\n+.. |LDPC| replace:: :abbr:`LDPC (Low-Density Parity-Check)`\n.. |LSPA| replace:: :abbr:`LSPA (Logarithm Sum-Product Algorithm)`\n+.. |LTE| replace:: :abbr:`LTE (Long Term Evolution)`\n+.. |MATLAB| replace:: MATLAB\n+.. |ML| replace:: :abbr:`ML (Maximum Likelihood)`\n.. |MS| replace:: :abbr:`MS (Min-Sum)`\n.. |NMS| replace:: :abbr:`NMS (Normalized Min-Sum)`\n.. |OMS| replace:: :abbr:`OMS (Offset Min-Sum)`\n.. |ONMS| replace:: :abbr:`ONMS (Offset Normalized Min-Sum)`\n-.. |AMS| replace:: :abbr:`AMS (Approximate Min-Star)`\n-.. |GALA| replace:: :abbr:`GALA (Gallager A)`\n-.. |ASCL| replace:: :abbr:`ASCL (Adaptive Successive Cancellation List)`\n-.. |SC| replace:: :abbr:`SC (Successive Cancellation)`\n-.. |SCL| replace:: :abbr:`SCL (Successive Cancellation List)`\n-.. |SCAN| replace:: :abbr:`SCAN (Soft CANcellation)`\n-.. |CP| replace:: :abbr:`CP (Chase-Pyndiah)`\n-.. |BCJR| replace:: :abbr:`BCJR (Bahl, Cocke, Jelinek and Raviv algorithm or Maximum A Posteriori (MAP))`\n-.. |EXIT| replace:: :abbr:`EXIT (EXtrinsic Information Transfer chart)`\n-.. |ARP| replace:: :abbr:`ARP (Almost Regular Permutation)`\n-.. |CCSDS| replace:: :abbr:`CCSDS (Consultative Committee for Space Data Systems)`\n-.. |LTE| replace:: :abbr:`LTE (Long Term Evolution)`\n-.. |GSM| replace:: :abbr:`GSM (Global System for Mobile Communications)`\n-.. |DVB-S1| replace:: :abbr:`DVB-S1 (Digital Video Broadcasting - Satellite 1)`\n-.. |DVB-S2| replace:: :abbr:`DVB-S2 (Digital Video Broadcasting - Satellite 2)`\n-.. |DVB-RCS1| replace:: :abbr:`DVB-RCS1(Digital Video Broadcasting - Return Channel via Satellite 1)`\n-.. |DVB-RCS2| replace:: :abbr:`DVB-RCS2(Digital Video Broadcasting - Return Channel via Satellite 2)`\n-.. |LDPC| replace:: :abbr:`LDPC (Low-Density Parity-Check)`\n-.. |BCH| replace:: :abbr:`BCH (Bose, Ray-Chaudhuri and Hocquenghem)`\n-.. |RS| replace:: :abbr:`RS (Reed-Solomon code)`\n-.. |RSC| replace:: :abbr:`RSC (Recursive Systematic Convolutional)`\n+.. |OOK| replace:: :abbr:`OOK (On-Off Keying)`\n+.. |PAM| replace:: :abbr:`PAM (Pulse-Amplitude Modulation)`\n+.. |PDF| replace:: :abbr:`PDF (Probability Density Function)`\n+.. |PSK| replace:: :abbr:`PSK (Phase-Shift Keying)`\n+.. |PyBER| replace:: PyBER\n+.. |QAM| replace:: :abbr:`QAM (Quadrature Amplitude Modulation)`\n.. |RA| replace:: :abbr:`RA (Repeat and Accumulate)`\n+.. |release| replace:: \"\"\" + release + \"\"\"\n+.. |ROP| replace:: :abbr:`ROP (Received Optical Power)`\n+.. |RSC| replace:: :abbr:`RSC (Recursive Systematic Convolutional)`\n+.. |RS| replace:: :abbr:`RS (Reed-Solomon code)`\n+.. |SCAN| replace:: :abbr:`SCAN (Soft CANcellation)`\n+.. |SCL| replace:: :abbr:`SCL (Successive Cancellation List)`\n+.. |SCMA| replace:: :abbr:`SCMA (Sparse Code Multiple Access)`\n+.. |SC| replace:: :abbr:`SC (Successive Cancellation)`\n+.. |SDR| replace:: :abbr:`SDR (Software-Defined Radio)`\n+.. |SIMD| replace:: :abbr:`SIMD (Single Instruction Multiple Data)`\n+.. |SNR| replace:: :abbr:`SNR (Signal Noise Ratio)`\n+.. |SPA| replace:: :abbr:`SPA (Sum-Product Algorithm)`\n+.. |TPC| replace:: :abbr:`TPC (Turbo Product Code)`\n+.. |version| replace:: \"\"\" + version + \"\"\"\n\"\"\"\n"
},
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/user/simulation/parameters/cdc/cdc_turbo_prod/cdc.rst",
"new_path": "doc/sphinx/source/user/simulation/parameters/cdc/cdc_turbo_prod/cdc.rst",
"diff": "Codec TURBO_PROD\n****************\n+The |TPC| is an alliance of two crossed BCH codes.\n+The same BCH code is used for columns and rows.\n+\n+\n.. toctree::\n:maxdepth: 2\n:caption: Contents\n"
},
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/user/simulation/parameters/cdc/cdc_turbo_prod/dec.rst",
"new_path": "doc/sphinx/source/user/simulation/parameters/cdc/cdc_turbo_prod/dec.rst",
"diff": "Decoder parameters\n------------------\n-.. _dec-turbo_prod-dec-sub-cw-size:\n+The |TPC| decoder first decodes columns once with the Chase-Pyndiah algorithm,\n+then rows, and columns again then rows again and so on.\n-``--dec-sub-cw-size, -N`` |image_required_argument|\n-\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n+Let's say :math:`C` is the :math:`N \\times N` *a priori* matrix from the\n+demodulator.\n- :Type: integer\n- :Examples: ``--dec-sub-cw-size 1``\n+Let's say :math:`R_{i+1}^c` is the :math:`N \\times N` *a posteriori* matrix\n+computed by this decoder after the :math:`i^{th}` iteration on the columns.\n+Initially, :math:`R_0^c = C`.\n-The codeword size.\n+Let's say :math:`R_{i+1}^r` is the :math:`N \\times N` *a posteriori* matrix\n+computed by this decoder after the :math:`i^{th}` iteration on the rows,\n+with :math:`R_i^r = R_{i+1}^c`.\n-.. _dec-turbo_prod-dec-sub-info-bits:\n-``--dec-sub-info-bits, -K`` |image_required_argument|\n-\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n+The process of the columns for the :math:`i^{th}` iteration gives:\n+\n+ :math:`R_{i+1}^c = alpha_{2i+0}.W_i^c + C`\n+\n+with :math:`W_i^c` the extrinsic from the Chase-Pyndiah decoder\n+computed on :math:`R_{i}^c`.\n+\n+The process of the rows for the :math:`i^{th}` iteration gives:\n+\n+ :math:`R_{i+1}^r = alpha_{2i+1}.W_i^r + C`\n+\n+with :math:`W_i^r` the extrinsic from the Chase-Pyndiah decoder\n+computed on :math:`R_{i}^r`.\n+\n+Parameter :math:`alpha` is set with the argument :ref:`dec-turbo_prod-dec-alpha`.\n+\n+\n+\n+.. _dec-turbo_prod-dec-type:\n+\n+``--dec-type, -D``\n+\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n+\n+ :Type: text\n+ :Allowed values: ``CHASE`` ``CP`` ``ML``\n+ :Default: ``CP``\n+ :Examples: ``--dec-type CP``\n+\n+Select the algorithm to decode each column and row of the |TPC|.\n+\n+Description of the allowed values:\n+\n++-----------+------------------------+\n+| Value | Description |\n++===========+========================+\n+| ``CP`` | |dec-type_descr_cp| |\n++-----------+------------------------+\n+| ``CHASE`` | |dec-type_descr_chase| |\n++-----------+------------------------+\n+| ``ML`` | |dec-type_descr_ml| |\n++-----------+------------------------+\n+\n+.. |dec-type_descr_cp| replace:: Decode with the Chase-Pyndiah algorithm of\n+ the |TPC|\n+.. |dec-type_descr_chase| replace:: Decode with the Chase algorithm\n+.. |dec-type_descr_ml| replace:: Decode with the |ML| algorithm\n+\n+\n+.. rubric:: The ``CP`` algorithm:\n+\n+* Chase step: find the more reliable codeword :math:`D`:\n+ * Take hard decision :math:`H` on input :math:`R`.\n+ * Select the :math:`p` (set with :ref:`dec-turbo_prod-dec-p`) least reliable\n+ positions from :math:`R` to get a metric set :math:`P` of :math:`p`\n+ elements.\n+ * Create :math:`t` (set with :ref:`dec-turbo_prod-dec-t`) test vectors\n+ from test patterns.\n+ * Hard decode with the sub-decoder to get the competitors with good syndrome\n+ set :math:`C`.\n+ * Remove competitors from :math:`C` to keep :math:`c` of them\n+ (set with :ref:`dec-turbo_prod-dec-c`).\n+ * Compute the metrics :math:`C_m` (euclidean distance) of each\n+ competitor compared to :math:`H`.\n+ * Select the competitors with the smallest metric\n+ to get the decided word :math:`D` with a\n+ metric :math:`D_m` and where :math:`D_j = \\begin{cases}\n+ +1 & \\text{when H_j = 0} \\\\\n+ -1 & \\text{when H_j = 1}\n+ \\end{cases}`\n+\n+* Pyndiah step: compute reliabilities of each bit of :math:`D`\n+ * :math:`a, b, c, d` and :math:`e` are simulation constants changeable by\n+ the user with :ref:`dec-turbo_prod-dec-cp-coef`\n+ * Compute the reliability :math:`F` of :math:`D` for each bit\n+ :math:`D_j` of the word:\n+ * Find :math:`C^s` the competitor with the smallest metric :math:`C_m`\n+ that have :math:`C_j^s \\neq D_j`.\n+ * when :math:`C^s` exists:\n+\n+ :math:`F_j = b . D_j . [C_m - D_m]`\n+ * when :math:`C^s` does not exist and if\n+ :ref:`dec-turbo_prod-dec-beta` is given:\n+\n+ :math:`F_j = D_j . beta`\n+ * else:\n+\n+ :math:`F_j = D_j . \\left[ \\displaystyle\\sum_{i=0}^{e}\n+ P_i - c . D_m + d . |R_j| \\right]`\n+ where :math:`P` is considered sorted, :math:`0 < e < p`,\n+ and when :math:`e == 0 \\implies e = p - 1`.\n+\n+ * Compute extrinsic :math:`W = F - a . R`\n+\n+\n+.. _dec-turbo_prod-dec-implem:\n+\n+``--dec-implem``\n+\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n+\n+ :Type: text\n+ :Allowed values: ``FAST`` ``NAIVE`` ``STD``\n+ :Examples: ``--dec-implem STD``\n+\n+Select the implementation of the algorithm to decode.\n+\n+Description of the allowed values:\n+\n++-----------+--------------------------+\n+| Value | Description |\n++===========+==========================+\n+| ``STD`` | |dec-implem_descr_std| |\n++-----------+--------------------------+\n+| ``NAIVE`` | |dec-implem_descr_naive| |\n++-----------+--------------------------+\n+\n+.. | ``FAST`` | |dec-implem_descr_fast| |\n+.. +-----------+--------------------------+\n+\n+.. |dec-implem_descr_std| replace:: A standard implementation\n+.. |dec-implem_descr_naive| replace:: A naive implementation only for the ``ML``\n+..\n+ .. |dec-implem_descr_fast| replace:: TODO VALUE FAST\n+\n+\n+.. _dec-turbo_prod-dec-ite:\n+\n+``--dec-ite, -i``\n+\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n:Type: integer\n- :Examples: ``--dec-sub-info-bits 1``\n+ :Examples: ``--dec-ite 1``\n-Useful number of bit transmitted (information bits).\n+Maximal number of iterations in the turbo.\n.. _dec-turbo_prod-dec-alpha:\n@@ -53,6 +182,26 @@ Reliability factor, one by half iteration (so twice more than number of iteratio\nNumber of competitors (0 means equal to number of test vectors, 1 means only the decided word).\n+.. _dec-turbo_prod-dec-p:\n+\n+``--dec-p``\n+\"\"\"\"\"\"\"\"\"\"\"\n+\n+ :Type: integer\n+ :Examples: ``--dec-p 1``\n+\n+Number of least reliable positions.\n+\n+.. _dec-turbo_prod-dec-t:\n+\n+``--dec-t``\n+\"\"\"\"\"\"\"\"\"\"\"\n+\n+ :Type: integer\n+ :Examples: ``--dec-t 1``\n+\n+Number of test vectors (0 means equal to 2^p).\n+\n.. _dec-turbo_prod-dec-cp-coef:\n``--dec-cp-coef``\n@@ -81,54 +230,6 @@ Set the maximum number of flips in the CHASE decoder.\nEnable the computation of the Hamming distance instead of the Euclidean distance in the ML/CHASE decoders.\n-.. _dec-turbo_prod-dec-implem:\n-\n-``--dec-implem``\n-\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n-\n- :Type: text\n- :Allowed values: ``FAST`` ``NAIVE`` ``STD``\n- :Examples: ``--dec-implem FAST``\n-\n-Select the implementation of the algorithm to decode.\n-\n-Description of the allowed values:\n-\n-+-----------+--------------------------+\n-| Value | Description |\n-+===========+==========================+\n-| ``FAST`` | |dec-implem_descr_fast| |\n-+-----------+--------------------------+\n-| ``NAIVE`` | |dec-implem_descr_naive| |\n-+-----------+--------------------------+\n-| ``STD`` | |dec-implem_descr_std| |\n-+-----------+--------------------------+\n-\n-.. |dec-implem_descr_fast| replace:: TODO VALUE FAST\n-.. |dec-implem_descr_naive| replace:: TODO VALUE NAIVE\n-.. |dec-implem_descr_std| replace:: TODO VALUE STD\n-\n-\n-.. _dec-turbo_prod-dec-ite:\n-\n-``--dec-ite, -i``\n-\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n-\n- :Type: integer\n- :Examples: ``--dec-ite 1``\n-\n-Maximal number of iterations in the turbo.\n-\n-.. _dec-turbo_prod-dec-p:\n-\n-``--dec-p``\n-\"\"\"\"\"\"\"\"\"\"\"\n-\n- :Type: integer\n- :Examples: ``--dec-p 1``\n-\n-Number of least reliable positions.\n-\n.. _dec-turbo_prod-dec-sub-corr-pow:\n``--dec-sub-corr-pow, -T``\n@@ -216,41 +317,24 @@ Description of the allowed values:\n.. |dec-sub-type_descr_ml| replace:: TODO VALUE ML\n-.. _dec-turbo_prod-dec-t:\n-\n-``--dec-t``\n-\"\"\"\"\"\"\"\"\"\"\"\n-\n- :Type: integer\n- :Examples: ``--dec-t 1``\n-\n-Number of test vectors (0 means equal to 2^p).\n-\n-.. _dec-turbo_prod-dec-type:\n+.. TODO : remove those arguments in the code\n-``--dec-type, -D``\n-\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n+ .. _dec-turbo_prod-dec-sub-cw-size:\n- :Type: text\n- :Allowed values: ``CHASE`` ``CP`` ``ML``\n- :Examples: ``--dec-type CHASE``\n+ ``--dec-sub-cw-size, -N`` |image_required_argument|\n+ \"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n-Select the algorithm you want to decode the codeword.\n+ :Type: integer\n+ :Examples: ``--dec-sub-cw-size 1``\n-Description of the allowed values:\n+ The codeword size.\n-+-----------+------------------------+\n-| Value | Description |\n-+===========+========================+\n-| ``CHASE`` | |dec-type_descr_chase| |\n-+-----------+------------------------+\n-| ``CP`` | |dec-type_descr_cp| |\n-+-----------+------------------------+\n-| ``ML`` | |dec-type_descr_ml| |\n-+-----------+------------------------+\n+ .. _dec-turbo_prod-dec-sub-info-bits:\n-.. |dec-type_descr_chase| replace:: TODO VALUE CHASE\n-.. |dec-type_descr_cp| replace:: TODO VALUE CP\n-.. |dec-type_descr_ml| replace:: TODO VALUE ML\n+ ``--dec-sub-info-bits, -K`` |image_required_argument|\n+ \"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n+ :Type: integer\n+ :Examples: ``--dec-sub-info-bits 1``\n+ Useful number of bit transmitted (information bits).\n"
},
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/user/simulation/parameters/cdc/cdc_turbo_prod/enc.rst",
"new_path": "doc/sphinx/source/user/simulation/parameters/cdc/cdc_turbo_prod/enc.rst",
"diff": "Encoder parameters\n------------------\n+.. _enc-turbo_prod-enc-type:\n+\n+``--enc-type``\n+\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n+\n+ :Type: text\n+ :Allowed values: ``AZCW`` ``COSET`` ``NO`` ``TURBO_PROD`` ``USER``\n+ :Default: ``TURBO_PROD``\n+ :Examples: ``--enc-type TURBO_PROD``\n+\n+Set the type of the encoder to use in the simulation.\n+\n+Description of the allowed values:\n+\n++----------------+-----------------------------+\n+| Value | Description |\n++================+=============================+\n+| ``TURBO_PROD`` | |enc-type_descr_turbo_prod| |\n++----------------+-----------------------------+\n+| ``AZCW`` | |enc-type_descr_azcw| |\n++----------------+-----------------------------+\n+| ``COSET`` | |enc-type_descr_coset| |\n++----------------+-----------------------------+\n+| ``NO`` | |enc-type_descr_no| |\n++----------------+-----------------------------+\n+| ``USER`` | |enc-type_descr_user| |\n++----------------+-----------------------------+\n+\n+.. |enc-type_descr_turbo_prod| replace:: The |TPC| encoder\n+.. |enc-type_descr_azcw| replace:: The |AZCW| encoder\n+.. |enc-type_descr_coset| replace:: The *coset* encoder\n+.. |enc-type_descr_no| replace:: No encoder is used\n+.. |enc-type_descr_user| replace:: User defined codewords\n+\n+\n.. _enc-turbo_prod-enc-sub-cw-size:\n``--enc-sub-cw-size, -N`` |image_required_argument|\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n:Type: integer\n- :Examples: ``--enc-sub-cw-size 1``\n+ :Examples: ``--enc-sub-cw-size 127``\n-The codeword size.\n+Give the *sub-encoder code* codeword size. You can extend this codeword with a\n+parity bit with the :ref:`_enc-turbo_prod-enc-ext` option.\n+Then the codeword size of the |TPC| is the square of this value.\n.. _enc-turbo_prod-enc-sub-info-bits:\n@@ -19,17 +56,19 @@ The codeword size.\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n:Type: integer\n- :Examples: ``--enc-sub-info-bits 1``\n+ :Examples: ``--enc-sub-info-bits 120``\n-Useful number of bit transmitted (information bits).\n+Give the *sub-encoder code* input size (number of information bits).\n+Then the number of information bits of the |TPC| is the\n+square of this value.\n.. _enc-turbo_prod-enc-ext:\n``--enc-ext``\n\"\"\"\"\"\"\"\"\"\"\"\"\"\n-\n-Extends code with a parity bits.\n+Extend the *sub-encoder* codeword with a parity bit in order to increase the\n+distance of the code.\n.. _enc-turbo_prod-enc-path:\n@@ -40,7 +79,8 @@ Extends code with a parity bits.\n:Rights: read only\n:Examples: ``--enc-path example/path/to/the/right/file``\n-Path to a file containing one or a set of pre-computed codewords, to use with \"\\\\-\\\\-enc-type USER\".\n+Set the path to a file containing one or a set of pre-computed codewords\n+for the ``USER`` type.\n.. _enc-turbo_prod-enc-start-idx:\n@@ -50,38 +90,8 @@ Path to a file containing one or a set of pre-computed codewords, to use with \"\\\n:Type: integer\n:Examples: ``--enc-start-idx 1``\n-Start idx to use in the USER type encoder.\n-\n-.. _enc-turbo_prod-enc-sub-path:\n-\n-``--enc-sub-path``\n-\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n-\n- :Type: file\n- :Rights: read only\n- :Examples: ``--enc-sub-path example/path/to/the/right/file``\n-\n-Path to a file containing one or a set of pre-computed codewords, to use with \"\\\\-\\\\-enc-type USER\".\n-\n-.. _enc-turbo_prod-enc-sub-seed:\n-\n-``--enc-sub-seed, -S``\n-\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n-\n- :Type: integer\n- :Examples: ``--enc-sub-seed 1``\n-\n-Seed used to initialize the pseudo random generators.\n-\n-.. _enc-turbo_prod-enc-sub-start-idx:\n-\n-``--enc-sub-start-idx``\n-\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n-\n- :Type: integer\n- :Examples: ``--enc-sub-start-idx 1``\n-\n-Start idx to use in the USER type encoder.\n+Set the first frame index to use when reading the file in the ``USER`` type\n+encoder.\n.. _enc-turbo_prod-enc-sub-type:\n@@ -90,19 +100,20 @@ Start idx to use in the USER type encoder.\n:Type: text\n:Allowed values: ``AZCW`` ``BCH`` ``COSET`` ``NO`` ``USER``\n- :Examples: ``--enc-sub-type AZCW``\n+ :Default: ``BCH``\n+ :Examples: ``--enc-sub-type BCH``\n-Type of the encoder to use in the simulation.\n+Give the type of the sub-encoder to use to code each line .\nDescription of the allowed values:\n+-----------+----------------------------+\n| Value | Description |\n+===========+============================+\n-| ``AZCW`` | |enc-sub-type_descr_azcw| |\n-+-----------+----------------------------+\n| ``BCH`` | |enc-sub-type_descr_bch| |\n+-----------+----------------------------+\n+| ``AZCW`` | |enc-sub-type_descr_azcw| |\n++-----------+----------------------------+\n| ``COSET`` | |enc-sub-type_descr_coset| |\n+-----------+----------------------------+\n| ``NO`` | |enc-sub-type_descr_no| |\n@@ -110,44 +121,42 @@ Description of the allowed values:\n| ``USER`` | |enc-sub-type_descr_user| |\n+-----------+----------------------------+\n-.. |enc-sub-type_descr_azcw| replace:: TODO VALUE AZCW\n-.. |enc-sub-type_descr_bch| replace:: TODO VALUE BCH\n-.. |enc-sub-type_descr_coset| replace:: TODO VALUE COSET\n-.. |enc-sub-type_descr_no| replace:: TODO VALUE NO\n-.. |enc-sub-type_descr_user| replace:: TODO VALUE USER\n+.. |enc-sub-type_descr_bch| replace:: The |BCH| code\n+.. |enc-sub-type_descr_azcw| replace:: The |AZCW| encoder\n+.. |enc-sub-type_descr_coset| replace:: The *coset* encoder\n+.. |enc-sub-type_descr_no| replace:: No encoder is used\n+.. |enc-sub-type_descr_user| replace:: User defined codewords\n-.. _enc-turbo_prod-enc-type:\n+.. _enc-turbo_prod-enc-sub-path:\n-``--enc-type``\n-\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n+``--enc-sub-path``\n+\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n- :Type: text\n- :Allowed values: ``AZCW`` ``COSET`` ``NO`` ``TURBO_PROD`` ``USER``\n- :Examples: ``--enc-type AZCW``\n+ :Type: file\n+ :Rights: read only\n+ :Examples: ``--enc-sub-path example/path/to/the/right/file``\n-Type of the encoder to use in the simulation.\n+Set the path to a file containing one or a set of pre-computed codewords\n+for the ``USER`` type sub-encoder.\n-Description of the allowed values:\n+.. _enc-turbo_prod-enc-sub-seed:\n-+----------------+-----------------------------+\n-| Value | Description |\n-+================+=============================+\n-| ``AZCW`` | |enc-type_descr_azcw| |\n-+----------------+-----------------------------+\n-| ``COSET`` | |enc-type_descr_coset| |\n-+----------------+-----------------------------+\n-| ``NO`` | |enc-type_descr_no| |\n-+----------------+-----------------------------+\n-| ``TURBO_PROD`` | |enc-type_descr_turbo_prod| |\n-+----------------+-----------------------------+\n-| ``USER`` | |enc-type_descr_user| |\n-+----------------+-----------------------------+\n+``--enc-sub-seed, -S``\n+\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n+\n+ :Type: integer\n+ :Examples: ``--enc-sub-seed 1``\n+\n+Seed used to initialize the pseudo random generators in the sub-encoder.\n-.. |enc-type_descr_azcw| replace:: TODO VALUE AZCW\n-.. |enc-type_descr_coset| replace:: TODO VALUE COSET\n-.. |enc-type_descr_no| replace:: TODO VALUE NO\n-.. |enc-type_descr_turbo_prod| replace:: TODO VALUE TURBO_PROD\n-.. |enc-type_descr_user| replace:: TODO VALUE USER\n+.. _enc-turbo_prod-enc-sub-start-idx:\n+\n+``--enc-sub-start-idx``\n+\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n+ :Type: integer\n+ :Examples: ``--enc-sub-start-idx 1``\n+Set the first frame index to use when reading the file in the ``USER`` type\n+sub-encoder.\n"
}
] |
C++
|
MIT License
|
aff3ct/aff3ct
|
Doc: Work on Turbo prod.
|
8,490 |
27.11.2018 17:20:15
| -3,600 |
f1bd704361c43632a5844d2187471b174d6a12db
|
Doc: rework the modem parameters.
|
[
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/conf.py",
"new_path": "doc/sphinx/source/conf.py",
"diff": "@@ -299,6 +299,11 @@ rst_epilog = \"\"\"\n.. |LUT| replace:: :abbr:`LUT (Look Up Table)`\n.. |LUTs| replace:: :abbr:`LUTs (Look Up Tables)`\n.. |MT 19937| replace:: :abbr:`MT 19937(Mersenne Twister 19937)`\n+.. |modem| replace:: :abbr:`modem (modulator/demodulator)`\n+.. |modems| replace:: :abbr:`modems (modulators/demodulators)`\n+.. |codec| replace:: :abbr:`codec (coder/decoder)`\n+.. |codecs| replace:: :abbr:`codecs (coders/decodes)`\n+.. |BPS| replace:: :abbr:`BPS (Bit Per Symbol)`\n\"\"\"\n"
},
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/user/simulation/overview/overview.rst",
"new_path": "doc/sphinx/source/user/simulation/overview/overview.rst",
"diff": "@@ -113,6 +113,8 @@ columns:\nresults you can launch |AFF3CT| in **mono-threaded mode** (see the\n:ref:`sim-sim-threads` section).\n+.. _user_simulation_overview_philosophy:\n+\nPhilosophy\n\"\"\"\"\"\"\"\"\"\"\n"
},
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/user/simulation/parameters/mdm/mdm.rst",
"new_path": "doc/sphinx/source/user/simulation/parameters/mdm/mdm.rst",
"diff": "Modem parameters\n----------------\n-The Modem is a module with three parts in one:\n- * the **modulation** matches the input binary frame into symbols to send the\n- data through the channel\n- * the **filtering** gives event probabilities to the received waveforms\n- * the **demodulation** matches symbols or waveforms to bits and computes for\n- each a :abbr:`LLR (Log-Likelihood Ratio)`\n-\n-.. note:: The filtering step is used only by the ``CPM`` Modem as it is the only\n- |AFF3CT|'s modulation using waveforms.\n-\n-..\n- .. note:: A negative LLR represents a bit at 1, and therefore when positive a\n- bit at 0. It is a more convenient choice as the hard decision matches\n- directly with the sign bit.\n-\n+|AFF3CT| comes with a set of predefined |modems|. A |modem| transforms a\n+sequence of bits into a suitable form for the transmission on a physical medium.\n+In the |AFF3CT| \"philosophy\", the |modem| is a **module** containing three\n+**tasks**: *modulate*, *filter* and *demodulate* (read the\n+:ref:`user_simulation_overview_philosophy` section for more information about\n+modules and tasks).\n.. _mdm-mdm-type:\n@@ -30,53 +21,70 @@ The Modem is a module with three parts in one:\n:Default: ``BPSK``\n:Examples: ``--mdm-type SCMA``\n-Type of the modulation to use in the simulation.\n+Select the modulation type.\nDescription of the allowed values:\n-+----------+-----------------------+\n-| Value | Description |\n-+==========+=======================+\n-| ``BPSK`` | |mdm-type_descr_bpsk| |\n-+----------+-----------------------+\n-| ``CPM`` | |mdm-type_descr_cpm| |\n-+----------+-----------------------+\n-| ``OOK`` | |mdm-type_descr_ook| |\n-+----------+-----------------------+\n-| ``PAM`` | |mdm-type_descr_pam| |\n-+----------+-----------------------+\n-| ``PSK`` | |mdm-type_descr_psk| |\n-+----------+-----------------------+\n-| ``QAM`` | |mdm-type_descr_qam| |\n-+----------+-----------------------+\n-| ``SCMA`` | |mdm-type_descr_scma| |\n-+----------+-----------------------+\n-| ``USER`` | |mdm-type_descr_user| |\n-+----------+-----------------------+\n-\n.. _Continuous Phase Modulation: https://en.wikipedia.org/wiki/Continuous_phase_modulation\n.. _On-Off Keying: https://en.wikipedia.org/wiki/On-off_keying\n.. _Pulse-Amplitude Modulation: https://en.wikipedia.org/wiki/Pulse-Amplitude_Modulation\n.. _Phase-Shift Keying: https://en.wikipedia.org/wiki/Phase-shift_keying\n.. _Quadrature-Amplitude Modulation: https://en.wikipedia.org/wiki/Quadrature_amplitude_modulation\n-.. _SubCarrier Multiple Access: https://en.wikipedia.org/wiki/Subcarrier_multiplexing\n-\n-.. |mdm-type_descr_bpsk| replace:: The simple 2-PSK that has an optimized\n- implementation\n-.. |mdm-type_descr_cpm| replace:: The `Continuous Phase Modulation`_\n-.. |mdm-type_descr_ook| replace:: The `On-Off Keying`_\n-.. |mdm-type_descr_pam| replace:: The `Pulse-Amplitude Modulation`_\n-.. |mdm-type_descr_psk| replace:: The `Phase-Shift Keying`_\n-.. |mdm-type_descr_qam| replace:: The Rectangular `Quadrature-Amplitude Modulation`_\n-.. |mdm-type_descr_scma| replace:: The `SubCarrier Multiple Access`_\n-.. |mdm-type_descr_user| replace:: A user defined constellation given in a file\n- through :ref:`mdm-mdm-const-path`\n++----------+-------------------------------------------------------------------+\n+| Value | Description |\n++==========+===================================================================+\n+| ``BPSK`` | Select a |BPSK| modulation. |\n++----------+-------------------------------------------------------------------+\n+| ``CPM`` | Select a `Continuous Phase Modulation`_ (|CPM|) |\n+| | :cite:`Aulin1981a,Aulin1981b`. |\n++----------+-------------------------------------------------------------------+\n+| ``OOK`` | Select an `On-Off Keying`_ (|OOK|) modulation. |\n++----------+-------------------------------------------------------------------+\n+| ``PAM`` | Select a `Pulse-Amplitude Modulation`_ (|PAM|). |\n++----------+-------------------------------------------------------------------+\n+| ``PSK`` | Select a `Phase-Shift Keying`_ (|PSK|) modulation. |\n++----------+-------------------------------------------------------------------+\n+| ``QAM`` | Select a rectangular `Quadrature-Amplitude Modulation`_ (|QAM|). |\n++----------+-------------------------------------------------------------------+\n+| ``SCMA`` | Select a Sparse Code Multiple Access (|SCMA|) modulation |\n+| | :cite:`Nikopour2013`. |\n++----------+-------------------------------------------------------------------+\n+| ``USER`` | Select a user defined constellation (to use with the |\n+| | :ref:`mdm-mdm-const-path` parameter). |\n++----------+-------------------------------------------------------------------+\n.. TODO: describe completely the implemented models, such as the constellation\nmapping (ex: PSK has always GRAY mapping) or what is done if sig2 is disabled.\nDescribe the different demodulator of OOK when AWGN, optical, BSC, BEC\n+.. _mdm-mdm-implem:\n+\n+``--mdm-implem``\n+\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n+\n+ :Type: text\n+ :Allowed values: ``FAST`` ``STD``\n+ :Default: ``STD``\n+ :Examples: ``--mdm-implem FAST``\n+\n+Select the implementation of the |modem|.\n+\n+Description of the allowed values:\n+\n++----------+-------------------------+\n+| Value | Description |\n++==========+=========================+\n+| ``STD`` | |mdm-implem_descr_std| |\n++----------+-------------------------+\n+| ``FAST`` | |mdm-implem_descr_fast| |\n++----------+-------------------------+\n+\n+.. |mdm-implem_descr_std| replace:: Select a standard implementation working\n+ for any |modem|.\n+.. |mdm-implem_descr_fast| replace:: Select a fast implementation, only\n+ available for the |BPSK| |modem| at this time.\n+\n.. _mdm-mdm-bps:\n``--mdm-bps``\n@@ -86,11 +94,11 @@ Description of the allowed values:\n:Default: 1\n:Examples: ``--mdm-bps 1``\n-Set the number of bits used to generate a\n-symbol. You can't change this value for ``BPSK`` and ``OOK`` types as it is\n-forced to 1. Likewise, it is forced to 3 with ``SCMA``.\n+Set the number of bits used to generate a symbol (|BPS|). This parameter has no\n+effect on the |BPSK| and |OOK| |modems| where the |BPS| is forced to 1. This is\n+the same for the |SCMA| |modem| where the |BPS| is forced to 3.\n-.. note:: For ``QAM`` type, only even values of bits per symbol are supported.\n+.. note:: For the |QAM| |modem|, only even |BPS| values are supported.\n.. _mdm-mdm-const-path:\n@@ -102,7 +110,49 @@ forced to 1. Likewise, it is forced to 3 with ``SCMA``.\n:Examples: ``--mdm-const-path ../conf/mod/16QAM_ANTI_GRAY.mod``\nGive the path to the ordered modulation symbols (constellation), to use with\n-``USER`` type modulation\".\n+``USER`` |modem|.\n+\n+An |ASCII| file is expected, for instance here is the definition of a 16-|QAM|\n+with an anti-Gray mapping (the lines starting with a ``#`` are ignored):\n+\n+.. code-block:: console\n+\n+ # 0000\n+ 3 3\n+ # 0001\n+ -3 -3\n+ # 0010\n+ -1 3\n+ # 0011\n+ 1 -3\n+ # 0100\n+ -3 1\n+ # 0101\n+ 3 -1\n+ # 0110\n+ 1 1\n+ # 0111\n+ -1 -1\n+ # 1000\n+ 1 -1\n+ # 1001\n+ -1 1\n+ # 1010\n+ -3 -1\n+ # 1011\n+ 3 1\n+ # 1100\n+ -1 -3\n+ # 1101\n+ 1 3\n+ # 1110\n+ 3 -3\n+ # 1111\n+ -3 3\n+\n+.. warning:: The :ref:`mdm-mdm-bps` parameter has to be set accordingly to the\n+ given constellation. In the previous example, ``--mdm-bps 4`` has be added\n+ to the command line.\n.. _mdm-mdm-ups:\n@@ -113,33 +163,7 @@ Give the path to the ordered modulation symbols (constellation), to use with\n:Default: 1\n:Examples: ``--mdm-ups 1``\n-Select the symbol sampling factor.\n-\n-.. _mdm-mdm-implem:\n-\n-``--mdm-implem``\n-\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n-\n- :Type: text\n- :Allowed values: ``FAST`` ``STD``\n- :Examples: ``--mdm-implem FAST``\n-\n-Select the implementation of the modem.\n-\n-Description of the allowed values:\n-\n-+----------+-------------------------+\n-| Value | Description |\n-+==========+=========================+\n-| ``STD`` | |mdm-implem_descr_std| |\n-+----------+-------------------------+\n-| ``FAST`` | |mdm-implem_descr_fast| |\n-+----------+-------------------------+\n-\n-.. |mdm-implem_descr_std| replace:: A standard implementation working for any\n- modem type.\n-.. |mdm-implem_descr_fast| replace:: A much faster method but *only\n- for* ``BPSK`` *type*.\n+Select the symbol upsampling factor (only relevant for the |CPM| |modem|).\n.. _mdm-mdm-max:\n@@ -147,45 +171,52 @@ Description of the allowed values:\n\"\"\"\"\"\"\"\"\"\"\"\"\"\n:Type: text\n- :Allowed values: ``MAX`` ``MAXL`` ``MAXS`` ``MAXSS``\n+ :Allowed values: ``MAXS`` ``MAXSS`` ``MAXL`` ``MAX``\n:Examples: ``--mdm-max MAX``\n-Select the mathematical form of the maximum operation applied in the ``PAM``'s,\n-``QAM``'s, ``PSK``'s, ``USER``'s and ``CPM``'s demodulator.\n+Select the approximation of the :math:`\\max^*` operator used in the |PAM|,\n+|QAM|, |PSK|, |CPM| and user demodulators.\nDescription of the allowed values:\n+-----------+-----------------------+\n| Value | Description |\n+===========+=======================+\n-| ``MAX`` | |mdm-max_descr_max| |\n-+-----------+-----------------------+\n-| ``MAXL`` | |mdm-max_descr_maxl| |\n-+-----------+-----------------------+\n| ``MAXS`` | |mdm-max_descr_maxs| |\n+-----------+-----------------------+\n| ``MAXSS`` | |mdm-max_descr_maxss| |\n+-----------+-----------------------+\n+| ``MAXL`` | |mdm-max_descr_maxl| |\n++-----------+-----------------------+\n+| ``MAX`` | |mdm-max_descr_max| |\n++-----------+-----------------------+\n-.. |mdm-max_descr_max| replace:: Standard MAX: :math:`\\max(a,b)`\n-.. |mdm-max_descr_maxl| replace:: Linear MAX: :math:`\\max(a,b) +\n- \\max(0, 0.301 - (0.5 |a - b|))`\n-.. |mdm-max_descr_maxs| replace:: Star MAX: :math:`\\max(a,b) +\n- \\log(1 + \\exp(-|a - b|))`\n-.. |mdm-max_descr_maxss| replace:: Safe Star MAX: :math:`\\max(a,b) + d` with\n- :math:`d = \\begin{cases}\n+.. |mdm-max_descr_maxs| replace:: :math:`\\max^*(a,b) = \\max(a,b) +\n+ \\log(1 + \\exp(-|a - b|))`.\n+.. |mdm-max_descr_maxss| replace:: :math:`\\max^*(a,b) \\approx \\max(a,b) + d`\n+ with :math:`d = \\begin{cases}\n0 & \\quad \\text{if } d >= 37\\\\\n\\exp(-|a - b|) & \\quad \\text{if } 9 <= d < 37 \\\\\n\\log(1 + \\exp(-|a - b|)) & \\quad \\text{else}\n- \\end{cases}`\n+ \\end{cases}`.\n+.. |mdm-max_descr_maxl| replace:: :math:`\\max^*(a,b) \\approx \\max(a,b) +\n+ \\max(0, 0.301 - (0.5 |a - b|))`.\n+.. |mdm-max_descr_max| replace:: :math:`\\max^*(a,b) \\approx \\max(a,b)`.\n+\n+``MAXS`` for *Max Star* is the exact :math:`\\max^*` operator. ``MAXSS`` for\n+*Max Star Safe* allows to avoid numeric instabilities due the exponential\n+operation and the limited precision of the floating-point representation.\n+``MAXL`` for *Max Linear* is a linear approximation of the :math:`\\max^*`\n+function. ``MAX`` for *Max* is the simplest :math:`\\max^*` approximation with\n+only a :math:`\\max` function.\n.. _mdm-mdm-no-sig2:\n``--mdm-no-sig2``\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n-Turn off the division by sigma square in the demodulator. Sigma is the Gaussian\n-noise variance.\n+Turn off the division by :math:`\\sigma^2` in the demodulator where\n+:math:`\\sigma` is the Gaussian noise variance.\n.. _mdm-mdm-cpm-k:\n@@ -196,7 +227,7 @@ noise variance.\n:Default: 1\n:Examples: ``--mdm-cpm-k 1``\n-Set the ``CPM``'s *modulation index numerator*.\n+Set the |CPM| *index numerator*.\n.. _mdm-mdm-cpm-p:\n@@ -207,7 +238,7 @@ Set the ``CPM``'s *modulation index numerator*.\n:Default: 2\n:Examples: ``--mdm-cpm-p 1``\n-Set the ``CPM``'s *modulation index denominator*.\n+Set the |CPM| *index denominator*.\n.. _mdm-mdm-cpm-L:\n@@ -218,7 +249,7 @@ Set the ``CPM``'s *modulation index denominator*.\n:Default: 2\n:Examples: ``--mdm-cpm-L 1``\n-Set the ``CPM``'s *pulse width* (also called *memory depth*).\n+Set the |CPM| *pulse width* (also called *memory depth*).\n.. _mdm-mdm-cpm-map:\n@@ -230,7 +261,7 @@ Set the ``CPM``'s *pulse width* (also called *memory depth*).\n:Default: ``NATURAL``\n:Examples: ``--mdm-cpm-map GRAY``\n-Select the ``CPM``'s *symbols mapping layout*.\n+Select the |CPM| *symbols mapping layout*.\nDescription of the allowed values:\n@@ -247,7 +278,6 @@ Description of the allowed values:\n.. |mdm-cpm-map_descr_natural| replace:: The natural binary code incrementing\nthe value from a symbol to the next one.\n-\n.. _mdm-mdm-cpm-ws:\n``--mdm-cpm-ws``\n@@ -258,7 +288,7 @@ Description of the allowed values:\n:Default: ``GMSK``\n:Examples: ``--mdm-cpm-ws GMSK``\n-Select the ``CPM``'s wave shape.\n+Select the |CPM| *wave shape*.\nDescription of the allowed values:\n@@ -274,10 +304,9 @@ Description of the allowed values:\n.. _Gaussian Minimum Shift Keying: https://en.wikipedia.org/wiki/Minimum-shift_keying#Gaussian_minimum-shift_keying\n-.. |mdm-cpm-ws_descr_gmsk| replace:: `Gaussian Minimum Shift Keying`_\n-.. |mdm-cpm-ws_descr_rcos| replace:: Raised COSinus\n-.. |mdm-cpm-ws_descr_rec| replace:: RECtangular\n-\n+.. |mdm-cpm-ws_descr_gmsk| replace:: `Gaussian Minimum Shift Keying`_.\n+.. |mdm-cpm-ws_descr_rcos| replace:: Raised COSinus.\n+.. |mdm-cpm-ws_descr_rec| replace:: RECtangular.\n.. _mdm-mdm-cpm-std:\n@@ -288,22 +317,24 @@ Description of the allowed values:\n:Allowed values: ``GSM``\n:Examples: ``--mdm-cpm-std GSM``\n-The selection of a default ``CPM`` standard implemented in hard in the code (any\n-of these parameters can be overwritten by the other given arguments).\n+Set the |CPM| parameters according to a standard.\nDescription of the allowed values:\n-+---------+------------------------------------+\n-| Value | Description |\n-+=========+====================================+\n-| ``GSM`` | | Modulation index numerator = 1 |\n-| | | Modulation index denominator = 2 |\n-| | | Memory depth = 3 |\n-| | | Bit per symbol = 1 |\n-| | | Sampling factor = 5 |\n-| | | Mapping layout = ``NATURAL`` |\n-| | | Wave shape = ``GMSK`` |\n-+---------+------------------------------------+\n++---------+--------------------------+---------------+---------------------------------+\n+| Value | Parameter | Value | Description |\n++=========+==========================+===============+=================================+\n+| ``GSM`` | | :ref:`mdm-mdm-bps` | | 1 | | Bit per symbol. |\n+| | | :ref:`mdm-mdm-ups` | | 5 | | Upsampling factor. |\n+| | | :ref:`mdm-mdm-cpm-k` | | 1 | | Modulation index numerator. |\n+| | | :ref:`mdm-mdm-cpm-p` | | 2 | | Modulation index denominator. |\n+| | | :ref:`mdm-mdm-cpm-L` | | 3 | | Memory depth. |\n+| | | :ref:`mdm-mdm-cpm-map` | | ``NATURAL`` | | Mapping layout. |\n+| | | :ref:`mdm-mdm-cpm-ws` | | ``GMSK`` | | Wave shape. |\n++---------+--------------------------+---------------+---------------------------------+\n+\n+.. note:: When this parameter is used, if you set any of the other |modem|\n+ parameters, it will override the configuration from the standard.\n.. _mdm-mdm-ite:\n@@ -314,7 +345,7 @@ Description of the allowed values:\n:Default: 1\n:Examples: ``--mdm-ite 5``\n-Set the number of iteration in the ``SCMA``'s demodulator.\n+Set the number of iterations in the |SCMA| demodulator.\n.. _mdm-mdm-psi:\n@@ -325,7 +356,7 @@ Set the number of iteration in the ``SCMA``'s demodulator.\n:Allowed values: ``PSI0`` ``PSI1`` ``PSI2`` ``PSI3``\n:Examples: ``--mdm-psi PSI0``\n-Select the type of the psi function to use in the ``SCMA``'s demodulator.\n+Select the :math:`\\psi` function used in the |SCMA| demodulator.\nDescription of the allowed values:\n@@ -341,15 +372,24 @@ Description of the allowed values:\n| ``PSI3`` | |mdm-psi_descr_psi3| |\n+----------+----------------------+\n-.. |mdm-psi_descr_psi0| replace:: :math:`\\exp\\left(-\\frac{|d|}{n0}\\right)`\n-.. |mdm-psi_descr_psi1| replace:: :math:`\\frac{1}{|d| + n0}`\n-.. |mdm-psi_descr_psi2| replace:: :math:`\\frac{1}{8. |d|^2 + n0}`\n-.. |mdm-psi_descr_psi3| replace:: :math:`\\frac{1}{4. |d|^2 + n0}`\n+.. |mdm-psi_descr_psi0| replace:: :math:`\\psi_0 = \\exp\\left(-\\frac{|d|}{n_0}\\right)`\n+.. |mdm-psi_descr_psi1| replace:: :math:`\\psi_1 \\approx \\psi_0 \\approx \\frac{1}{|d| + n_0}`\n+.. |mdm-psi_descr_psi2| replace:: :math:`\\psi_2 \\approx \\psi_0 \\approx \\frac{1}{8. |d|^2 + n_0}`\n+.. |mdm-psi_descr_psi3| replace:: :math:`\\psi_3 \\approx \\psi_0 \\approx \\frac{1}{4. |d|^2 + n_0}`\nWhere |n0_equation|\n-.. |n0_equation| replace:: :math:`n0 =\n+.. |n0_equation| replace:: :math:`n_0 =\n\\begin{cases}\n- 1 & \\quad \\text{if sig2 disabled}\\\\\n+ 1 & \\quad \\text{if } \\sigma^2 \\text{ is disabled}\\\\\n4 \\sigma^2 & \\quad \\text{else}\n- \\end{cases}`\n\\ No newline at end of file\n+ \\end{cases}`.\n+\n+See the :ref:`mdm-mdm-no-sig2` parameter to disable the division by\n+:math:`\\sigma^2`.\n+\n+\n+References\n+\"\"\"\"\"\"\"\"\"\"\n+\n+.. bibliography:: references.bib\n\\ No newline at end of file\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "doc/sphinx/source/user/simulation/parameters/mdm/references.bib",
"diff": "+@Article{Aulin1981a,\n+author = {T. Aulin and C. Sundberg},\n+journal = {IEEE Transactions on Communications (TCOM)},\n+title = {Continuous Phase Modulation - Part I: Full Response Signaling},\n+year = {1981},\n+volume = {29},\n+number = {3},\n+pages = {196-209},\n+abstract = {The continuous phase modulation (CPM) signaling scheme has gained interest in recent years because of its attractive spectral properties. Data symbol pulse shaping has previously been studied with regard to spectra, for binary data and modulation index 0.5. In this paper these results have been extended to the<tex>M</tex>-ary case, where the pulse shaping is over a one symbol interval, the so-called full response systems. Results are given for modulation indexes of practical interest, concerning both performance and spectrum. Comparisons are made with minimum shift keying (MSK) and systems have been found which are significantly better in<tex>E_{b}/N_{0}</tex>for a large signal-to-noise ratio (SNR) without expanded bandwidth. Schemes with the same bit error probability as MSK but with considerably smaller bandwidth have also been found. Significant improvement in both power and bandwidth are obtained by increasing the number of levels<tex>M</tex>from 2 to 4.},\n+keywords = {MSK modulation/demodulation;PM modulation/demodulation;Phase modulation;Signal to noise ratio;Bandwidth;Error probability;Phase shift keying;Frequency;Detectors;Continuous phase modulation;Pulse shaping methods;Additive noise},\n+doi = {10.1109/TCOM.1981.1095001},\n+ISSN = {0090-6778},\n+month = {March},}\n+\n+@Article{Aulin1981b,\n+author = {T. Aulin and N. Rydbeck and C. -. Sundberg},\n+journal = {IEEE Transactions on Communications (TCOM)},\n+title = {Continuous Phase Modulation - Part II: Partial Response Signaling},\n+year = {1981},\n+volume = {29},\n+number = {3},\n+pages = {210-225},\n+abstract = {An analysis of constant envelope digital partial response continuous Phase modulation (CPM) systems is reported. Coherent detection is assumed and the channel is Gaussian. The receiver observes the received signal over more than one symbol interval to make use of the correlative properties of the transmitted signal. The Systems are<tex>M</tex>-ary, and baseband pulse shaping over several symbol intervals is considered. An optimum receiver based on the Viterbi algorithm is presented. Constant envelope digital modulation schemes with excellent spectral tail properties are given. The spectra have extremely low sidelobes. It is concluded that partial response CPM systems have spectrum compaction properties. Furthermore, at equal or even smaller bandwidth than minimum shift keying (MSK), a considerable gain in transmitter power can be obtained. This gain increases with<tex>M</tex>. Receiver and transmitter configurations are presented.},\n+keywords = {MSK modulation/demodulation;PM modulation/demodulation;Partial-response coding;Phase modulation;Partial response signaling;Transmitters;Continuous phase modulation;Baseband;Pulse shaping methods;Viterbi algorithm;Digital modulation;Tail;Compaction},\n+doi = {10.1109/TCOM.1981.1094985},\n+ISSN = {0090-6778},\n+month = {March},}\n+\n+@InProceedings{Nikopour2013,\n+author = {H. Nikopour and H. Baligh},\n+booktitle = {International Symposium on Personal, Indoor, and Mobile Radio Communications (PIMRC)},\n+title = {{Sparse} {Code} {Multiple} {Access}},\n+year = {2013},\n+volume = {},\n+number = {},\n+pages = {332-336},\n+keywords = {code division multiple access;frequency division multiple access;OFDM modulation;quadrature amplitude modulation;sparse code multiple access;multicarrier CDMA;multiplexing approach;modulated QAM symbol mapping;multiple OFDMA;general complex spreading sequence;multiple tones;low density signature;LDS;low density spreading sequence;near optimal ML receiver;multiple access scheme;low complexity reception technique;multidimensional codeword;SCMA codebook set;multidimensional constellation;shaping gain;SCMA codebook design;systematic suboptimal approach;Decision support systems;Land mobile radio;SCMA;OFDMA;LDS;CDMA;MPA;factor graph;codebook;multidimensional constellation;shaping gain},\n+doi = {10.1109/PIMRC.2013.6666156},\n+ISSN = {2166-9570},\n+month = {Sept},}\n\\ No newline at end of file\n"
}
] |
C++
|
MIT License
|
aff3ct/aff3ct
|
Doc: rework the modem parameters.
|
8,490 |
28.11.2018 15:16:55
| -3,600 |
2f87a054f8b578be1e9daf10247123ebe610b863
|
Doc: rework the channel parameters.
|
[
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/conf.py",
"new_path": "doc/sphinx/source/conf.py",
"diff": "@@ -234,6 +234,7 @@ rst_epilog = \"\"\"\n.. |ARP| replace:: :abbr:`ARP (Almost Regular Permutation)`\n.. |ASCII| replace:: :abbr:`ASCII (American Standard Code for Information Interchange)`\n.. |ASCL| replace:: :abbr:`ASCL (Adaptive Successive Cancellation List)`\n+.. |AVX| replace:: :abbr:`AVX (Advanced Vector Extensions)`\n.. |AWGN| replace:: :abbr:`AWGN (Additive White Gaussian Noise)`\n.. |AZCW| replace:: :abbr:`AZCW (All Zero Code Word)`\n.. |AZCWs| replace:: :abbr:`AZCWs (All Zero Code Words)`\n@@ -247,10 +248,13 @@ rst_epilog = \"\"\"\n.. |BPS| replace:: :abbr:`BPS (Bit Per Symbol)`\n.. |BSC| replace:: :abbr:`BSC (Binary Symmetric Channel)`\n.. |CCSDS| replace:: :abbr:`CCSDS (Consultative Committee for Space Data Systems)`\n+.. |CDF| replace:: :abbr:`CDF (Cumulative Distribution Function)`\n.. |codec| replace:: :abbr:`codec (coder/decoder)`\n.. |codecs| replace:: :abbr:`codecs (coders/decodes)`\n-.. |CPM| replace:: :abbr:`CPM (Continuous Phase Modulation)`\n.. |CP| replace:: :abbr:`CP (Chase-Pyndiah)`\n+.. |CPM| replace:: :abbr:`CPM (Continuous Phase Modulation)`\n+.. |CPU| replace:: :abbr:`CPU (Central Process Unit)`\n+.. |CPUs| replace:: :abbr:`CPUs (Central Process Units)`\n.. |CRC| replace:: :abbr:`CRC (Cyclic Redundancy Check)`\n.. |CRCs| replace:: :abbr:`CRCs (Cyclic Redundancy Checks)`\n.. |DVB-RCS1| replace:: :abbr:`DVB-RCS1(Digital Video Broadcasting - Return Channel via Satellite 1)`\n@@ -261,9 +265,16 @@ rst_epilog = \"\"\"\n.. |EXIT| replace:: :abbr:`EXIT (EXtrinsic Information Transfer chart)`\n.. |FER| replace:: :abbr:`FER (Frame Error Rate)`\n.. |GALA| replace:: :abbr:`GALA (Gallager A)`\n+.. |GPP| replace:: :abbr:`GPP (General Purpose Processor)`\n+.. |GPPs| replace:: :abbr:`GPPs (General Purpose Processors)`\n+.. |GPU| replace:: :abbr:`GPU (Graphics Processing Unit)`\n+.. |GPUs| replace:: :abbr:`GPUs (Graphics Processing Units)`\n+.. |GSL| replace:: :abbr:`GSL (GNU Scientific Library)`\n.. |GSM| replace:: :abbr:`GSM (Global System for Mobile Communications)`\n.. |GUI| replace:: :abbr:`GUI (Graphical User Interface)`\n.. |IFL| replace:: :abbr:`IFL (Inter Frame Level)`\n+.. |ISA| replace:: :abbr:`ISA (Instruction Set Architecture)`\n+.. |ISAs| replace:: :abbr:`ISAs (Instruction Set Architectures)`\n.. |LDPC| replace:: :abbr:`LDPC (Low-Density Parity-Check)`\n.. |LLRs| replace:: :abbr:`LLRs (Log Likelihood Ratios)`\n.. |LLR| replace:: :abbr:`LLR (Log Likelihood Ratio)`\n@@ -272,12 +283,14 @@ rst_epilog = \"\"\"\n.. |LUT| replace:: :abbr:`LUT (Look Up Table)`\n.. |LUTs| replace:: :abbr:`LUTs (Look Up Tables)`\n.. |MATLAB| replace:: MATLAB\n+.. |MKL| replace:: :abbr:`MKL (Intel Math Kernel Library)`\n.. |ML| replace:: :abbr:`ML (Maximum Likelihood)`\n.. |modem| replace:: :abbr:`modem (modulator/demodulator)`\n.. |modems| replace:: :abbr:`modems (modulators/demodulators)`\n.. |MPI| replace:: :abbr:`MPI (Message Passing Interface)`\n.. |MS| replace:: :abbr:`MS (Min-Sum)`\n.. |MT 19937| replace:: :abbr:`MT 19937(Mersenne Twister 19937)`\n+.. |NEON| replace:: :abbr:`NEON (ARM SIMD instructions)`\n.. |NMS| replace:: :abbr:`NMS (Normalized Min-Sum)`\n.. |OMS| replace:: :abbr:`OMS (Offset Min-Sum)`\n.. |ONMS| replace:: :abbr:`ONMS (Offset Normalized Min-Sum)`\n@@ -303,6 +316,7 @@ rst_epilog = \"\"\"\n.. |SNRs| replace:: :abbr:`SNRs (Signal Noise Ratios)`\n.. |SNR| replace:: :abbr:`SNR (Signal Noise Ratio)`\n.. |SPA| replace:: :abbr:`SPA (Sum-Product Algorithm)`\n+.. |SSE| replace:: :abbr:`SSE (Streaming SIMD Extensions)`\n.. |TPC| replace:: :abbr:`TPC (Turbo Product Code)`\n.. |version| replace:: \"\"\" + version + \"\"\"\n"
},
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/user/simulation/parameters/cdc/cdc_turbo_prod/dec.rst",
"new_path": "doc/sphinx/source/user/simulation/parameters/cdc/cdc_turbo_prod/dec.rst",
"diff": "@@ -93,6 +93,7 @@ Description of the allowed values:\nthe user with :ref:`dec-turbo_prod-dec-cp-coef`\n* Compute the reliability :math:`F` of :math:`D` for each bit\n:math:`D_j` of the word:\n+\n* Find :math:`C^s` the competitor with the smallest metric :math:`C_m`\nthat have :math:`C_j^s \\neq D_j`.\n* when :math:`C^s` exists:\n"
},
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/user/simulation/parameters/chn/chn.rst",
"new_path": "doc/sphinx/source/user/simulation/parameters/chn/chn.rst",
"diff": "Channel parameters\n------------------\n-The channel is the representation of the physical space in which data are\n-transmitted. This operation corrupts the information, hence the origin of the\n-error-correcting codes.\n+The channel represents the physical support such as optical fiber, space, water,\n+air, etc. It is during the passage in the channel that the frames are\n+altered/noised and errors can occur. The channel coding theory has been invented\n+to correct errors induced by the channel (or at least reduce the number of\n+errors to an acceptable rate).\n.. TODO : Add_user on all channels ? For complex numbers, real / imag part independent ?\n@@ -15,34 +17,33 @@ error-correcting codes.\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n:Type: text\n- :Allowed values: ``AWGN`` ``BEC`` ``BSC`` ``NO`` ``OPTICAL`` ``RAYLEIGH``\n- ``RAYLEIGH_USER`` ``USER`` ``USER_ADD`` ``USER_BEC``\n- ``USER_BSC``\n+ :Allowed values: ``NO`` ``BEC`` ``BSC`` ``AWGN`` ``RAYLEIGH``\n+ ``RAYLEIGH_USER`` ``OPTICAL`` ``USER`` ``USER_ADD``\n+ ``USER_BEC`` ``USER_BSC``\n:Default: ``AWGN``\n:Examples: ``--chn-type AWGN``\n-Set the type of the channel to use in the simulation ('USER' has an output got\n-from a file when 'USER_ADD' has an additive noise got from a file).\n+Select the channel type.\nDescription of the allowed values:\n+-------------------+--------------------------------+\n| Value | Description |\n+===================+================================+\n-| ``AWGN`` | |chn-type_descr_awgn| |\n+| ``NO`` | |chn-type_descr_no| |\n+-------------------+--------------------------------+\n| ``BEC`` | |chn-type_descr_bec| |\n+-------------------+--------------------------------+\n| ``BSC`` | |chn-type_descr_bsc| |\n+-------------------+--------------------------------+\n-| ``NO`` | |chn-type_descr_no| |\n-+-------------------+--------------------------------+\n-| ``OPTICAL`` | |chn-type_descr_optical| |\n+| ``AWGN`` | |chn-type_descr_awgn| |\n+-------------------+--------------------------------+\n| ``RAYLEIGH`` | |chn-type_descr_rayleigh| |\n+-------------------+--------------------------------+\n| ``RAYLEIGH_USER`` | |chn-type_descr_rayleigh_user| |\n+-------------------+--------------------------------+\n+| ``OPTICAL`` | |chn-type_descr_optical| |\n++-------------------+--------------------------------+\n| ``USER`` | |chn-type_descr_user| |\n+-------------------+--------------------------------+\n| ``USER_ADD`` | |chn-type_descr_user_add| |\n@@ -55,91 +56,92 @@ Description of the allowed values:\n.. _Additive White Gaussian Noise: https://en.wikipedia.org/wiki/Additive_white_Gaussian_noise\n.. _Binary Erasure Channel: https://en.wikipedia.org/wiki/Binary_erasure_channel\n.. _Binary Symmetric Channel: https://en.wikipedia.org/wiki/Binary_symmetric_channel\n-.. _Rayleigh Fading: https://en.wikipedia.org/wiki/Rayleigh_fading\n+.. _Rayleigh fading: https://en.wikipedia.org/wiki/Rayleigh_fading\n+.. |chn-type_descr_no| replace:: Disable the channel noise: :math:`Y = X`.\n-.. |chn-type_descr_awgn| replace:: The `Additive White Gaussian Noise`_\n- channel: :math:`Y = X + Z \\text{ with } Z \\sim \\mathcal{N}(0,\\sigma^2)`.\n-\n-.. |chn-type_descr_bec| replace:: The `Binary Erasure Channel`_\n+.. |chn-type_descr_bec| replace:: Select the `Binary Erasure Channel`_ (|BEC|):\n:math:`Y_i = \\begin{cases}\n- erased & \\quad \\text{if } e = 1 \\\\\n- X_i & \\quad \\text{else}\n- \\end{cases} \\text{with } P(e = 1) = p_e \\text{ and } P(e = 0) = 1 - p_e`.\n+ erased & \\text{if } e = 1 \\\\\n+ X_i & \\text{else}\n+ \\end{cases}, \\text{with } P(e = 1) = p_e \\text{ and } P(e = 0) = 1 - p_e`.\n-.. |chn-type_descr_bsc| replace:: The `Binary Symmetric Channel`_\n+.. |chn-type_descr_bsc| replace:: Select the `Binary Symmetric Channel`_\n+ (|BSC|):\n:math:`Y_i = \\begin{cases}\n- !X_i & \\quad \\text{if } e = 1 \\\\\n- X_i & \\quad \\text{else}\n- \\end{cases} \\text{with } P(e = 1) = p_e \\text{ and } P(e = 0) = 1 - p_e`.\n-\n-.. |chn-type_descr_no| replace:: The **perfect** channel:\n- :math:`Y = X`.\n+ !X_i & \\text{if } e = 1 \\\\\n+ X_i & \\text{else}\n+ \\end{cases}, \\text{with } P(e = 1) = p_e \\text{ and } P(e = 0) = 1 - p_e`.\n-.. |chn-type_descr_optical| replace:: The **optical** channel:\n- :math:`Y_i = \\begin{cases}\n- CDF_0(x) & \\quad \\text{ when } X_i = 0 \\\\\n- CDF_1(x) & \\quad \\text{ when } X_i = 1\n- \\end{cases} \\text{ with } x \\sim \\mathcal{U}(0,1)`\n- and the :math:`CDF_0` and :math:`CDF_1` are given by the user and selected\n- in function of the current :math:`ROP`.\n+.. |chn-type_descr_awgn| replace:: Select the `Additive White Gaussian Noise`_\n+ (|AWGN|) channel:\n+ :math:`Y = X + Z \\text{ with } Z \\sim \\mathcal{N}(0,\\sigma^2)`.\n-.. |chn-type_descr_rayleigh| replace:: The `Rayleigh Fading`_ channel with\n- an AWGN gain: :math:`Y = X.H + Z \\text{ with }\n+.. |chn-type_descr_rayleigh| replace:: Select the `Rayleigh fading`_ channel\n+ with an |AWGN| gain: :math:`Y = X.H + Z \\text{ with }\nZ \\sim \\mathcal{N}(0,\\sigma) \\text{ and }\nH \\sim \\mathcal{N}(0,\\frac{1}{\\sqrt 2})`.\n-.. |chn-type_descr_rayleigh_user| replace:: The `Rayleigh Fading`_ channel with\n- the gain given in a file: :math:`Y = X.H + Z\n+.. |chn-type_descr_rayleigh_user| replace:: Select the `Rayleigh fading`_\n+ channel with the gain given in a file: :math:`Y = X.H + Z\n\\text{ with } Z \\sim \\mathcal{N}(0,\\sigma) \\text{ and }\n- H \\text{ given by the user}`.\n+ H \\text{ given by the user}` (to use with the :ref:`chn-chn-path` parameter).\n+\n+.. |chn-type_descr_optical| replace:: Select the optical channel:\n+ :math:`Y_i = \\begin{cases}\n+ CDF_0(x) & \\text{ when } X_i = 0 \\\\\n+ CDF_1(x) & \\text{ when } X_i = 1\n+ \\end{cases}, \\text{ with } x \\sim \\mathcal{U}(0,1)`,\n+ and the :math:`CDF_0` and :math:`CDF_1` are given by the user and selected\n+ in function of the current |ROP| (to use with the :ref:`sim-sim-pdf-path`\n+ parameter).\n-.. |chn-type_descr_user| replace:: A **user defined output** channel\n- from a file: :math:`Y = Z \\text{ with } Z \\text{ given by user}`.\n+.. |chn-type_descr_user| replace:: Select the noised frame from a file:\n+ :math:`Y = Z \\text{ with } Z \\text{ given by the user}` (to use with the\n+ :ref:`chn-chn-path` parameter).\n-.. |chn-type_descr_user_add| replace:: An **additive** channel with a user\n- defined noise given in a file: :math:`Y = X +\n- Z \\text{ with } Z \\text{ given by the user}`.\n+.. |chn-type_descr_user_add| replace:: Select the noise to add to the frame\n+ from a given file: :math:`Y = X +\n+ Z \\text{ with } Z \\text{ given by the user}` (to use with the\n+ :ref:`chn-chn-path` parameter).\n-.. |chn-type_descr_user_bec| replace:: The `Binary Erasure Channel`_ with a\n- user defined event draw given in a file:\n+.. |chn-type_descr_user_bec| replace:: Select the event draw of the |BEC| from a\n+ file:\n:math:`Y_i = \\begin{cases}\n- erased & \\quad \\text{if } e = 1 \\\\\n- X_i & \\quad \\text{else}\n- \\end{cases} \\text{ with } e \\text{ given by the user}`.\n+ erased & \\text{if } e = 1 \\\\\n+ X_i & \\text{else}\n+ \\end{cases}, \\text{ with } e \\text{ given by the user}` (to use with the\n+ :ref:`chn-chn-path` parameter).\n-.. |chn-type_descr_user_bsc| replace:: The `Binary Symmetric Channel`_ with\n- a user defined event draw given in a file:\n+.. |chn-type_descr_user_bsc| replace:: Select the event draw of the |BSC| from a\n+ file:\n:math:`Y_i = \\begin{cases}\n- !X_i & \\quad \\text{if } e = 1 \\\\\n- X_i & \\quad \\text{else}\n- \\end{cases} \\text{ with } e \\text{ given by the user}`.\n+ !X_i & \\text{if } e = 1 \\\\\n+ X_i & \\text{else}\n+ \\end{cases}, \\text{ with } e \\text{ given by the user}` (to use with the\n+ :ref:`chn-chn-path` parameter).\nWhere:\n* :math:`\\sigma` is the *Gaussian noise variance*, :math:`p_e` is the\n- *event probability* and :math:`ROP` is the *Received optical power* of the\n+ *event probability* and |ROP| is the *Received optical power* of the\nsimulated noise points.\nThey are given by the user through the :ref:`sim-sim-noise-range` argument.\n- * :math:`X` is the original modulated signal and :math:`Y` the noisy output.\n+ * :math:`X` is the original modulated frame and :math:`Y` the noisy output.\n* :math:`\\mathcal{N}(\\mu,\\sigma^2)` is the\n- `Gaussian distribution <https://en.wikipedia.org/wiki/Normal_distribution>`_\n+ `Normal or Gaussian distribution <https://en.wikipedia.org/wiki/Normal_distribution>`_.\n* :math:`\\mathcal{U}(a,b)` is the\n- `Uniform distribution <https://en.wikipedia.org/wiki/Uniform_distribution_(continuous)>`_\n+ `Uniform distribution <https://en.wikipedia.org/wiki/Uniform_distribution_(continuous)>`_.\n+For the ``OPTICAL`` channel, the |CDF| are computed from the given |PDF| with\n+the :ref:`sim-sim-pdf-path` argument. This file describes the latter for the\n+different |ROP|. There must be a |PDF| for a bit transmitted at 0 and another\n+for a bit transmitted at 1.\n+.. note:: The ``NO``, ``AWGN`` and ``RAYLEIGH`` channels handle complex\n+ modulations.\n-The :abbr:`CDF (Cumulative Distribution Function)` are computed for the\n-``OPTICAL`` channel from the given :abbr:`PDF (Probability Density Function)`\n-with the :ref:`sim-sim-pdf-path` argument. This file describes the latter for the\n-different :abbr:`ROP (Received Optical Power)`. There must be a PDF for a bit\n-transmitted at 0 and another for a bit transmitted at 1.\n-\n-.. note:: The ``AWGN``, ``NO`` and ``RAYLEIGH`` channels handle\n- complex modulations.\n-\n-.. note:: The ``BEC``, ``BSC`` and ``OPTICAL`` channels work only with ``OOK``\n- modulation.\n-\n+.. warning:: The ``BEC``, ``BSC`` and ``OPTICAL`` channels work only with the\n+ ``OOK`` modulation (see the :ref:`mdm-mdm-type` parameter).\n.. _chn-chn-implem:\n@@ -147,7 +149,7 @@ transmitted at 0 and another for a bit transmitted at 1.\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n:Type: text\n- :Allowed values: ``FAST`` ``STD`` ``GSL`` ``MKL``\n+ :Allowed values: ``STD`` ``FAST`` ``GSL`` ``MKL``\n:Default: ``STD``\n:Examples: ``--chn-implem FAST``\n@@ -170,72 +172,74 @@ Description of the allowed values:\n.. _GNU Scientific Library: https://www.gnu.org/software/gsl/\n.. _Intel Math Kernel Library: https://software.intel.com/en-us/mkl\n-.. |chn-implem_descr_std| replace:: A standard implementation using the C++\n- standard objects and algorithms.\n-\n-.. |chn-implem_descr_fast| replace:: A much faster optimized method.\n+.. |chn-implem_descr_std| replace:: Select the standard implementation based on\n+ the C++ standard library.\n-.. |chn-implem_descr_gsl| replace:: A method using the\n- `GNU Scientific Library`_.\n+.. |chn-implem_descr_fast| replace:: Select the fast implementation (handwritten\n+ and optimized for |SIMD| architectures).\n-.. |chn-implem_descr_mkl| replace:: A method using the\n- `Intel Math Kernel Library`_ optimized on Intel processors.\n+.. |chn-implem_descr_gsl| replace:: Select an implementation based of the |GSL|.\n-.. attention:: All channels work with any implementation. However, to enable\n- the ``GSL`` or the ``MKL`` implementation you need to\n- compile with the good options (see :ref:`compilation_cmake_options`).\n+.. |chn-implem_descr_mkl| replace:: Select an implementation based of the |MKL|\n+ (only available for x86 architectures).\n+.. note:: All the proposed implementations are based on the |MT 19937| |PRNG|\n+ algorithm.\n-Numbers on :numref:`comp_implem_awgn`, :numref:`comp_implem_bec` and\n-:numref:`comp_implem_optical` show the throughput of the channels on\n-the different implementations in function of the frame size. The conditions of\n-the experiment were an ``UNCODED`` simulation on 8 threads during 10 seconds per\n-measurement on an *Intel(R) Xeon(R) CPU E3-1270 v5 @ 3.60GHz*.\n-To measure throughput |AFF3CT| uses an internal tool that can be activated with\n-the :ref:`sim-sim-stats` option flag. Numbers on those tables were read on the\n-*Average* column of the *add_noise* task of the *Channel* module.\n+.. attention:: To enable the |GSL| or the |MKL| implementations you need to\n+ have those libraries installed on your system and to turn on specific\n+ :ref:`compilation_cmake_options`.\n+The :numref:`tab_chn_implem_awgn`, :numref:`tab_chn_implem_bec` and\n+:numref:`tab_chn_implem_optical` present the throughputs of the different\n+channel implementations depending on the frame size. The testbed for the\n+experiments is an *Intel(R) Xeon(R) CPU E3-1270 v5 @ 3.60GHz* 8 threads |CPU|.\n-.. _comp_implem_awgn:\n+.. _tab_chn_implem_awgn:\n-.. csv-table:: Comparison of the throughput in :math:`[Mb/s]` of the methods\n- for the ``AWGN`` channel in function of the frame size.\n+.. csv-table:: Comparison of the |AWGN| channel implementations (throughputs are\n+ in Mb/s).\n:delim: ;\n+ :align: center\n:file: implem_comparison_AWGN.csv\n-The :numref:`comp_implem_awgn` shows that the standard normal distribution\n-generator with a Mersenne Twister 19937 is quite fast next to a Ziggurat\n-algorithm from the GSL. However, the ``FAST`` Box-Muller method implementation\n-with also a Mersenne Twister is much faster than the ``MKL``'s Box-Muller on\n-short frames but the last takes some distance on longer ones.\n+.. The :numref:`tab_chn_implem_awgn` shows that the standard normal distribution\n+.. generator with a Mersenne Twister 19937 is quite fast next to a Ziggurat\n+.. algorithm from the GSL. However, the ``FAST`` Box-Muller method implementation\n+.. with also a Mersenne Twister is much faster than the ``MKL``'s Box-Muller on\n+.. short frames but the last takes some distance on longer ones.\n+.. _tab_chn_implem_bec:\n-.. _comp_implem_bec:\n-\n-.. csv-table:: Comparison of the throughput in :math:`[Mb/s]` of the methods\n- for the ``BEC` and ``BSC`` channel in function of the frame size.\n+.. csv-table:: Comparison of the |BEC|/|BSC| channel implementations\n+ (throughputs are in Mb/s).\n:delim: ;\n+ :align: center\n:file: implem_comparison_BEC.csv\n-You can see on :numref:`comp_implem_bec` that the ``MKL``'s Bernoulli solution\n-is up to four times faster than the ``FAST`` implementation using a\n-Mersenne Twister. The ``GSL``'s Bernoulli implementation is here\n-twice faster than a ``STD``'s Bernoulli algorithm solution associated with a\n-Mersenne Twister.\n-\n+.. You can see on :numref:`tab_chn_implem_bec` that the ``MKL``'s Bernoulli solution\n+.. is up to four times faster than the ``FAST`` implementation using a\n+.. Mersenne Twister. The ``GSL``'s Bernoulli implementation is here\n+.. twice faster than a ``STD``'s Bernoulli algorithm solution associated with a\n+.. Mersenne Twister.\n-.. _comp_implem_optical:\n+.. _tab_chn_implem_optical:\n-.. csv-table:: Comparison of the throughput in :math:`[Mb/s]` of the methods\n- for the ``OPTICAL`` channel in function of the frame size.\n+.. csv-table:: Comparison of the optical channel implementations (throughputs\n+ are in Mb/s).\n:delim: ;\n+ :align: center\n:file: implem_comparison_OPTICAL.csv\n-You can see on :numref:`comp_implem_optical` that although using same\n-implementation as for the ``BEC`` to generate an uniform draw, the\n-throughputs are identical for all. This is due to an unoptimized interpolation\n-function using standard algorithm applied on each symbol to compute the output\n-according to the given CDFs.\n+.. You can see on :numref:`tab_chn_implem_optical` that although using same\n+.. implementation as for the ``BEC`` to generate an uniform draw, the\n+.. throughputs are identical for all. This is due to an unoptimized interpolation\n+.. function using standard algorithm applied on each symbol to compute the output\n+.. according to the given CDFs.\n+\n+.. note:: The reported values are the *average* throughputs given by the\n+ simulator integrated statistics tool (see the :ref:`sim-sim-stats`\n+ parameter).\n.. _chn-chn-gain-occur:\n@@ -246,8 +250,8 @@ according to the given CDFs.\n:Default: 1\n:Examples: ``--chn-gain-occur 10``\n-Give the number of times a gain is used on consecutive symbols. It is used in the\n-``RAYLEIGH_USER`` channel while applying gains read from the given file.\n+Give the number of times a gain is used on consecutive symbols. It is used in\n+the ``RAYLEIGH_USER`` channel while applying gains read from the given file.\n.. _chn-chn-path:\n@@ -258,11 +262,32 @@ Give the number of times a gain is used on consecutive symbols. It is used in th\n:Rights: read\n:Examples: ``--chn-path example/path/to/the/right/file``\n-Give the path to a file differently in function of the channel type.\n-For ``USER`` type, the file must contain noisy output values.\n-For ``USER_ADD`` type, the file must contain noise values to add to input.\n-For ``RAYLEIGH_USER`` type, the file must contain gain values.\n-See :ref:`chn-chn-type` for more details.\n+Give the path to a file containing the noise. The expected type of noise vary\n+depending of the channel type (see the :ref:`chn-chn-type` parameter for more\n+details):\n+\n+ * ``USER``: the file must contain frame with the noise applied on it,\n+ * ``USER_ADD``: the file must contain only the noise :math:`Z`,\n+ * ``RAYLEIGH_USER``: the file must contain the gain values :math:`H`.\n+\n+The expected file format is either |ASCII| or binary (the format is\n+automatically detected). Here is the file structure expected in |ASCII|:\n+\n+.. code-block:: console\n+\n+ F\n+\n+ N\n+\n+ Y_0 Y_1 Y_2 Y_3 Y_4 [...] Y_{F*N-1}\n+\n+:math:`F` has to be replaced by the number of contained frames and :math:`N` by\n+the frame size. After :math:`F` and :math:`N`, a sequence of :math:`F \\times N`\n+floating-point values is expected.\n+\n+In binary mode, :math:`F` and :math:`N` have to be 32-bit unsigned integers.\n+The next :math:`F \\times N` floating-point values can be either in 32-bit or in\n+64-bit.\n.. TODO Block fading is unused !!!\n.. _chn-chn-blk-fad:\n"
},
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/user/simulation/parameters/mdm/mdm.rst",
"new_path": "doc/sphinx/source/user/simulation/parameters/mdm/mdm.rst",
"diff": "@@ -195,9 +195,9 @@ Description of the allowed values:\n\\log(1 + \\exp(-|a - b|))`.\n.. |mdm-max_descr_maxss| replace:: :math:`\\max^*(a,b) \\approx \\max(a,b) + d`\nwith :math:`d = \\begin{cases}\n- 0 & \\quad \\text{if } d >= 37\\\\\n- \\exp(-|a - b|) & \\quad \\text{if } 9 <= d < 37 \\\\\n- \\log(1 + \\exp(-|a - b|)) & \\quad \\text{else}\n+ 0 & \\text{if } d >= 37\\\\\n+ \\exp(-|a - b|) & \\text{if } 9 <= d < 37 \\\\\n+ \\log(1 + \\exp(-|a - b|)) & \\text{else}\n\\end{cases}`.\n.. |mdm-max_descr_maxl| replace:: :math:`\\max^*(a,b) \\approx \\max(a,b) +\n\\max(0, 0.301 - (0.5 |a - b|))`.\n@@ -381,8 +381,8 @@ Where |n0_equation|\n.. |n0_equation| replace:: :math:`n_0 =\n\\begin{cases}\n- 1 & \\quad \\text{if } \\sigma^2 \\text{ is disabled}\\\\\n- 4 \\sigma^2 & \\quad \\text{else}\n+ 1 & \\text{if } \\sigma^2 \\text{ is disabled}\\\\\n+ 4 \\sigma^2 & \\text{else}\n\\end{cases}`.\nSee the :ref:`mdm-mdm-no-sig2` parameter to disable the division by\n"
},
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/user/simulation/parameters/src/src.rst",
"new_path": "doc/sphinx/source/user/simulation/parameters/src/src.rst",
"diff": "@@ -127,15 +127,7 @@ An |ASCII| file is expected:\nK\n- 1 0 1 0 1 1 1 0 0 1 1 0 1 0 1 1 0 1 1 1 0 1 0 1 1 1 1 1 1 1 0 0 0 1 1 0 0 1 0\n- 0 1 1 1 1 0 0 0 1 0 1 0 0 0 1 1 1 1 0 1 0 1 0 1 1 0 0 0 0 1 0 1 0 1 1 0 0 0 0\n- 1 0 1 0 0 1 0 1 1 0 1 0 1 1 0 0 1 1 0 1 0 0 1 0 0 1 0 1 0 1 1 1 1 0 0 1 1 1 1\n- 1 0 0 0 1 1 1 0 1 0 0 1 1 0 1 1 1 1 1 1 0 1 0 1 1 0 1 1 1 1 0 1 0 0 1 1 1 1 1\n- 0 1 0 0 0 0 1 0 0 1 0 0 0 0 1 0 1 1 0 1 0 0 0 0 1 0 1 0 1 0 1 0 1 0 1 0 0 0 1\n- 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 0 1 0 0 1 1 0 0 0 1 1 0 0 0 0 1 1 1 1 0 0 1 1 0\n- 0 1 0 1 0 0 1 1 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 1 0 1 0 0 0 1 0 0 0 0 0 0\n- 1 1 1 1 0 0 0 1 1 0 0 0 0 1 1 1 1 1 1 1 0 0 1 1 1 0 1 0 0 1 0 0 0 0 1 0 1 1 1\n- ...\n+ B_0 B_1 B_2 B_3 B_4 B_5 [...] B_{(F*K)-1}\n:math:`F` has to be replaced by the number of contained frames.\n:math:`K` has to be replaced by the number of information bits.\n"
}
] |
C++
|
MIT License
|
aff3ct/aff3ct
|
Doc: rework the channel parameters.
|
8,483 |
28.11.2018 17:38:03
| -3,600 |
cb50edc06b5642b0edd050c7542a36025f80c06f
|
Doc: Complete the TPC decoder
|
[
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/user/simulation/parameters/cdc/cdc_turbo_prod/dec.rst",
"new_path": "doc/sphinx/source/user/simulation/parameters/cdc/cdc_turbo_prod/dec.rst",
"diff": "@@ -151,29 +151,48 @@ Description of the allowed values:\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n:Type: integer\n- :Examples: ``--dec-ite 1``\n+ :Default: 4\n+ :Examples: ``--dec-ite 5``\n-Maximal number of iterations in the turbo.\n+Set the number of iterations in the turbo.\n.. _dec-turbo_prod-dec-alpha:\n``--dec-alpha``\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n- :Type: list of (real number):limited length [1;inf]\n- :Examples: ``--dec-alpha TODO``\n+ :Type: list of real numbers\n+ :Default: all at 0.5\n+ :Examples: ``--dec-alpha \"0.1,0.1,0.2,0.25,0.3,0.35,.5,.5,1.2\"``\n-Weighting factor, one by half iteration (so twice more than number of iterations). If not enough given values, then automatically extends the last to all iterations.\n+Give the *weighting factor* alpha, one by half iteration\n+(so twice more than the number of iterations). The first one is for the first\n+columns process, the second for the first rows process, the third for the second\n+columns process, the fourth for the second rows process, and so on.\n+\n+If there are not enough values, then the last one given is automatically\n+extended to the rest of the half-iterations.\n+Conversely, if there are too many, the surplus is truncated.\n.. _dec-turbo_prod-dec-beta:\n``--dec-beta``\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n- :Type: list of (real number:positive):limited length [1;inf]\n- :Examples: ``--dec-beta TODO``\n+ :Type: list of real numbers\n+ :Examples: ``--dec-beta \"0.1,0.1,0.2,0.25,0.3,0.35,.5,.5,1.2\"``\n+\n+Give the *reliability factor* beta, one by half iteration\n+(so twice more than the number of iterations). The first one is for the first\n+columns process, the second for the first rows process, the third for the second\n+columns process, the fourth for the second rows process, and so on.\n+\n+If there are not enough values, then the last one given is automatically\n+extended to the rest of the half-iterations.\n+Conversely, if there are too many, the surplus is truncated.\n-Reliability factor, one by half iteration (so twice more than number of iterations). If not enough given values, then automatically extends the last to all iterations. If not given, then computes beta dynamically from the least reliable position metrics.\n+If not given, then beta is dynamically computed as described in\n+:ref:`dec-turbo_prod-dec-type`.\n.. _dec-turbo_prod-dec-c:\n@@ -181,9 +200,11 @@ Reliability factor, one by half iteration (so twice more than number of iteratio\n\"\"\"\"\"\"\"\"\"\"\"\n:Type: integer\n- :Examples: ``--dec-c 1``\n+ :Default: 0\n+ :Examples: ``--dec-c 3``\n-Number of competitors (0 means equal to number of test vectors, 1 means only the decided word).\n+Set the *number of competitors*. A value of 0 means that the latter is set\n+to the number of test vectors, 1 means only the decided word.\n.. _dec-turbo_prod-dec-p:\n@@ -191,9 +212,10 @@ Number of competitors (0 means equal to number of test vectors, 1 means only the\n\"\"\"\"\"\"\"\"\"\"\"\n:Type: integer\n+ :Default: 2\n:Examples: ``--dec-p 1``\n-Number of least reliable positions.\n+Set the number of *least reliable positions*.\n.. _dec-turbo_prod-dec-t:\n@@ -201,19 +223,23 @@ Number of least reliable positions.\n\"\"\"\"\"\"\"\"\"\"\"\n:Type: integer\n+ :Default: 0\n:Examples: ``--dec-t 1``\n-Number of test vectors (0 means equal to 2^p).\n+Set the *number of test vectors*. A value of 0 means equal to :math:`2^p` where\n+:math:`p` is the number of least reliable positions.\n.. _dec-turbo_prod-dec-cp-coef:\n``--dec-cp-coef``\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n- :Type: list of (real number):limited length [5;5]\n- :Examples: ``--dec-cp-coef TODO``\n+ :Type: list of real numbers\n+ :Default: ``\"1,1,1,1,0\"``\n+ :Examples: ``--dec-cp-coef \"0,0.25,0,0,3\"``\n-The 5 Chase Pyndiah constant coefficients \"a,b,c,d,e\".\n+Give the 5 ``CP`` constant coefficients :math:`a, b, c, d, e` as described in\n+:ref:`dec-turbo_prod-dec-type`.\n.. _dec-turbo_prod-dec-flips:\n@@ -230,7 +256,6 @@ Set the maximum number of flips in the CHASE decoder.\n``--dec-hamming``\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n-\nEnable the computation of the Hamming distance instead of the Euclidean distance in the ML/CHASE decoders.\n.. _dec-turbo_prod-dec-sub-corr-pow:\n@@ -239,9 +264,10 @@ Enable the computation of the Hamming distance instead of the Euclidean distance\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n:Type: integer\n- :Examples: ``--dec-sub-corr-pow 1``\n+ :Default: 1\n+ :Examples: ``-T 1``\n-Correction power of the BCH code.\n+Give the correction power of the BCH sub-decoder.\n.. _dec-turbo_prod-dec-sub-flips:\n@@ -259,7 +285,8 @@ Set the maximum number of flips in the CHASE decoder.\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n-Enable the computation of the Hamming distance instead of the Euclidean distance in the ML/CHASE decoders.\n+Enable the computation of the Hamming distance instead of the Euclidean distance\n+in the ML/CHASE decoders.\n.. _dec-turbo_prod-dec-sub-implem:\n"
}
] |
C++
|
MIT License
|
aff3ct/aff3ct
|
Doc: Complete the TPC decoder
|
8,490 |
28.11.2018 17:43:54
| -3,600 |
8bd04e89036fc8611344cf170319fc4a803e710c
|
Doc: rework the quantizer parameters.
|
[
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/user/simulation/parameters/cdc/cdc_turbo_prod/references.bib",
"new_path": "doc/sphinx/source/user/simulation/parameters/cdc/cdc_turbo_prod/references.bib",
"diff": "@Article{Pyndiah1998,\nauthor = {R.M. Pyndiah},\n- title = {Near-optimum decoding of product codes: block turbo codes},\n- journal = {IEEE Transactions on Communications},\n+ title = {Near-Optimum Decoding of Product Codes: Block Turbo Codes},\n+ journal = {IEEE Transactions on Communications (TCOM)},\nyear = {1998},\nvolume = {46},\nnumber = {8},\nissn = {1558-0857},\nabstract = {This paper describes an iterative decoding algorithm for any product code built using linear block codes. It is based on soft-input/soft-output decoders for decoding the component codes so that near-optimum performance is obtained at each iteration. This soft-input/soft-output decoder is a Chase decoder which delivers soft outputs instead of binary decisions. The soft output of the decoder is an estimation of the log-likelihood ratio (LLR) of the binary decisions given by the Chase decoder. The theoretical justifications of this algorithm are developed and the method used for computing the soft output is fully described. The iterative decoding of product codes is also known as the block turbo code (BTC) because the concept is quite similar to turbo codes based on iterative decoding of concatenated recursive convolutional codes. The performance of different Bose-Chaudhuri-Hocquenghem (BCH)-BTCs are given for the Gaussian and the Rayleigh channel. Performance on the Gaussian channel indicates that data transmission at 0.8 dB of Shannon's limit or more than 98% (R/C>0.98) of channel capacity can be achieved with high-code-rate BTC using only four iterations. For the Rayleigh channel, the slope of the bit-error rate (BER) curve is as steep as for the Gaussian channel without using channel state information.},\ndoi = {10.1109/26.705396},\n- file = {:pdf/Li2012 - An Adaptive Successive Cancellation List Decoder for Polar Codes with Cyclic Redundancy Check.pdf:PDF},\n- groups = {Product Codes},\n- keywords = {Product codes, Turbo codes, Iterative decoding, Iterative algorithms, Rayleigh channels, Gaussian channels, Bit error rate, Block codes, Concatenated codes, Convolutional codes},\n}\n\\ No newline at end of file\n"
},
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/user/simulation/parameters/qnt/qnt.rst",
"new_path": "doc/sphinx/source/user/simulation/parameters/qnt/qnt.rst",
"diff": "Quantizer parameters\n--------------------\n-The Quantizer module is activated only when running quantified decoders, ie.\n-when the simulation precision is set to ``8`` or ``16``\n-(cf. :ref:`sim-sim-prec`).\n+The quantizer is a module that ensures the real numbers transformation from a\n+floating-point representation to a fixed-point representation. This module is\n+enabled only if the receiver part of the communication chain works on a\n+fixed-point representation (cf. the :ref:`sim-sim-prec` parameter).\n-It converts input floating points frames into output quantified fixed point\n-frames. The position of the fixed point is settable by the user.\n-\n-.. Danger:: The total number of bits used for the quantification does not fix\n- a saturation for the decoder itself that uses the whole available bits given\n- by the simulation precision.\n-\n-.. Warning:: All codes do not work with a quantification process.\n-\n-.. TODO: list those codes that do not work with fixed point.\n+.. warning:: Some decoders are not *fixed-point ready*, please refer to the\n+ decoders documentation for more details.\n.. _qnt-qnt-type:\n@@ -28,9 +21,11 @@ frames. The position of the fixed point is settable by the user.\n:Default: ``POW2``\n:Examples: ``--qnt-type CUSTOM``\n-Give the type of the quantizer to use in the simulation.\n+Select the quantizer type.\n-Description of the allowed values:\n+Description of the allowed values (:math:`Y_i` stands for a floating-point\n+representation and :math:`Q_i` for the fixed-point representation of a real\n+number):\n+------------+-------------------------+\n| Value | Description |\n@@ -44,7 +39,7 @@ Description of the allowed values:\n+v_{sat} & \\text{when } v_i > +v_{sat} \\\\\n-v_{sat} & \\text{when } v_i < -v_{sat} \\\\\nv_i & \\text{else}\n- \\end{cases}` with :math:`v_i = \\lfloor \\frac{Y_i}{\\Delta} \\rceil\n+ \\end{cases}`, with :math:`v_i = \\lfloor \\frac{Y_i}{\\Delta} \\rceil\n\\text{ and } v_{sat} = 2^{p_b - 1} - 1\n\\text{ and } \\Delta = \\frac{|p_r|}{v_{sat}}`\n@@ -52,13 +47,38 @@ Description of the allowed values:\n+v_{sat} & \\text{when } v_i > +v_{sat} \\\\\n-v_{sat} & \\text{when } v_i < -v_{sat} \\\\\nv_i & \\text{else}\n- \\end{cases}` with :math:`v_i = \\lfloor Y_i * F \\rceil\n+ \\end{cases}`, with :math:`v_i = \\lfloor Y_i * F \\rceil\n\\text{ and } v_{sat} = 2^{p_b - 1} - 1\n\\text{ and } F = 2^{p_d}`\nWhere :math:`p_r`, :math:`p_b` and :math:`p_d` are respectively given through\n-:ref:`qnt-qnt-range`, :ref:`qnt-qnt-bits` and :ref:`qnt-qnt-dec`.\n+the :ref:`qnt-qnt-range`, :ref:`qnt-qnt-bits` and :ref:`qnt-qnt-dec` parameters.\n+\n+.. _qnt-qnt-implem:\n+\n+``--qnt-implem``\n+\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n+\n+ :Type: text\n+ :Allowed values: ``STD`` ``FAST``\n+ :Default: ``STD``\n+ :Examples: ``--qnt-implem FAST``\n+Select the implementation of the quantizer.\n+\n+Description of the allowed values:\n+\n++----------+-------------------------+\n+| Value | Description |\n++==========+=========================+\n+| ``STD`` | |qnt-implem_descr_std| |\n++----------+-------------------------+\n+| ``FAST`` | |qnt-implem_descr_fast| |\n++----------+-------------------------+\n+\n+.. |qnt-implem_descr_std| replace:: Select a standard implementation.\n+.. |qnt-implem_descr_fast| replace:: Select a fast implementation, only\n+ available for the ``POW2`` quantizer.\n.. _qnt-qnt-range:\n@@ -68,8 +88,7 @@ Where :math:`p_r`, :math:`p_b` and :math:`p_d` are respectively given through\n:Type: real number\n:Examples: ``--qnt-range 1.0``\n-The min/max bound for the tricky quantizer.\n-\n+The min/max bounds for the ``CUSTOM`` quantizer.\n.. _qnt-qnt-bits:\n@@ -80,20 +99,38 @@ The min/max bound for the tricky quantizer.\n:Default: 8 else see :numref:`bits_default_table`\n:Examples: ``--qnt-bits 1``\n-Set the number of bits used for the quantizer.\n+Set the number of bits used in the fixed-point representation.\n+.. note:: If the amplitude of the current number exceeds the maximum amplitude\n+ that can be represented with the current quantization, then a saturation is\n+ applied (c.f. the :ref:`qnt-qnt-type` parameter).\n.. _bits_default_table:\n-.. table:: Default values for the total number of bits for the different codes.\n-\n- +----------+----------+-----------+---------+---------+------------+-----------+--------------+---------------+\n- | Code | ``LDPC`` | ``POLAR`` | ``REP`` | ``RSC`` | ``RSC_DB`` | ``TURBO`` | ``TURBO_DB`` | ``TURBO_PROD``|\n- +==========+==========+===========+=========+=========+============+===========+==============+===============+\n- | Value | 6 | 6 | 6 | 6 | 6 | 6 | 6 ||bit_turboprod||\n- +----------+----------+-----------+---------+---------+------------+-----------+--------------+---------------+\n-\n-.. |bit_turboprod| replace:: 6 on 8 bits and 8 on 16 bits\n+.. table:: Default values of the total number of bits for the different codes.\n+ :align: center\n+\n+ +----------------+-----------------+\n+ | Code | Value |\n+ +================+=================+\n+ | ``LDPC`` | 6 |\n+ +----------------+-----------------+\n+ | ``POLAR`` | 6 |\n+ +----------------+-----------------+\n+ | ``REP`` | 6 |\n+ +----------------+-----------------+\n+ | ``RSC`` | 6 |\n+ +----------------+-----------------+\n+ | ``RSC_DB`` | 6 |\n+ +----------------+-----------------+\n+ | ``TURBO`` | 6 |\n+ +----------------+-----------------+\n+ | ``TURBO_DB`` | 6 |\n+ +----------------+-----------------+\n+ | ``TURBO_PROD`` | |bit_turboprod| |\n+ +----------------+-----------------+\n+\n+.. |bit_turboprod| replace:: 6 on 8-bit and 8 on 16-bit\n.. _qnt-qnt-dec:\n@@ -104,46 +141,35 @@ Set the number of bits used for the quantizer.\n:Default: 3 else see :numref:`dec_default_table`\n:Examples: ``--qnt-dec 1``\n-Set the position of the fixed point in the quantified representation.\n+Set the position of the decimal point in the quantified representation.\n.. _dec_default_table:\n-.. table:: Default values for the fixed point position for the different codes.\n-\n- +----------+----------+-----------+---------+-----------+------------+-----------+--------------+---------------+\n- | Code | ``LDPC`` | ``POLAR`` | ``REP`` | ``RSC`` | ``RSC_DB`` | ``TURBO`` | ``TURBO_DB`` | ``TURBO_PROD``|\n- +==========+==========+===========+=========+===========+============+===========+==============+===============+\n- | Value | 2 | 1 | 2 | |dec_RSC| | |dec_RSCDB|||dec_turbo|| |dec_turbodb|||dec_turboprod||\n- +----------+----------+-----------+---------+-----------+------------+-----------+--------------+---------------+\n-\n-.. |dec_RSC| replace:: 1 on 8 bits and 3 on 16 bits\n-.. |dec_RSCDB| replace:: 1 on 8 bits and 3 on 16 bits\n-.. |dec_turbo| replace:: 2 on 8 bits and 3 on 16 bits\n-.. |dec_turbodb| replace:: 2 on 8 bits and 3 on 16 bits\n-.. |dec_turboprod| replace:: 2 on 8 bits and 3 on 16 bits\n-\n-.. _qnt-qnt-implem:\n-\n-``--qnt-implem``\n-\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n-\n- :Type: text\n- :Allowed values: ``FAST`` ``STD``\n- :Default: ``STD``\n- :Examples: ``--qnt-implem FAST``\n-\n-Select the implementation of the quantizer.\n-\n-Description of the allowed values:\n-\n-+----------+-------------------------+\n-| Value | Description |\n-+==========+=========================+\n-| ``FAST`` | |qnt-implem_descr_fast| |\n-+----------+-------------------------+\n-| ``STD`` | |qnt-implem_descr_std| |\n-+----------+-------------------------+\n-\n-.. |qnt-implem_descr_fast| replace:: A standard implementation\n-.. |qnt-implem_descr_std| replace:: A much faster method using |SIMD| but *only\n- for* ``POW2`` *type*.\n+.. table:: Default values of the decimal point position for the different codes.\n+ :align: center\n+\n+ +----------------+-----------------+\n+ | Code | Value |\n+ +================+=================+\n+ | ``LDPC`` | 2 |\n+ +----------------+-----------------+\n+ | ``POLAR`` | 1 |\n+ +----------------+-----------------+\n+ | ``REP`` | 2 |\n+ +----------------+-----------------+\n+ | ``RSC`` | |dec_RSC| |\n+ +----------------+-----------------+\n+ | ``RSC_DB`` | |dec_RSCDB| |\n+ +----------------+-----------------+\n+ | ``TURBO`` | |dec_turbo| |\n+ +----------------+-----------------+\n+ | ``TURBO_DB`` | |dec_turbodb| |\n+ +----------------+-----------------+\n+ | ``TURBO_PROD`` | |dec_turboprod| |\n+ +----------------+-----------------+\n+\n+.. |dec_RSC| replace:: 1 on 8-bit and 3 on 16-bit\n+.. |dec_RSCDB| replace:: 1 on 8-bit and 3 on 16-bit\n+.. |dec_turbo| replace:: 2 on 8-bit and 3 on 16-bit\n+.. |dec_turbodb| replace:: 2 on 8-bit and 3 on 16-bit\n+.. |dec_turboprod| replace:: 2 on 8-bit and 3 on 16-bit\n\\ No newline at end of file\n"
}
] |
C++
|
MIT License
|
aff3ct/aff3ct
|
Doc: rework the quantizer parameters.
|
8,490 |
28.11.2018 18:57:18
| -3,600 |
c63c32b2e6d6226b74e91c0b7c5e71ae33446f76
|
Doc: rework the monitor and terminal parameters.
|
[
{
"change_type": "MODIFY",
"old_path": "README.rst",
"new_path": "README.rst",
"diff": "@@ -13,7 +13,7 @@ performances of the (2048,1723) Polar code from 1.0 to 4.0 dB:\n.. code-block:: console\n- aff3ct -C POLAR -K 1723 -N 2048 -m 1.0 -M 4.0\n+ $ aff3ct -C POLAR -K 1723 -N 2048 -m 1.0 -M 4.0\nAnd the output will be:\n@@ -63,11 +63,11 @@ AFF3CT by running:\n.. code-block:: console\n- git clone --recursive https://github.com/aff3ct/aff3ct.git\n- mkdir aff3ct/build\n- cd aff3ct/build\n- cmake .. -DCMAKE_BUILD_TYPE=Release\n- make -j4\n+ $ git clone --recursive https://github.com/aff3ct/aff3ct.git\n+ $ mkdir aff3ct/build\n+ $ cd aff3ct/build\n+ $ cmake .. -DCMAKE_BUILD_TYPE=Release\n+ $ make -j4\nContribute\n----------\n"
},
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/conf.py",
"new_path": "doc/sphinx/source/conf.py",
"diff": "@@ -257,6 +257,7 @@ rst_epilog = \"\"\"\n.. |CPUs| replace:: :abbr:`CPUs (Central Process Units)`\n.. |CRC| replace:: :abbr:`CRC (Cyclic Redundancy Check)`\n.. |CRCs| replace:: :abbr:`CRCs (Cyclic Redundancy Checks)`\n+.. |CSV| replace:: :abbr:`CSV (Comma-Separated Values)`\n.. |DVB-RCS1| replace:: :abbr:`DVB-RCS1(Digital Video Broadcasting - Return Channel via Satellite 1)`\n.. |DVB-RCS2| replace:: :abbr:`DVB-RCS2(Digital Video Broadcasting - Return Channel via Satellite 2)`\n.. |DVB-S1| replace:: :abbr:`DVB-S1 (Digital Video Broadcasting - Satellite 1)`\n@@ -283,6 +284,7 @@ rst_epilog = \"\"\"\n.. |LUT| replace:: :abbr:`LUT (Look Up Table)`\n.. |LUTs| replace:: :abbr:`LUTs (Look Up Tables)`\n.. |MATLAB| replace:: MATLAB\n+.. |MI| replace:: :abbr:`MI (Mutual Information)`\n.. |MKL| replace:: :abbr:`MKL (Intel Math Kernel Library)`\n.. |ML| replace:: :abbr:`ML (Maximum Likelihood)`\n.. |modem| replace:: :abbr:`modem (modulator/demodulator)`\n@@ -295,6 +297,8 @@ rst_epilog = \"\"\"\n.. |OMS| replace:: :abbr:`OMS (Offset Min-Sum)`\n.. |ONMS| replace:: :abbr:`ONMS (Offset Normalized Min-Sum)`\n.. |OOK| replace:: :abbr:`OOK (On-Off Keying)`\n+.. |OS| replace:: :abbr:`OS (Operating System)`\n+.. |OSs| replace:: :abbr:`OSs (Operating Systems)`\n.. |PAM| replace:: :abbr:`PAM (Pulse-Amplitude Modulation)`\n.. |PDF| replace:: :abbr:`PDF (Probability Density Function)`\n.. |PRNG| replace:: :abbr:`PRNG (Pseudo Random Number Generator)`\n"
},
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/user/installation/compilation/compilation.rst",
"new_path": "doc/sphinx/source/user/installation/compilation/compilation.rst",
"diff": "@@ -60,7 +60,7 @@ Install Make and CMake from the package manager:\n.. code-block:: console\n- sudo apt install make cmake\n+ $ sudo apt install make cmake\n.. note:: On CentOS-like systems you have to replace ``apt`` by ``yum``.\n@@ -96,7 +96,7 @@ Install the C++ GNU compiler from the package manager:\n.. code-block:: console\n- sudo apt install g++\n+ $ sudo apt install g++\n.. note:: On CentOS-like systems you have to replace ``apt`` by ``yum``.\n@@ -113,21 +113,21 @@ Generate the Makefile from CMake:\n.. code-block:: console\n- mkdir build\n- cd build\n- cmake .. -G\"MinGW Makefiles\"\n+ $ mkdir build\n+ $ cd build\n+ $ cmake .. -G\"MinGW Makefiles\"\n**This last command line should fail** but you can ignore it, continue with:\n.. code-block:: console\n- cmake .. -DCMAKE_CXX_COMPILER=g++.exe -DCMAKE_CC_COMPILER=gcc.exe -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS=\"-funroll-loops -march=native\"\n+ $ cmake .. -DCMAKE_CXX_COMPILER=g++.exe -DCMAKE_CC_COMPILER=gcc.exe -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS=\"-funroll-loops -march=native\"\nBuild |AFF3CT| with the Makefile:\n.. code-block:: console\n- mingw32-make -j4\n+ $ mingw32-make -j4\nOnce finished, the |AFF3CT| executable should be located in the\n``$AFF3CT_ROOT/build/bin`` folder.\n@@ -148,15 +148,15 @@ Generate the Makefile from CMake:\n.. code-block:: console\n- mkdir build\n- cd build\n- cmake .. -G\"Unix Makefiles\" -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_CC_COMPILER=clang -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS=\"-funroll-loops -march=native\"\n+ $ mkdir build\n+ $ cd build\n+ $ cmake .. -G\"Unix Makefiles\" -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_CC_COMPILER=clang -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS=\"-funroll-loops -march=native\"\nBuild |AFF3CT| with the Makefile:\n.. code-block:: console\n- make -j4\n+ $ make -j4\nOnce finished, the |AFF3CT| executable should be located in the\n``$AFF3CT_ROOT/build/bin`` folder.\n@@ -168,15 +168,15 @@ Generate the Makefile from CMake:\n.. code-block:: console\n- mkdir build\n- cd build\n- cmake .. -G\"Unix Makefiles\" -DCMAKE_CXX_COMPILER=g++ -DCMAKE_CC_COMPILER=gcc -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS=\"-funroll-loops -march=native\"\n+ $ mkdir build\n+ $ cd build\n+ $ cmake .. -G\"Unix Makefiles\" -DCMAKE_CXX_COMPILER=g++ -DCMAKE_CC_COMPILER=gcc -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS=\"-funroll-loops -march=native\"\nBuild |AFF3CT| with the Makefile:\n.. code-block:: console\n- make -j4\n+ $ make -j4\nOnce finished, the |AFF3CT| executable should be located in the\n``$AFF3CT_ROOT/build/bin`` folder.\n@@ -223,7 +223,7 @@ is the location of Visual Studio on your system):\n.. code-block:: console\n- devenv /build Release aff3ct.sln\n+ $ devenv /build Release aff3ct.sln\n.. _compilation_cmake_options:\n@@ -287,7 +287,7 @@ syntax to follow:\n.. code-block:: console\n- cmake .. -DAFF3CT_OPTION=ON\n+ $ cmake .. -DAFF3CT_OPTION=ON\n.. _compilation_compiler_options:\n@@ -303,7 +303,7 @@ variable can get. For instance, to compile in release mode:\n.. code-block:: console\n- cmake .. -DCMAKE_BUILD_TYPE=Release\n+ $ cmake .. -DCMAKE_BUILD_TYPE=Release\n.. note:: In CMake it is recommended to not explicitly set the compiler\noptimization level flags (``-O0``, ``-O1``, ``-O2``, ``-O3``, etc.).\n@@ -331,7 +331,7 @@ CMake has a built-in variable you can set to specify the compiler options:\n.. code-block:: console\n- cmake .. -DCMAKE_CXX_FLAGS=\"-funroll-loops -march=native\"\n+ $ cmake .. -DCMAKE_CXX_FLAGS=\"-funroll-loops -march=native\"\nMany parts of the |AFF3CT| code use the |SIMD| parallelism and this type of\ninstructions often requires additional compiler options to be enabled:\n"
},
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/user/installation/installation/installation.rst",
"new_path": "doc/sphinx/source/user/installation/installation/installation.rst",
"diff": "@@ -18,7 +18,7 @@ build:\n.. code-block:: console\n- cmake .. -DCMAKE_INSTALL_PREFIX=\"install\"\n+ $ cmake .. -DCMAKE_INSTALL_PREFIX=\"install\"\nThis command do not install |AFF3CT|. It only prepares the project to be\ninstalled in the selected location.\n@@ -30,7 +30,7 @@ To install |AFF3CT|, call the `install` target on the current Makefile:\n.. code-block:: console\n- make install\n+ $ make install\n.. note:: Depending on the chosen ``CMAKE_INSTALL_PREFIX`` location, the\nadministrator privileges (**sudo**) can be required.\n@@ -47,7 +47,7 @@ is the location of Visual Studio on your system):\n.. code-block:: console\n- devenv /build Release aff3ct.sln /project INSTALL\n+ $ devenv /build Release aff3ct.sln /project INSTALL\nDetails\n-------\n"
},
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/user/installation/source_code/source_code.rst",
"new_path": "doc/sphinx/source/user/installation/source_code/source_code.rst",
"diff": "@@ -56,7 +56,7 @@ Install Git from the package manager:\n.. code-block:: console\n- sudo apt install git\n+ $ sudo apt install git\n.. note:: On CentOS-like systems you have to replace ``apt`` by ``yum``.\n@@ -67,8 +67,8 @@ Get the source code from GitHub:\n.. code-block:: console\n- git clone --recursive https://github.com/aff3ct/aff3ct.git\n- cd aff3ct\n+ $ git clone --recursive https://github.com/aff3ct/aff3ct.git\n+ $ cd aff3ct\n.. _Git submodule feature: https://git-scm.com/docs/git-submodule\n@@ -88,7 +88,7 @@ following command:\n.. code-block:: console\n- git submodule update --init --recursive\n+ $ git submodule update --init --recursive\n.. warning:: When ``git pull`` is used to get the last commits from the\nrepository, the submodules are not automatically updated and it\n"
},
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/user/simulation/overview/overview.rst",
"new_path": "doc/sphinx/source/user/simulation/overview/overview.rst",
"diff": ".. _user_simulation_overview:\n-\nOverview\n--------\n@@ -29,7 +28,7 @@ line using |AFF3CT|:\n.. code-block:: console\n- aff3ct -C POLAR -K 1723 -N 2048 -m 1.0 -M 4.0 -s 1.0\n+ $ aff3ct -C POLAR -K 1723 -N 2048 -m 1.0 -M 4.0 -s 1.0\n``-C`` is a required parameter that defines the type of channel code that will\nbe used in the communication chain (see the :ref:`sim-sim-cde-type` section).\n@@ -60,14 +59,16 @@ between each |SNR| (c.f. section :ref:`sim-sim-noise-step`). The\n|SNR|-related parameters in the communication chain.\n+.. _user_simulation_overview_output:\n+\nOutput\n\"\"\"\"\"\"\n-The output of the command\n-(``aff3ct -C POLAR -K 1723 -N 2048 -m 1.0 -M 4.0 -s 1.0``) will look like:\n+The output of following command will look like:\n.. code-block:: console\n+ $ aff3ct -C POLAR -K 1723 -N 2048 -m 1.0 -M 4.0 -s 1.0\n# ----------------------------------------------------\n# ---- A FAST FORWARD ERROR CORRECTION TOOLBOX >> ----\n# ----------------------------------------------------\n"
},
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/user/simulation/parameters/global/global.rst",
"new_path": "doc/sphinx/source/user/simulation/parameters/global/global.rst",
"diff": "Other parameters\n----------------\n-Those arguments are not associated to any module.\n-\n-\n.. _global-help:\n``--help, -h``\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n-Print the help with all the *required* and *optional* arguments.\n+Print the help with all the required ``{R}`` and optional arguments.\nThe latter change in function of the selected simulation type and code.\n+.. code-block:: console\n+\n+ $ aff3ct -h\n+ Usage: ./bin/aff3ct -C <text> [optional args...]\n+\n+ Simulation parameter(s):\n+ {R} --sim-cde-type, -C <text:including set={BCH|LDPC|POLAR|RA|REP|RS|RSC|RSC_DB|TURBO|TURBO_DB|TURBO_PROD|UNCODED}>\n+ select the code type you want to use.\n+ --sim-no-colors\n+ disable the colors in the shell.\n+ --sim-prec, -p <integer:including set={8|16|32|64}>\n+ the simulation precision in bits.\n+ --sim-type <text:including set={BFER|BFERI|EXIT}>\n+ select the type of simulation to launch (default is BFER).\n+\n+ Other parameter(s):\n+ --Help, -H\n+ print this help with the advanced arguments.\n+ --help, -h\n+ print this help.\n+ --version, -v\n+ print informations about the version of the code.\n+\n.. _global-advanced-help:\n``--Help, -H``\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n-Print the help with in more the advanced arguments.\n+Print the help with in more the advanced ``{A}`` arguments.\n+\n+.. code-block:: console\n+\n+ $ aff3ct -H\n+ Usage: ./bin/aff3ct -C <text> [optional args...]\n+\n+ Simulation parameter(s):\n+ {R} --sim-cde-type, -C <text:including set={BCH|LDPC|POLAR|RA|REP|RS|RSC|RSC_DB|TURBO|TURBO_DB|TURBO_PROD|UNCODED}>\n+ select the code type you want to use.\n+ --sim-no-colors\n+ disable the colors in the shell.\n+ {A} --sim-no-legend\n+ Do not display any legend when launching the simulation.\n+ --sim-prec, -p <integer:including set={8|16|32|64}>\n+ the simulation precision in bits.\n+ --sim-type <text:including set={BFER|BFERI|EXIT}>\n+ select the type of simulation to launch (default is BFER).\n+\n+ Other parameter(s):\n+ --Help, -H\n+ print this help with the advanced arguments.\n+ {A} --except-no-bt\n+ do not print the backtrace when displaying exception.\n+ --help, -h\n+ print this help.\n+ --version, -v\n+ print informations about the version of the code.\n.. _global-version:\n``--version, -v``\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n-Print informations about the version of the source code and\n-compilation options.\n+Print informations about the version of the source code and compilation options.\n+\n+.. code-block:: console\n+\n+ $ aff3ct -v\n+ aff3ct (Linux 64-bit, g++ 8.1, AVX2) v2.0.0-112-gc74ce62\n+ Copyright (c) 2016-2018 - MIT license.\n+ This is free software; see the source for copying conditions. There is NO\n+ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n.. _global-except-a2l:\n``--except-a2l`` |image_advanced_argument|\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n-Enhance the backtrace when displaying exception.\n-This change the program addresses into filenames and lines.\n-It may take some seconds to do this work.\n+Enhance the backtrace when displaying exception. This change the program\n+addresses into filenames and lines. It may take some seconds to do this work.\n-.. note:: This option works only on Unix based OS and if |AFF3CT| has been\n+.. note:: This option works only on Unix based |OS| and if |AFF3CT| has been\n:ref:`compiled <compilation_compiler_options>` with debug symbols\n(``-g`` compile flag) and **without** ``NDEBUG`` macro (``-DNDEBUG`` flag).\n"
},
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/user/simulation/parameters/mnt/mnt.rst",
"new_path": "doc/sphinx/source/user/simulation/parameters/mnt/mnt.rst",
"diff": "Monitor parameters\n------------------\n-The Monitor is the last module in the chain as it compares the decoded frame\n-with the initially generated one in the Source module. Furthermore, it can\n-also compute the mutual information at the output of the demodulator.\n-It has also the power to limit the currently running simulated noise point as it\n-can stop it when a given amount of frame errors is reached. An histogram of the\n-number of errors per frame for each noise point can be dumped, too.\n-\n+The monitor is the last module in the chain: **it compares the decoded\n+information bits with the initially generated ones from the source**.\n+Furthermore, it can also compute **the mutual information** (|MI|) from the\n+demodulator output.\n.. _mnt-mnt-max-fe:\n@@ -20,7 +17,7 @@ number of errors per frame for each noise point can be dumped, too.\n:Default: 100\n:Examples: ``--mnt-max-fe 25``\n-Set the maximum number of frame errors simulated for each noise point.\n+Set the maximum number of frame errors to simulated for each noise point.\n.. _mnt-mnt-err-hist:\n@@ -30,8 +27,20 @@ Set the maximum number of frame errors simulated for each noise point.\n:Type: integer\n:Examples: ``--mnt-err-hist 1``\n-Activate the histogram of the number of errors per frame. Sets also the maximum\n-number of bit error per frame included in the histogram (0 is no limit).\n+Enable the construction of the errors per frame histogram. Set also the maximum\n+number of bit errors per frame included in the histogram (0 means no limit).\n+The histogram is saved in |CSV| format:\n+\n+.. code-block:: console\n+\n+ \"Number of error bits per wrong frame\"; \"Histogram (noise: 5.000000dB, on 10004 frames)\"\n+ 0; 0\n+ 1; 7255\n+ 2; 2199\n+ 3; 454\n+ 4; 84\n+ 5; 11\n+ 6; 12\n.. _mnt-mnt-err-hist-path:\n@@ -43,13 +52,12 @@ number of bit error per frame included in the histogram (0 is no limit).\n:Default: :file:`./hist`\n:Examples: ``--mnt-err-hist-path my/histogram/root/path/name``\n-Path to the output histogram. When files are dumped, the current noise value\n-is added to this name with the *.txt* extension.\n+Path to the output histogram. When the files are dumped, the current noise value\n+is added to this name with the ``.txt`` extension.\nAn output filename example is :file:`hist_2.000000.txt` for a noise value of\n-:math:`2\\ dB`.\n-For `Gnuplot <http://www.gnuplot.info/>`_ users you can then simply display the\n-histogram with a simple command:\n+2 dB. For `Gnuplot <http://www.gnuplot.info/>`_ users you can then simply\n+display the histogram with the following command:\n.. code-block:: console\n@@ -60,6 +68,7 @@ histogram with a simple command:\n``--mnt-mutinfo``\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n-Activate the computation of the mutual information.\n+Enable the computation of the |MI|.\n-.. note:: Available only on ``BFER`` simulation types (:ref:`sim-sim-type`).\n\\ No newline at end of file\n+.. note:: Only available on ``BFER`` simulation types (see the\n+ :ref:`sim-sim-type` parameter for more details).\n\\ No newline at end of file\n"
},
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/user/simulation/parameters/ter/ter.rst",
"new_path": "doc/sphinx/source/user/simulation/parameters/ter/ter.rst",
"diff": "Terminal parameters\n-------------------\n-The Terminal is an observer module that reads the information to display\n-from the monitor in real time.\n-\n-.. hint:: The intermediate results are dumped on the **error output** of the\n- program when the final display is made on the **standard output**.\n- So when launching |AFF3CT| you can redirect the last one to a file to save\n- results and still seeing the intermediate reports on your terminal.\n- See :ref:`user_simulation_overview` for more details about how to launch\n- |AFF3CT|.\n-\n-.. note:: Intermediate results of a same noise point are always displayed on the\n- same line. They finish with a carrier return **\\\\r** character.\n-\n-.. _ter-ter-freq:\n-\n-``--ter-freq``\n-\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n-\n- :Type: integer\n- :Default: 500\n- :Examples: ``--ter-freq 1``\n-\n-Set the display frequency (refresh time) in *[ms]*, for each iteration.\n-Setting 0 disables the refresh to dump only the final result.\n-\n-When MPI is enabled, this value is by default set to the same value than\n-the :ref:`sim-sim-mpi-comm` argument.\n-\n-.. _ter-ter-no:\n-\n-``--ter-no``\n-\"\"\"\"\"\"\"\"\"\"\"\"\n-\n-Disable completely the terminal report.\n+The terminal is an observer module that reads and display the monitor\n+informations in real time. The terminal displays two types of results:\n+**intermediate results** and **final results**. The intermediate results are\n+printed on the **error output** during the simulation of a noise point and\n+refreshed at a defined frequency (see the :ref:`ter-ter-freq` parameter). On the\n+other hand, the final results are printed on the **standard output** once the\n+simulation of the noise point is over.\n.. _ter-ter-type:\n@@ -48,7 +21,7 @@ Disable completely the terminal report.\n:Default: ``STD``\n:Examples: ``--ter-type STD``\n-Select the type of the terminal to use to format the displayed results.\n+Select the terminal type (the format to display the results).\nDescription of the allowed values:\n@@ -58,5 +31,29 @@ Description of the allowed values:\n| ``STD`` | |ter-type_descr_std| |\n+---------+----------------------+\n-.. |ter-type_descr_std| replace:: This is the standard format readable by\n- :ref:`user_pyber_overview`\n\\ No newline at end of file\n+.. |ter-type_descr_std| replace:: Select the standard format.\n+\n+.. note:: For more details on the standard output format see the\n+ :ref:`user_simulation_overview_output` section).\n+\n+.. _ter-ter-freq:\n+\n+``--ter-freq``\n+\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n+\n+ :Type: integer\n+ :Default: 500\n+ :Examples: ``--ter-freq 1``\n+\n+Set the display frequency (refresh time) of the intermediate results in\n+milliseconds. Setting 0 disables the display of the intermediate results.\n+\n+.. note:: When |MPI| is enabled, this value is by default set to the same value\n+ than the :ref:`sim-sim-mpi-comm` parameter.\n+\n+.. _ter-ter-no:\n+\n+``--ter-no``\n+\"\"\"\"\"\"\"\"\"\"\"\"\n+\n+Disable completely the terminal report.\n\\ No newline at end of file\n"
},
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/user/simulation/pyber/pyber.rst",
"new_path": "doc/sphinx/source/user/simulation/pyber/pyber.rst",
"diff": "PyBER\n^^^^^\n-``PyBER`` is our python GUI to display an |AFF3CT| results library.\n+|PyBER| is our Python |GUI| to display the |AFF3CT| outputs.\n-You can download it here: `PyBER <https://github.com/aff3ct/PyBER>`_\n+It can be downloaded here: https://github.com/aff3ct/PyBER.\n.. image:: images/pyber_plot.png\n-\n+ :align: center\nInstall Python3\n-\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n+\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n-| Download and install `Anaconda3 <https://www.anaconda.com/download/>`_\n-| Tested with: `Anaconda3 x86_64 4.2.0 <https://repo.continuum.io/archive/Anaconda3-4.2.0-Windows-x86_64.exe>`_\n+Download and install Anaconda3: https://www.anaconda.com/download/ (tested on\n+`Anaconda3-4.2.0-Windows-x86_64 <https://repo.continuum.io/archive/Anaconda3-4.2.0-Windows-x86_64.exe>`_).\nNext next next... Install!\n-Pay attention to add ``Python`` to the ``PATH`` when installing it.\n+Pay attention to add Python to the ``PATH`` when installing it.\nRun PyBER\n\"\"\"\"\"\"\"\"\"\n-Launch or re-launch (it is important to re-launch) ``Git Bash`` and type:\n+From your terminal, go to the folder where |PyBER| is located an run it:\n.. code-block:: console\n- cd ~/aff3ct/plotter/PyBER/\n- python pyBER.py &\n\\ No newline at end of file\n+ $ python pyBER.py &\n\\ No newline at end of file\n"
}
] |
C++
|
MIT License
|
aff3ct/aff3ct
|
Doc: rework the monitor and terminal parameters.
|
8,490 |
29.11.2018 10:07:22
| -3,600 |
915b835de1ce76dcea8dd6b502367dd8bedc78e4
|
Doc: replace '.. code-block:: console' by '.. code-block:: bash'.
|
[
{
"change_type": "MODIFY",
"old_path": "CONTRIBUTING.rst",
"new_path": "CONTRIBUTING.rst",
"diff": "@@ -21,9 +21,9 @@ done (read more about `pull requests`_).\nAlways write a clear log message for your commits. One-line messages are fine\nfor small changes, but bigger changes should look like this:\n-.. code-block:: console\n+.. code-block:: bash\n- $ git commit -m \"A brief summary of the commit\n+ git commit -m \"A brief summary of the commit\n>\n> A paragraph describing what changed and its impact.\"\n"
},
{
"change_type": "MODIFY",
"old_path": "README.rst",
"new_path": "README.rst",
"diff": "@@ -11,13 +11,13 @@ method.\nIt is very easy to use, for instance, to estimate the BER/FER decoding\nperformances of the (2048,1723) Polar code from 1.0 to 4.0 dB:\n-.. code-block:: console\n+.. code-block:: bash\n- $ aff3ct -C POLAR -K 1723 -N 2048 -m 1.0 -M 4.0\n+ aff3ct -C \"POLAR\" -K 1723 -N 2048 -m 1.0 -M 4.0\nAnd the output will be:\n-.. code-block:: console\n+.. code-block:: bash\n# ----------------------------------------------------\n# ---- A FAST FORWARD ERROR CORRECTION TOOLBOX >> ----\n@@ -61,13 +61,13 @@ Installation\nFirst make sure to have installed a C++11 compiler, CMake and Git. Then install\nAFF3CT by running:\n-.. code-block:: console\n+.. code-block:: bash\n- $ git clone --recursive https://github.com/aff3ct/aff3ct.git\n- $ mkdir aff3ct/build\n- $ cd aff3ct/build\n- $ cmake .. -DCMAKE_BUILD_TYPE=Release\n- $ make -j4\n+ git clone --recursive https://github.com/aff3ct/aff3ct.git\n+ mkdir aff3ct/build\n+ cd aff3ct/build\n+ cmake .. -DCMAKE_BUILD_TYPE=\"Release\"\n+ make -j4\nContribute\n----------\n"
},
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/user/installation/compilation/compilation.rst",
"new_path": "doc/sphinx/source/user/installation/compilation/compilation.rst",
"diff": "@@ -58,9 +58,9 @@ Linux\nInstall Make and CMake from the package manager:\n-.. code-block:: console\n+.. code-block:: bash\n- $ sudo apt install make cmake\n+ sudo apt install make cmake\n.. note:: On CentOS-like systems you have to replace ``apt`` by ``yum``.\n@@ -94,9 +94,9 @@ Linux\nInstall the C++ GNU compiler from the package manager:\n-.. code-block:: console\n+.. code-block:: bash\n- $ sudo apt install g++\n+ sudo apt install g++\n.. note:: On CentOS-like systems you have to replace ``apt`` by ``yum``.\n@@ -111,23 +111,23 @@ Windows\nGenerate the Makefile from CMake:\n-.. code-block:: console\n+.. code-block:: bash\n- $ mkdir build\n- $ cd build\n- $ cmake .. -G\"MinGW Makefiles\"\n+ mkdir build\n+ cd build\n+ cmake .. -G\"MinGW Makefiles\"\n**This last command line should fail** but you can ignore it, continue with:\n-.. code-block:: console\n+.. code-block:: bash\n- $ cmake .. -DCMAKE_CXX_COMPILER=g++.exe -DCMAKE_CC_COMPILER=gcc.exe -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS=\"-funroll-loops -march=native\"\n+ cmake .. -DCMAKE_CXX_COMPILER=\"g++.exe\" -DCMAKE_CC_COMPILER=\"gcc.exe\" -DCMAKE_BUILD_TYPE=\"Release\" -DCMAKE_CXX_FLAGS=\"-funroll-loops -march=native\"\nBuild |AFF3CT| with the Makefile:\n-.. code-block:: console\n+.. code-block:: bash\n- $ mingw32-make -j4\n+ mingw32-make -j4\nOnce finished, the |AFF3CT| executable should be located in the\n``$AFF3CT_ROOT/build/bin`` folder.\n@@ -146,17 +146,17 @@ macOS\nGenerate the Makefile from CMake:\n-.. code-block:: console\n+.. code-block:: bash\n- $ mkdir build\n- $ cd build\n- $ cmake .. -G\"Unix Makefiles\" -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_CC_COMPILER=clang -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS=\"-funroll-loops -march=native\"\n+ mkdir build\n+ cd build\n+ cmake .. -G\"Unix Makefiles\" -DCMAKE_CXX_COMPILER=\"clang++\" -DCMAKE_CC_COMPILER=\"clang\" -DCMAKE_BUILD_TYPE=\"Release\" -DCMAKE_CXX_FLAGS=\"-funroll-loops -march=native\"\nBuild |AFF3CT| with the Makefile:\n-.. code-block:: console\n+.. code-block:: bash\n- $ make -j4\n+ make -j4\nOnce finished, the |AFF3CT| executable should be located in the\n``$AFF3CT_ROOT/build/bin`` folder.\n@@ -166,17 +166,17 @@ Linux\nGenerate the Makefile from CMake:\n-.. code-block:: console\n+.. code-block:: bash\n- $ mkdir build\n- $ cd build\n- $ cmake .. -G\"Unix Makefiles\" -DCMAKE_CXX_COMPILER=g++ -DCMAKE_CC_COMPILER=gcc -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS=\"-funroll-loops -march=native\"\n+ mkdir build\n+ cd build\n+ cmake .. -G\"Unix Makefiles\" -DCMAKE_CXX_COMPILER=\"g++\" -DCMAKE_CC_COMPILER=\"gcc\" -DCMAKE_BUILD_TYPE=\"Release\" -DCMAKE_CXX_FLAGS=\"-funroll-loops -march=native\"\nBuild |AFF3CT| with the Makefile:\n-.. code-block:: console\n+.. code-block:: bash\n- $ make -j4\n+ make -j4\nOnce finished, the |AFF3CT| executable should be located in the\n``$AFF3CT_ROOT/build/bin`` folder.\n@@ -221,9 +221,9 @@ The compilation can also be started from the command line after calling the\n``%VS_PATH%\\VC\\Auxiliary\\Build\\vcvars64.bat`` batch script (where ``%VS_PATH%``\nis the location of Visual Studio on your system):\n-.. code-block:: console\n+.. code-block:: bash\n- $ devenv /build Release aff3ct.sln\n+ devenv /build Release aff3ct.sln\n.. _compilation_cmake_options:\n@@ -285,9 +285,9 @@ this feature and provides the following options:\nConsidering an option ``AFF3CT_OPTION`` we want to set to ``ON``, here is the\nsyntax to follow:\n-.. code-block:: console\n+.. code-block:: bash\n- $ cmake .. -DAFF3CT_OPTION=ON\n+ cmake .. -DAFF3CT_OPTION=\"ON\"\n.. _compilation_compiler_options:\n@@ -301,9 +301,9 @@ CMake allows to select the type of build through the ``CMAKE_BUILD_TYPE``\nbuilt-in variable. ``Release`` and ``Debug`` are the common values that the\nvariable can get. For instance, to compile in release mode:\n-.. code-block:: console\n+.. code-block:: bash\n- $ cmake .. -DCMAKE_BUILD_TYPE=Release\n+ cmake .. -DCMAKE_BUILD_TYPE=\"Release\"\n.. note:: In CMake it is recommended to not explicitly set the compiler\noptimization level flags (``-O0``, ``-O1``, ``-O2``, ``-O3``, etc.).\n@@ -329,9 +329,9 @@ Specific Options\nCMake has a built-in variable you can set to specify the compiler options:\n``CMAKE_CXX_FLAGS``. For instance, it can be used like this:\n-.. code-block:: console\n+.. code-block:: bash\n- $ cmake .. -DCMAKE_CXX_FLAGS=\"-funroll-loops -march=native\"\n+ cmake .. -DCMAKE_CXX_FLAGS=\"-funroll-loops -march=native\"\nMany parts of the |AFF3CT| code use the |SIMD| parallelism and this type of\ninstructions often requires additional compiler options to be enabled:\n"
},
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/user/installation/installation/installation.rst",
"new_path": "doc/sphinx/source/user/installation/installation/installation.rst",
"diff": "@@ -16,9 +16,9 @@ This location can be changed by setting the ``CMAKE_INSTALL_PREFIX`` built-in\nvariable with an other path. For instance, to install |AFF3CT| in the current\nbuild:\n-.. code-block:: console\n+.. code-block:: bash\n- $ cmake .. -DCMAKE_INSTALL_PREFIX=\"install\"\n+ cmake .. -DCMAKE_INSTALL_PREFIX=\"install\"\nThis command do not install |AFF3CT|. It only prepares the project to be\ninstalled in the selected location.\n@@ -28,9 +28,9 @@ Makefile Project\nTo install |AFF3CT|, call the `install` target on the current Makefile:\n-.. code-block:: console\n+.. code-block:: bash\n- $ make install\n+ make install\n.. note:: Depending on the chosen ``CMAKE_INSTALL_PREFIX`` location, the\nadministrator privileges (**sudo**) can be required.\n@@ -45,9 +45,9 @@ or from the command line after calling the\n``%VS_PATH%\\VC\\Auxiliary\\Build\\vcvars64.bat`` batch script (where ``%VS_PATH%``\nis the location of Visual Studio on your system):\n-.. code-block:: console\n+.. code-block:: bash\n- $ devenv /build Release aff3ct.sln /project INSTALL\n+ devenv /build Release aff3ct.sln /project INSTALL\nDetails\n-------\n"
},
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/user/installation/source_code/source_code.rst",
"new_path": "doc/sphinx/source/user/installation/source_code/source_code.rst",
"diff": "@@ -54,9 +54,9 @@ Linux\nInstall Git from the package manager:\n-.. code-block:: console\n+.. code-block:: bash\n- $ sudo apt install git\n+ sudo apt install git\n.. note:: On CentOS-like systems you have to replace ``apt`` by ``yum``.\n@@ -65,10 +65,10 @@ Clone |AFF3CT| from GitHub\nGet the source code from GitHub:\n-.. code-block:: console\n+.. code-block:: bash\n- $ git clone --recursive https://github.com/aff3ct/aff3ct.git\n- $ cd aff3ct\n+ git clone --recursive https://github.com/aff3ct/aff3ct.git\n+ cd aff3ct\n.. _Git submodule feature: https://git-scm.com/docs/git-submodule\n@@ -86,9 +86,9 @@ this is why the ``--recursive`` option has been added.\nIf you want to manually get or update the |AFF3CT| submodules, you can use the\nfollowing command:\n-.. code-block:: console\n+.. code-block:: bash\n- $ git submodule update --init --recursive\n+ git submodule update --init --recursive\n.. warning:: When ``git pull`` is used to get the last commits from the\nrepository, the submodules are not automatically updated and it\n"
},
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/user/simulation/overview/overview.rst",
"new_path": "doc/sphinx/source/user/simulation/overview/overview.rst",
"diff": "@@ -26,9 +26,9 @@ different arguments. The command line interface make possible to write scripts\nthat run a battery of simulations for instance. Here is a minimalist command\nline using |AFF3CT|:\n-.. code-block:: console\n+.. code-block:: bash\n- $ aff3ct -C POLAR -K 1723 -N 2048 -m 1.0 -M 4.0 -s 1.0\n+ aff3ct -C \"POLAR\" -K 1723 -N 2048 -m 1.0 -M 4.0 -s 1.0\n``-C`` is a required parameter that defines the type of channel code that will\nbe used in the communication chain (see the :ref:`sim-sim-cde-type` section).\n@@ -66,9 +66,9 @@ Output\nThe output of following command will look like:\n-.. code-block:: console\n+.. code-block:: bash\n- $ aff3ct -C POLAR -K 1723 -N 2048 -m 1.0 -M 4.0 -s 1.0\n+ aff3ct -C \"POLAR\" -K 1723 -N 2048 -m 1.0 -M 4.0 -s 1.0\n# ----------------------------------------------------\n# ---- A FAST FORWARD ERROR CORRECTION TOOLBOX >> ----\n# ----------------------------------------------------\n"
},
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/user/simulation/parameters/chn/chn.rst",
"new_path": "doc/sphinx/source/user/simulation/parameters/chn/chn.rst",
"diff": "@@ -273,7 +273,7 @@ details):\nThe expected file format is either |ASCII| or binary (the format is\nautomatically detected). Here is the file structure expected in |ASCII|:\n-.. code-block:: console\n+.. code-block:: bash\nF\n"
},
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/user/simulation/parameters/global/global.rst",
"new_path": "doc/sphinx/source/user/simulation/parameters/global/global.rst",
"diff": "@@ -11,9 +11,12 @@ Other parameters\nPrint the help with all the required ``{R}`` and optional arguments.\nThe latter change in function of the selected simulation type and code.\n+.. code-block:: bash\n+\n+ aff3ct -h\n+\n.. code-block:: console\n- $ aff3ct -h\nUsage: ./bin/aff3ct -C <text> [optional args...]\nSimulation parameter(s):\n@@ -41,9 +44,12 @@ The latter change in function of the selected simulation type and code.\nPrint the help with in more the advanced ``{A}`` arguments.\n+.. code-block:: bash\n+\n+ aff3ct -H\n+\n.. code-block:: console\n- $ aff3ct -H\nUsage: ./bin/aff3ct -C <text> [optional args...]\nSimulation parameter(s):\n@@ -75,9 +81,12 @@ Print the help with in more the advanced ``{A}`` arguments.\nPrint informations about the version of the source code and compilation options.\n+.. code-block:: bash\n+\n+ aff3ct -v\n+\n.. code-block:: console\n- $ aff3ct -v\naff3ct (Linux 64-bit, g++ 8.1, AVX2) v2.0.0-112-gc74ce62\nCopyright (c) 2016-2018 - MIT license.\nThis is free software; see the source for copying conditions. There is NO\n"
},
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/user/simulation/parameters/itl/itl.rst",
"new_path": "doc/sphinx/source/user/simulation/parameters/itl/itl.rst",
"diff": "@@ -144,7 +144,7 @@ interleaver).\nAn |ASCII| file is expected:\n-.. code-block:: console\n+.. code-block:: bash\n1\n@@ -163,7 +163,7 @@ If there is more than one interleaved sequence then for each new frame a new\n|LUT| is used in the natural order given by the file. Here is an example with\ntwo |LUTs|:\n-.. code-block:: console\n+.. code-block:: bash\n2\n"
},
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/user/simulation/parameters/mdm/mdm.rst",
"new_path": "doc/sphinx/source/user/simulation/parameters/mdm/mdm.rst",
"diff": "@@ -115,7 +115,7 @@ Give the path to the ordered modulation symbols (constellation), to use with\nAn |ASCII| file is expected, for instance here is the definition of a 16-|QAM|\nwith an anti-Gray mapping (the lines starting with a ``#`` are ignored):\n-.. code-block:: console\n+.. code-block:: bash\n# 0000\n3 3\n"
},
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/user/simulation/parameters/mnt/mnt.rst",
"new_path": "doc/sphinx/source/user/simulation/parameters/mnt/mnt.rst",
"diff": "@@ -31,7 +31,7 @@ Enable the construction of the errors per frame histogram. Set also the maximum\nnumber of bit errors per frame included in the histogram (0 means no limit).\nThe histogram is saved in |CSV| format:\n-.. code-block:: console\n+.. code-block:: bash\n\"Number of error bits per wrong frame\"; \"Histogram (noise: 5.000000dB, on 10004 frames)\"\n0; 0\n@@ -59,7 +59,7 @@ An output filename example is :file:`hist_2.000000.txt` for a noise value of\n2 dB. For `Gnuplot <http://www.gnuplot.info/>`_ users you can then simply\ndisplay the histogram with the following command:\n-.. code-block:: console\n+.. code-block:: bash\ngnuplot -e \"set key autotitle columnhead; plot 'hist_2.000000.txt' with lines; pause -1\"\n"
},
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/user/simulation/parameters/sim/sim.rst",
"new_path": "doc/sphinx/source/user/simulation/parameters/sim/sim.rst",
"diff": "@@ -335,9 +335,9 @@ when a bit is 1, then the corresponding output bit is flipped.\nEnable the debug mode. This print the input and the output frames after each\ntask execution:\n-.. code-block:: console\n+.. code-block:: bash\n- $ aff3ct -C REP -K 4 -N 8 -m 1.0 -M 1.0 --sim-dbg\n+ aff3ct -C \"REP\" -K 4 -N 8 -m 1.0 -M 1.0 --sim-dbg\n# [...]\n# Source_random::generate(int32 U_K[4])\n# {OUT} U_K = [ 1, 1, 0, 1]\n@@ -392,9 +392,9 @@ Enable the debug mode and **print values in the hexadecimal format**.\nThis mode is useful for having a fully accurate representation of floating\nnumbers:\n-.. code-block:: console\n+.. code-block:: bash\n- $ aff3ct -C REP -K 4 -N 8 -m 1.0 -M 1.0 --sim-dbg-hex\n+ aff3ct -C \"REP\" -K 4 -N 8 -m 1.0 -M 1.0 --sim-dbg-hex\n# [...]\n# Modem_BPSK::modulate(const int32 X_N1[8], float32 X_N2[8])\n# {IN} X_N1 = [0x1, 0x1, 0x0, 0x1, 0x1, 0x1, 0x0, 0x1]\n@@ -420,9 +420,9 @@ numbers:\nEnable the debug mode and **set the max number of elements** to display per\nframe. 0 value means there is no dump limit.\n-.. code-block:: console\n+.. code-block:: bash\n- $ aff3ct -C REP -K 4 -N 8 -m 1.0 -M 1.0 --sim-dbg-limit 3\n+ aff3ct -C \"REP\" -K 4 -N 8 -m 1.0 -M 1.0 --sim-dbg-limit 3\n# [...]\n# Modem_BPSK::modulate(const int32 X_N1[8], float32 X_N2[8])\n# {IN} X_N1 = [ 1, 1, 0, ...]\n@@ -450,9 +450,9 @@ This behavior can be overridden with the :ref:`src-src-fra` parameter and a task\ncan be executed on many frames. In that case, you may want to reduce the number\nof displayed frames on screen:\n-.. code-block:: console\n+.. code-block:: bash\n- $ aff3ct -C REP -K 4 -N 8 -m 1.0 -M 1.0 -F 8 --sim-dbg-fra 4\n+ aff3ct -C \"REP\" -K 4 -N 8 -m 1.0 -M 1.0 -F 8 --sim-dbg-fra 4\n# [...]\n# Modem_BPSK::modulate(const int32 X_N1[8x8], float32 X_N2[8x8])\n# {IN} X_N1 = [f1( 1, 1, 0, 1, 1, 1, 0, 1),\n@@ -493,9 +493,9 @@ of displayed frames on screen:\nEnable the debug mode and **set the decimal precision** (number of digits for\nthe decimal part) of the floating-point elements:\n-.. code-block:: console\n+.. code-block:: bash\n- $ aff3ct -C REP -K 4 -N 8 -m 1.0 -M 1.0 --sim-dbg-prec 4\n+ aff3ct -C \"REP\" -K 4 -N 8 -m 1.0 -M 1.0 --sim-dbg-prec 4\n# [...]\n# Modem_BPSK::modulate(const int32 X_N1[8], float32 X_N2[8])\n# {IN} X_N1 = [ 0, 0, 1, 1, 0, 0, 1, 1]\n@@ -541,9 +541,9 @@ Set the |PRNG| seed used in the Monte Carlo simulation.\nDisplay statistics for each task. Those statistics are shown after each\nsimulated |SNR| point:\n-.. code-block:: console\n+.. code-block:: bash\n- $ aff3ct -C POLAR -K 1723 -N 2048 -m 4.2 -M 4.2 -t 1 --sim-stats\n+ aff3ct -C \"POLAR\" -K 1723 -N 2048 -m 4.2 -M 4.2 -t 1 --sim-stats\n# [...]\n# -------------------------------------------||------------------------------||--------------------------------||--------------------------------\n# Statistics for the given task || Basic statistics || Measured throughput || Measured latency\n"
},
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/user/simulation/parameters/src/src.rst",
"new_path": "doc/sphinx/source/user/simulation/parameters/src/src.rst",
"diff": "@@ -121,7 +121,7 @@ use with the ``USER`` source type.\nAn |ASCII| file is expected:\n-.. code-block:: console\n+.. code-block:: bash\nF\n"
},
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/user/simulation/pyber/pyber.rst",
"new_path": "doc/sphinx/source/user/simulation/pyber/pyber.rst",
"diff": "@@ -24,6 +24,6 @@ Run PyBER\nFrom your terminal, go to the folder where |PyBER| is located an run it:\n-.. code-block:: console\n+.. code-block:: bash\n- $ python pyBER.py &\n\\ No newline at end of file\n+ python pyBER.py &\n\\ No newline at end of file\n"
}
] |
C++
|
MIT License
|
aff3ct/aff3ct
|
Doc: replace '.. code-block:: console' by '.. code-block:: bash'.
|
8,483 |
29.11.2018 11:35:37
| -3,600 |
ea50e8d7a17ae22c034a80b12a349dbca4626baf
|
When using the error tracker with LDPC_DVBS2 encoder, then do not force the use of an USER encoder because it needs LDPC_DVBS2 type to generate the matrix. Add the link to the pdf of the DVBS2 standard in the DVBS2 constants
|
[
{
"change_type": "MODIFY",
"old_path": "src/Launcher/Simulation/BFER_ite.cpp",
"new_path": "src/Launcher/Simulation/BFER_ite.cpp",
"diff": "@@ -155,8 +155,11 @@ void BFER_ite<B,R,Q>\nparams.src->implem = \"STD\";\nparams.src->path = params.err_track_path + std::string(\"_$noise.src\");\n+ if (params.cdc->enc->type != \"LDPC_DVBS2\")\n+ {\nparams.cdc->enc->type = \"USER\";\nparams.cdc->enc->path = params.err_track_path + std::string(\"_$noise.enc\");\n+ }\nif (params.itl->core->uniform)\n{\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Launcher/Simulation/BFER_std.cpp",
"new_path": "src/Launcher/Simulation/BFER_std.cpp",
"diff": "@@ -158,8 +158,11 @@ void BFER_std<B,R,Q>\nparams.src->implem = \"STD\";\nparams.src->path = params.err_track_path + std::string(\"_$noise.src\");\n+ if (params.cdc->enc->type != \"LDPC_DVBS2\")\n+ {\nparams.cdc->enc->type = \"USER\";\nparams.cdc->enc->path = params.err_track_path + std::string(\"_$noise.enc\");\n+ }\nif (params.cdc->itl != nullptr && params.cdc->itl->core->uniform)\n{\n"
},
{
"change_type": "MODIFY",
"old_path": "src/Tools/Code/LDPC/Standard/DVBS2/DVBS2_constants.hpp",
"new_path": "src/Tools/Code/LDPC/Standard/DVBS2/DVBS2_constants.hpp",
"diff": "+/*\n+ * Link to the DVBS2 standard: https://www.etsi.org/deliver/etsi_en/302300_302399/30230701/01.04.01_60/en_30230701v010401p.pdf\n+ */\n+\n#ifndef DVBS2_CONSTANTS_HPP_\n#define DVBS2_CONSTANTS_HPP_\n"
}
] |
C++
|
MIT License
|
aff3ct/aff3ct
|
When using the error tracker with LDPC_DVBS2 encoder, then do not force the use of an USER encoder because it needs LDPC_DVBS2 type to generate the matrix. Add the link to the pdf of the DVBS2 standard in the DVBS2 constants
|
8,490 |
29.11.2018 13:59:11
| -3,600 |
b036438c3fabd2ff55f23c3d8fee8b9cb097a99a
|
Doc: regroup codec params in common parameters.
|
[
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/user/simulation/parameters/codec/bch/encoder.rst",
"new_path": "doc/sphinx/source/user/simulation/parameters/codec/bch/encoder.rst",
"diff": "@@ -23,27 +23,6 @@ The codeword size.\nUseful number of bit transmitted (information bits).\n-.. _enc-bch-enc-path:\n-\n-``--enc-path``\n-\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n-\n- :Type: file\n- :Rights: read only\n- :Examples: ``--enc-path example/path/to/the/right/file``\n-\n-Path to a file containing one or a set of pre-computed codewords, to use with \"\\\\-\\\\-enc-type USER\".\n-\n-.. _enc-bch-enc-start-idx:\n-\n-``--enc-start-idx``\n-\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n-\n- :Type: integer\n- :Examples: ``--enc-start-idx 1``\n-\n-Start idx to use in the USER type encoder.\n-\n.. _enc-bch-enc-type:\n``--enc-type``\n@@ -77,4 +56,23 @@ Description of the allowed values:\n.. |enc-type_descr_no| replace:: TODO VALUE NO\n.. |enc-type_descr_user| replace:: TODO VALUE USER\n+.. _enc-bch-enc-path:\n+\n+``--enc-path``\n+\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n+\n+ :Type: file\n+ :Rights: read only\n+ :Examples: ``--enc-path example/path/to/the/right/file``\n+\n+Path to a file containing one or a set of pre-computed codewords, to use with \"\\\\-\\\\-enc-type USER\".\n+\n+.. _enc-bch-enc-start-idx:\n+\n+``--enc-start-idx``\n+\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n+ :Type: integer\n+ :Examples: ``--enc-start-idx 1``\n+\n+Start idx to use in the USER type encoder.\n\\ No newline at end of file\n"
},
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/user/simulation/parameters/codec/codec.rst",
"new_path": "doc/sphinx/source/user/simulation/parameters/codec/codec.rst",
"diff": "@@ -7,6 +7,7 @@ Codec parameters\n:maxdepth: 2\n:caption: Contents\n+ common/codec\nbch/codec\nldpc/codec\npolar/codec\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "doc/sphinx/source/user/simulation/parameters/codec/common/codec.rst",
"diff": "+.. _codec-common:\n+\n+Codec Common\n+************\n+\n+.. toctree::\n+ :maxdepth: 2\n+ :caption: Contents\n+\n+ encoder.rst\n+ decoder.rst\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "doc/sphinx/source/user/simulation/parameters/codec/common/decoder.rst",
"diff": "+.. _dec-common-decoder-parameters:\n+\n+Common Decoder parameters\n+-------------------------\n+\n+This section describes the parameters common to all decoders.\n+\n+.. _dec-common-dec-type:\n+\n+``--dec-type, -D``\n+\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n+\n+ :Type: text\n+ :Allowed values: ``CHASE`` ``ML``\n+ :Examples: ``--dec-type ML``\n+\n+Select the decoder algorithm.\n+\n+Description of the allowed values:\n+\n++---------------+--------------------------------------------------------------+\n+| Value | Description |\n++===============+==============================================================+\n+| ``CHASE`` | Select the Chase decoder from :cite:`Chase1972`. |\n++---------------+--------------------------------------------------------------+\n+| ``ML`` | Select the perfect |ML| decoder. |\n++---------------+--------------------------------------------------------------+\n+\n+.. note:: The Chase and the |ML| decoders have a very high computationnal\n+ complexity and cannot be use for large frames.\n+\n+.. _dec-common-dec-implem:\n+\n+``--dec-implem``\n+\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n+\n+ :Type: text\n+ :Allowed values: ``NAIVE`` ``STD``\n+ :Examples: ``--dec-implem STD``\n+\n+Select the implementation of the algorithm to decode.\n+\n+Description of the allowed values:\n+\n++------------+---------------------------+\n+| Value | Description |\n++============+===========================+\n+| ``NAIVE`` | |dec-implem_descr_naive| |\n++------------+---------------------------+\n+| ``STD`` | |dec-implem_descr_std| |\n++------------+---------------------------+\n+\n+.. |dec-implem_descr_naive| replace:: Select the naive implementation (very\n+ slow and only available for the |ML| decoder).\n+.. |dec-implem_descr_std| replace:: Select the standard implementation.\n+\n+.. _dec-common-dec-flips:\n+\n+``--dec-flips``\n+\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n+\n+ :Type: integer\n+ :Examples: ``--dec-flips 1``\n+\n+Set the maximum number of bit flips in the Chase decoder.\n+\n+.. _dec-common-dec-hamming:\n+\n+``--dec-hamming``\n+\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n+\n+.. _Hamming distance: https://en.wikipedia.org/wiki/Hamming_distance\n+.. _Euclidean distance: https://en.wikipedia.org/wiki/Euclidean_distance\n+\n+Compute the `Hamming distance`_ instead of the `Euclidean distance`_ in the |ML|\n+and Chase decoders.\n+\n+References\n+\"\"\"\"\"\"\"\"\"\"\n+\n+.. bibliography:: references.bib\n\\ No newline at end of file\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "doc/sphinx/source/user/simulation/parameters/codec/common/encoder.rst",
"diff": "+.. _enc-common-encoder-parameters:\n+\n+Common Encoder parameters\n+-------------------------\n+\n+This section describes the parameters common to all encoders.\n+\n+.. _enc-common-enc-type:\n+\n+``--enc-type``\n+\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n+\n+ :Type: text\n+ :Allowed values: ``NO`` ``AZCW`` ``COSET`` ``USER``\n+ :Examples: ``--enc-type AZCW``\n+\n+Select the encoder type.\n+\n+Description of the allowed values:\n+\n++-----------+------------------------+\n+| Value | Description |\n++===========+========================+\n+| ``AZCW`` | |enc-type_descr_azcw| |\n++-----------+------------------------+\n+| ``COSET`` | |enc-type_descr_coset| |\n++-----------+------------------------+\n+| ``USER`` | |enc-type_descr_user| |\n++-----------+------------------------+\n+\n+.. |enc-type_descr_azcw| replace:: Select the |AZCW| encoder which is optimized\n+ to encode :math:`K` information bits all set to 0.\n+.. |enc-type_descr_coset| replace:: Select the coset encoder (see the\n+ :ref:`sim-sim-coset` parameter), this encoder add random bits from\n+ :math:`X_K` to :math:`X_N`.\n+.. |enc-type_descr_user| replace:: Read the codewords from a given file, the\n+ path can be set with the :ref:`enc-common-enc-path` parameter.\n+\n+.. tip:: The |AZCW| encoder allows to have a working communication chain\n+ without implementing an encoder. This technique can also reduce the\n+ simulation time especially when the *encode* task is time consuming.\n+\n+.. danger:: Be careful, the |AZCW| technique can lead to unexpected behaviors\n+ with broken decoders.\n+\n+.. note:: Only use the ``COSET`` encoder if know what you are doing. This\n+ encoder is set by default when the simulation is run with the\n+ :ref:`sim-sim-coset` parameter.\n+\n+.. note:: For the ``USER`` type, when the number of simulated frames exceeds the\n+ number of codewords contained in the files, the codewords are replayed from\n+ the beginning of the file and this is repeated until the end of the\n+ simulation.\n+\n+.. _enc-common-enc-path:\n+\n+``--enc-path``\n+\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n+\n+ :Type: file\n+ :Rights: read only\n+ :Examples: ``--enc-path example/path/to/the/right/file``\n+\n+Set the path to a file containing one or more codewords, to use with the\n+``USER`` encoder.\n+\n+An |ASCII| file is expected:\n+\n+.. code-block:: bash\n+\n+ # 'F' has to be replaced by the number of contained frames.\n+ F\n+\n+ # 'N' has to be replaced by the codeword size.\n+ N\n+\n+ # a sequence of 'F * N' bits (separated by spaces)\n+ B_0 B_1 B_2 B_3 B_4 B_5 [...] B_{(F*N)-1}\n+\n+.. _enc-common-enc-start-idx:\n+\n+``--enc-start-idx``\n+\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n+\n+ :Type: integer\n+ :Examples: ``--enc-start-idx 1``\n+\n+Give the start index to use in the ``USER`` encoder. It is the index of the\n+first codeword to read from the given file.\n\\ No newline at end of file\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "doc/sphinx/source/user/simulation/parameters/codec/common/references.bib",
"diff": "+@Article{Chase1972,\n+ author = {D. Chase},\n+ title = {Class of Algorithms for Decoding Block Codes with Channel Measurement Information},\n+ journal = {IEEE Transactions on Information Theory (TIT)},\n+ year = {1972},\n+ volume = {18},\n+ number = {1},\n+ pages = {170--182},\n+ month = jan,\n+ issn = {0018-9448},\n+ abstract = {A class of decoding algorithms that utilizes channel measurement information, in addition to the conventional use of the algebraic properties of the code, is presented. The maximum number of errors that can, with high probability, be corrected is equal to one less thand, the minimum Hamming distance of the code. This two-fold increase over the error-correcting capability of a conventional binary decoder is achieved by using channel measurement (soft-decision) information to provide a measure of the relative reliability of each of the received binary digits. An upper bound on these decoding algorithms is derived, which is proportional to the probability of an error fordth order diversity, an expression that has been evaluated for a wide range of communication channels and modulation techniques. With the aid of a lower bound on these algorithms, which is also a lower bound on a correlation (maximum-likelihood) decoder, we show for both the Gaussian and Rayleigh fading channels, that as the signal-to-noise ratio (SNR) increases, the asymptotic behavior of these decoding algorithms cannot be improved. Computer simulations indicate that even for !ow SNR the performance of a correlation decoder can be approached by relatively simple decoding procedures. In addition, we study the effect on the performance of these decoding algorithms when a threshold is used to simplify the decoding process.},\n+ doi = {10.1109/TIT.1972.1054746},\n+ file = {:pdf/Chase1972 - Class of Algorithms for Decoding Block Codes with Channel Measurement Information.pdf:PDF},\n+ groups = {Error-Correcting Codes (ECC)},\n+ keywords = {Block codes, Decoding},\n+}\n\\ No newline at end of file\n"
}
] |
C++
|
MIT License
|
aff3ct/aff3ct
|
Doc: regroup codec params in common parameters.
|
8,490 |
29.11.2018 15:38:02
| -3,600 |
92ff7b5916973f1f167ca3e4829e9e4342332c63
|
Doc: add a note when usign Hamming distance.
|
[
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/user/simulation/parameters/codec/common/decoder.rst",
"new_path": "doc/sphinx/source/user/simulation/parameters/codec/common/decoder.rst",
"diff": "@@ -75,6 +75,10 @@ Set the maximum number of bit flips in the Chase decoder.\nCompute the `Hamming distance`_ instead of the `Euclidean distance`_ in the |ML|\nand Chase decoders.\n+.. note:: Using the `Hamming distance`_ will heavily degrade the |BFER|\n+ performances. The |BFER| performances will be the same as an hard input\n+ decoder.\n+\nReferences\n\"\"\"\"\"\"\"\"\"\"\n"
}
] |
C++
|
MIT License
|
aff3ct/aff3ct
|
Doc: add a note when usign Hamming distance.
|
8,490 |
29.11.2018 15:48:03
| -3,600 |
7b974c24c0acdfcaab9003d20c9026c05c80b21c
|
Doc: BCH with refs to the common section.
|
[
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/user/simulation/parameters/codec/bch/decoder.rst",
"new_path": "doc/sphinx/source/user/simulation/parameters/codec/bch/decoder.rst",
"diff": "Decoder parameters\n------------------\n-.. _dec-bch-dec-corr-pow:\n-\n-``--dec-corr-pow, -T``\n-\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n-\n- :Type: integer\n- :Examples: ``--dec-corr-pow 1``\n-\n-Correction power of the BCH code.\n-\n-.. _dec-bch-dec-flips:\n-\n-``--dec-flips``\n-\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n+.. _dec-bch-dec-type:\n- :Type: integer\n- :Examples: ``--dec-flips 1``\n+``--dec-type, -D``\n+\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n-Set the maximum number of flips in the CHASE decoder.\n+ :Type: text\n+ :Allowed values: ``ALGEBRAIC`` ``CHASE`` ``ML``\n+ :Examples: ``--dec-type ALGEBRAIC``\n-.. _dec-bch-dec-hamming:\n+Select the algorithm you want to decode the codeword.\n-``--dec-hamming``\n-\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n+Description of the allowed values:\n++---------------+----------------------------+\n+| Value | Description |\n++===============+============================+\n+| ``ALGEBRAIC`` | |dec-type_descr_algebraic| |\n++---------------+----------------------------+\n+| ``CHASE`` | |dec-type_descr_chase| |\n++---------------+----------------------------+\n+| ``ML`` | |dec-type_descr_ml| |\n++---------------+----------------------------+\n-Enable the computation of the Hamming distance instead of the Euclidean distance in the ML/CHASE decoders.\n+.. |dec-type_descr_algebraic| replace:: Select the BCH algebraic decoder.\n+.. |dec-type_descr_chase| replace:: See the common :ref:`dec-common-dec-type`\n+ parameter.\n+.. |dec-type_descr_ml| replace:: See the common :ref:`dec-common-dec-type`\n+ parameter.\n.. _dec-bch-dec-implem:\n@@ -37,7 +38,7 @@ Enable the computation of the Hamming distance instead of the Euclidean distance\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n:Type: text\n- :Allowed values: ``FAST`` ``GENIUS`` ``NAIVE`` ``STD``\n+ :Allowed values: ``FAST`` ``GENIUS`` ``STD``\n:Examples: ``--dec-implem FAST``\nSelect the implementation of the algorithm to decode.\n@@ -47,46 +48,23 @@ Description of the allowed values:\n+------------+---------------------------+\n| Value | Description |\n+============+===========================+\n+| ``STD`` | |dec-implem_descr_std| |\n++------------+---------------------------+\n| ``FAST`` | |dec-implem_descr_fast| |\n+------------+---------------------------+\n| ``GENIUS`` | |dec-implem_descr_genius| |\n+------------+---------------------------+\n-| ``NAIVE`` | |dec-implem_descr_naive| |\n-+------------+---------------------------+\n-| ``STD`` | |dec-implem_descr_std| |\n-+------------+---------------------------+\n+.. |dec-implem_descr_std| replace:: TODO VALUE STD\n.. |dec-implem_descr_fast| replace:: TODO VALUE FAST\n.. |dec-implem_descr_genius| replace:: TODO VALUE GENIUS\n-.. |dec-implem_descr_naive| replace:: TODO VALUE NAIVE\n-.. |dec-implem_descr_std| replace:: TODO VALUE STD\n-\n-\n-.. _dec-bch-dec-type:\n-\n-``--dec-type, -D``\n-\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n-\n- :Type: text\n- :Allowed values: ``ALGEBRAIC`` ``CHASE`` ``ML``\n- :Examples: ``--dec-type ALGEBRAIC``\n-\n-Select the algorithm you want to decode the codeword.\n-\n-Description of the allowed values:\n-+---------------+----------------------------+\n-| Value | Description |\n-+===============+============================+\n-| ``ALGEBRAIC`` | |dec-type_descr_algebraic| |\n-+---------------+----------------------------+\n-| ``CHASE`` | |dec-type_descr_chase| |\n-+---------------+----------------------------+\n-| ``ML`` | |dec-type_descr_ml| |\n-+---------------+----------------------------+\n+.. _dec-bch-dec-corr-pow:\n-.. |dec-type_descr_algebraic| replace:: TODO VALUE ALGEBRAIC\n-.. |dec-type_descr_chase| replace:: TODO VALUE CHASE\n-.. |dec-type_descr_ml| replace:: TODO VALUE ML\n+``--dec-corr-pow, -T``\n+\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n+ :Type: integer\n+ :Examples: ``--dec-corr-pow 1``\n+Correction power of the BCH code.\n\\ No newline at end of file\n"
},
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/user/simulation/parameters/codec/bch/encoder.rst",
"new_path": "doc/sphinx/source/user/simulation/parameters/codec/bch/encoder.rst",
"diff": "@@ -39,40 +39,19 @@ Description of the allowed values:\n+-----------+------------------------+\n| Value | Description |\n+===========+========================+\n-| ``AZCW`` | |enc-type_descr_azcw| |\n-+-----------+------------------------+\n| ``BCH`` | |enc-type_descr_bch| |\n+-----------+------------------------+\n-| ``COSET`` | |enc-type_descr_coset| |\n+| ``AZCW`` | |enc-type_descr_azcw| |\n+-----------+------------------------+\n-| ``NO`` | |enc-type_descr_no| |\n+| ``COSET`` | |enc-type_descr_coset| |\n+-----------+------------------------+\n| ``USER`` | |enc-type_descr_user| |\n+-----------+------------------------+\n-.. |enc-type_descr_azcw| replace:: TODO VALUE AZCW\n-.. |enc-type_descr_bch| replace:: TODO VALUE BCH\n-.. |enc-type_descr_coset| replace:: TODO VALUE COSET\n-.. |enc-type_descr_no| replace:: TODO VALUE NO\n-.. |enc-type_descr_user| replace:: TODO VALUE USER\n-\n-.. _enc-bch-enc-path:\n-\n-``--enc-path``\n-\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n-\n- :Type: file\n- :Rights: read only\n- :Examples: ``--enc-path example/path/to/the/right/file``\n-\n-Path to a file containing one or a set of pre-computed codewords, to use with \"\\\\-\\\\-enc-type USER\".\n-\n-.. _enc-bch-enc-start-idx:\n-\n-``--enc-start-idx``\n-\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n-\n- :Type: integer\n- :Examples: ``--enc-start-idx 1``\n-\n-Start idx to use in the USER type encoder.\n\\ No newline at end of file\n+.. |enc-type_descr_bch| replace:: Select the standard BCH encoder.\n+.. |enc-type_descr_azcw| replace:: See the common :ref:`enc-common-enc-type`\n+ parameter.\n+.. |enc-type_descr_coset| replace:: See the common :ref:`enc-common-enc-type`\n+ parameter.\n+.. |enc-type_descr_user| replace:: See the common :ref:`enc-common-enc-type`\n+ parameter.\n\\ No newline at end of file\n"
}
] |
C++
|
MIT License
|
aff3ct/aff3ct
|
Doc: BCH with refs to the common section.
|
8,483 |
29.11.2018 16:02:26
| -3,600 |
4dd60b503a07944d0ecfe4c539f2b264ed889980
|
Doc: Add details about the BCH Codec
|
[
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/user/simulation/parameters/codec/bch/codec.rst",
"new_path": "doc/sphinx/source/user/simulation/parameters/codec/bch/codec.rst",
"diff": ".. _codec-bch:\n-Codec BCH\n-*********\n+Codec |BCH|\n+***********\n.. toctree::\n:maxdepth: 2\n"
},
{
"change_type": "MODIFY",
"old_path": "doc/sphinx/source/user/simulation/parameters/codec/turbo_prod/decoder.rst",
"new_path": "doc/sphinx/source/user/simulation/parameters/codec/turbo_prod/decoder.rst",
"diff": "@@ -122,6 +122,7 @@ Description of the allowed values:\n:Type: text\n:Allowed values: ``FAST`` ``NAIVE`` ``STD``\n+ :Default: ``STD``\n:Examples: ``--dec-implem STD``\nSelect the implementation of the algorithm to decode.\n@@ -269,25 +270,6 @@ Enable the computation of the Hamming distance instead of the Euclidean distance\nGive the correction power of the BCH sub-decoder.\n-.. _dec-turbo_prod-dec-sub-flips:\n-\n-``--dec-sub-flips``\n-\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n-\n- :Type: integer\n- :Examples: ``--dec-sub-flips 1``\n-\n-Set the maximum number of flips in the CHASE decoder.\n-\n-.. _dec-turbo_prod-dec-sub-hamming:\n-\n-``--dec-sub-hamming``\n-\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n-\n-\n-Enable the computation of the Hamming distance instead of the Euclidean distance\n-in the ML/CHASE decoders.\n-\n.. _dec-turbo_prod-dec-sub-implem:\n``--dec-sub-implem``\n@@ -349,6 +331,25 @@ Description of the allowed values:\n.. TODO : remove those arguments in the code\n+ .. _dec-turbo_prod-dec-sub-flips:\n+\n+ ``--dec-sub-flips``\n+ \"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n+\n+ :Type: integer\n+ :Examples: ``--dec-sub-flips 1``\n+\n+ Set the maximum number of flips in the ``CHASE`` sub-decoder.\n+\n+ .. _dec-turbo_prod-dec-sub-hamming:\n+\n+ ``--dec-sub-hamming``\n+ \"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n+\n+\n+ Enable the computation of the Hamming distance instead of the Euclidean distance\n+ in the ``ML``/``CHASE`` sub-decoders.\n+\n.. _dec-turbo_prod-dec-sub-cw-size:\n``--dec-sub-cw-size, -N`` |image_required_argument|\n"
}
] |
C++
|
MIT License
|
aff3ct/aff3ct
|
Doc: Add details about the BCH Codec
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.