Skip to content

Commit

Permalink
Merge pull request #320 from jianding17/pr-reldocs
Browse files Browse the repository at this point in the history
Pr reldocs

Former-commit-id: 5c3204d
  • Loading branch information
jianding17 authored Jul 1, 2021
2 parents 58c0b4d + 3fc909d commit a65fd2a
Show file tree
Hide file tree
Showing 15 changed files with 192 additions and 206 deletions.
33 changes: 8 additions & 25 deletions Agora_doxygen.conf
Original file line number Diff line number Diff line change
Expand Up @@ -790,7 +790,7 @@ WARN_LOGFILE =
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
# Note: If this tag is empty the current directory is searched.

INPUT =
INPUT = ./ ./README.md

# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
Expand Down Expand Up @@ -820,11 +820,6 @@ FILE_PATTERNS = *.c \
*.cxx \
*.cpp \
*.c++ \
*.java \
*.ii \
*.ixx \
*.ipp \
*.i++ \
*.inl \
*.idl \
*.ddl \
Expand All @@ -834,31 +829,16 @@ FILE_PATTERNS = *.c \
*.hxx \
*.hpp \
*.h++ \
*.cs \
*.d \
*.php \
*.php4 \
*.php5 \
*.phtml \
*.inc \
*.m \
*.markdown \
*.md \
*.mm \
*.dox \
*.py \
*.pyw \
*.f90 \
*.f95 \
*.f03 \
*.f08 \
*.f \
*.for \
*.tcl \
*.vhd \
*.vhdl \
*.ucf \
*.qsf
CONTRIBUTING.md \

# The RECURSIVE tag can be used to specify whether or not subdirectories should
# be searched for input files as well.
Expand All @@ -873,7 +853,10 @@ RECURSIVE = YES
# Note that relative paths are relative to the directory from which doxygen is
# run.

EXCLUDE =
EXCLUDE = src/third_party \
python/ \
matlab/ \
idl/

# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
# directories that are symbolic links (a Unix file system feature) are excluded
Expand Down Expand Up @@ -982,7 +965,7 @@ FILTER_SOURCE_PATTERNS =
# (index.html). This can be useful if you have a project on for instance GitHub
# and want to reuse the introduction page also for the doxygen output.

USE_MDFILE_AS_MAINPAGE =
USE_MDFILE_AS_MAINPAGE = README.md

#---------------------------------------------------------------------------
# Configuration options related to source browsing
Expand Down Expand Up @@ -1461,7 +1444,7 @@ ECLIPSE_DOC_ID = org.doxygen.Project
# The default value is: NO.
# This tag requires that the tag GENERATE_HTML is set to YES.

DISABLE_INDEX = YES
DISABLE_INDEX = NO

# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
# structure should be generated to display hierarchical information. If the tag
Expand Down
5 changes: 4 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
cmake_minimum_required(VERSION 2.8.8)
include(CheckCSourceRuns)
cmake_policy(SET CMP0054 NEW)
project(Agora)
#Allow project version
cmake_policy(SET CMP0048 NEW)
project(Agora VERSION 1.0.0)

if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 7.0)
set(GCC_COVERAGE_COMPILE_FLAGS "-faligned-new")
endif()

set(SOURCE_DIR ".")
configure_file(${CMAKE_SOURCE_DIR}/src/common/version_config.h.in ${CMAKE_SOURCE_DIR}/src/common/version_config.h)

option(FORCE_BUILD_PATH "Hardcode the build directory path to be 'Agora/build/'" ON)
if(FORCE_BUILD_PATH)
Expand Down
36 changes: 18 additions & 18 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* Format the source code using `clang-format`. Running `clang-format -i *.cc
*.h` will format source and header files in the current directory to match
Agora's code style. There are also editor plugins for `clang-format`
([example](https://github.com/google/vim_codefmt)). We recommend using clang-format version 11 or above.
([example](https://marketplace.visualstudio.com/items?itemName=xaver.clang-format)). We recommend using clang-format version 11 or above.

## Code style

Expand All @@ -34,43 +34,43 @@
For example, macros are acceptable to disable compilation of files that
depend on proprietary libraries. So instead of:

```
<pre>
#ifdef USE_LDPC
std::string raw_data_filename = x;
#else
std::string raw_data_filename = y;
#endif
```
</pre>

prefer:
```
<pre>
std::string raw_data_filename = kUseLDPC ? x : y;
```
</pre>

* Avoid magic numbers. Instead of:
```
<pre>
n_rows = (ldpc_config.bg == 1) ? 46 : 42;
```
</pre>

prefer:
```
<pre>
n_rows = (ldpc_config.bg == 1) ? kBg1RowTotal : kBg2RowTotal;
```
</pre>

* Avoid variable copies. Instead of `size_t fft_thread_num =
cfg->fft_thread_num;`, prefer using `cfg->fft_thread_num` directly.

* Use enum classes instead of enums or macros. So instead of:

```
<pre>
#define PRINT_RX_PILOTS 0
#define PRINT_RX 1
```
</pre>

prefer:
```
enum class PrintType {kRXPilots, kRX};
```
<pre>
enum class PrintType {kRXPilots, kRX};
</pre>

* Add newlines between distinct blocks of code. See the vertical whitespace
[section](https://google.github.io/styleguide/cppguide.html#Vertical_Whitespace).
Expand All @@ -91,14 +91,14 @@
C-style casts.

* Use auto type deduction when the type is clear. So instead of:
```
<pre>
struct Packet *pkt = new struct Packet[kNumPackets];
```
</pre>

prefer:
```
<pre>
auto *pkt = new Packet[kNumPackets];
```
</pre>

## Documentation requirements
* Each file must have a comment at the top explaining what the file's purpose.
Expand Down
Loading

0 comments on commit a65fd2a

Please sign in to comment.