Skip to content

Commit

Permalink
init v_0_1_4
Browse files Browse the repository at this point in the history
  • Loading branch information
azimafroozeh committed Jun 11, 2024
0 parents commit 1fe02a1
Show file tree
Hide file tree
Showing 581 changed files with 356,274 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
BasedOnStyle: LLVM
TabWidth: 4
IndentWidth: 4
UseTab: ForIndentation
DerivePointerAlignment: false
PointerAlignment: Left
AlignConsecutiveMacros: AcrossEmptyLinesAndComments
AlignAfterOpenBracket: Align
AlignTrailingComments: true
AlignConsecutiveDeclarations: Consecutive
AlignConsecutiveAssignments: Consecutive
AllowAllArgumentsOnNextLine: true
AllowAllConstructorInitializersOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: true
SpaceBeforeCpp11BracedList: true
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpacesInAngles: false
SpacesInCStyleCastParentheses: false
SpacesInConditionalStatement: false
AllowShortLambdasOnASingleLine: Inline
AllowShortLoopsOnASingleLine: false
AlwaysBreakTemplateDeclarations: Yes
ColumnLimit: 120
IncludeBlocks: Merge
SortIncludes: CaseSensitive
Language: Cpp
AccessModifierOffset: -4
BreakConstructorInitializers: BeforeComma
AllowShortBlocksOnASingleLine: Always
AllowShortFunctionsOnASingleLine: All
AllowShortIfStatementsOnASingleLine: true
CompactNamespaces: true
BinPackArguments: false
BinPackParameters: false

101 changes: 101 additions & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
Checks: '-*,
clang-diagnostic-*,
performance-*,
performance-inefficient-vector-operation,
cert-*,
portability-restrict-system-includes,
modernize-deprecated-ios-base-aliases,
modernize-loop-convert,
modernize-make-shared,
modernize-make-unique,
modernize-pass-by-value,
modernize-raw-string-literal,
modernize-redundant-void-arg,
modernize-replace-auto-ptr,
modernize-replace-disallow-copy-and-assign-macro,
modernize-return-braced-init-list,
modernize-use-auto,
modernize-use-bool-literals,
modernize-use-equals-default,
modernize-use-emplace,
modernize-use-equals-delete,
modernize-use-noexcept,
modernize-use-nullptr,
modernize-use-override,
modernize-use-using,
google-explicit-constructor,
google-build-using-namespace,
google-runtime-int,
misc-definitions-in-headers,
-bugprone-macro-parentheses,
readability-braces-around-statements,
-bugprone-branch-clone,
readability-identifier-naming,
hicpp-exception-baseclass,
misc-throw-by-value-catch-by-reference,
-bugprone-signed-char-misuse,
-bugprone-misplaced-widening-cast,
-bugprone-sizeof-expression,
-bugprone-narrowing-conversions,
google-global-names-in-headers,
llvm-header-guard,
misc-definitions-in-headers,
readability-container-size-empty'
WarningsAsErrors: '*'
AnalyzeTemporaryDtors: false
FormatStyle: none

ExtraArgs:
# clang-tidy 17 started to complain (for unknown reasons) that various pragmas are unknown ("clang-diagnostic-unknown-pragmas").
# This is technically a compiler error, not a clang-tidy error. We could litter the code base with more pragmas that suppress
# this error but it is better to pass the following flag to the compiler:
- '-Wno-unknown-pragmas'
- '-Wno-unused-command-line-argument' # similar issue

CheckOptions:
- key: readability-identifier-naming.ClassCase
value: aNy_CasE
- key: readability-identifier-naming.EnumCase
value: CamelCase
- key: readability-identifier-naming.TypedefCase
value: lower_case
- key: readability-identifier-naming.TypedefSuffix
value: _t
- key: readability-identifier-naming.FunctionCase
value: aNy_CasE
- key: readability-identifier-naming.MemberCase
value: lower_case
- key: readability-identifier-naming.ParameterCase
value: lower_case
- key: readability-identifier-naming.ConstantCase
value: aNy_CasE
- key: readability-identifier-naming.ConstantParameterCase
value: lower_case
- key: readability-identifier-naming.NamespaceCase
value: lower_case
- key: readability-identifier-naming.MacroDefinitionCase
value: UPPER_CASE
- key: readability-identifier-naming.StaticConstantCase
value: UPPER_CASE
- key: readability-identifier-naming.ConstantMemberCase
value: aNy_CasE
- key: readability-identifier-naming.StaticVariableCase
value: UPPER_CASE
- key: readability-identifier-naming.ClassConstantCase
value: UPPER_CASE
- key: readability-identifier-naming.EnumConstantCase
value: UPPER_CASE
- key: readability-identifier-naming.ConstexprVariableCase
value: UPPER_CASE
- key: readability-identifier-naming.StaticConstantCase
value: UPPER_CASE
- key: readability-identifier-naming.TemplateTemplateParameterCase
value: UPPER_CASE
- key: readability-identifier-naming.TypeTemplateParameterCase
value: UPPER_CASE
- key: readability-identifier-naming.VariableCase
value: lower_case
- key: readability-identifier-naming.PrivateMemberPrefix
value: "m_"
- key: readability-identifier-naming.PrivateMethodCase
value: lower_case
210 changes: 210 additions & 0 deletions .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,210 @@
name: CI
run-name: ${{ github.actor }} is building

on: push

jobs:
check-format:
runs-on: [ self-hosted ]
steps:
- name: echo build
run: echo "todo"

build:
needs:
- check-format
if: github.actor == 'azimafroozeh'
strategy:
fail-fast: true
matrix:
platform: [ self-hosted, m1 , avx512 ]
BUILD_TYPE: [ Debug, Release ]
cxx: [ clang++ ]
runs-on: ${{ matrix.platform }}

steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4

- name: Make directory build
run: mkdir ${{github.workspace}}/build

- name: Configure CMake
run: cmake -S ${{github.workspace}} -B ${{github.workspace}}/build
env:
CXX: ${{ matrix.cxx }}

- name: Build
run: cmake --build ${{github.workspace}}/build -j 16

test:
needs:
- build
if: github.actor == 'azimafroozeh'
strategy:
fail-fast: true
matrix:
platform: [ self-hosted, m1, avx512 ]
BUILD_TYPE: [ Debug, Release ]
cxx: [ clang++ ]
runs-on: ${{ matrix.platform }}

steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4

- name: Make directory build
run: mkdir ${{github.workspace}}/build

- name: Configure CMake
run: cmake -DALP_BUILD_TESTING=ON -S ${{github.workspace}} -B ${{github.workspace}}/build
env:
CXX: ${{ matrix.cxx }}

- name: Build
run: cmake --build ${{github.workspace}}/build -j 16

- name: Test
working-directory: ${{github.workspace}}/build
run: ctest -j 4 --rerun-failed --output-on-failure

example:
needs:
- test
if: github.actor == 'azimafroozeh'
strategy:
fail-fast: true
matrix:
platform: [ self-hosted, m1 ]
BUILD_TYPE: [ Release ]
cc: [ clang ]
cxx: [ clang++ ]
runs-on: ${{ matrix.platform }}


steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4

- name: mkdir build
run: mkdir ${{github.workspace}}/build

- name: Configure CMake
run: cmake -DALP_BUILD_EXAMPLE=ON -S ${{github.workspace}} -B ${{github.workspace}}/build
env:
CXX: ${{ matrix.cxx }}

- name: Build
run: cmake --build ${{github.workspace}}/build -j 16

- name: run simple_compress
run: ${{github.workspace}}/build/example/simple_compress

- name: run rd_compress
run: ${{github.workspace}}/build/example/rd_compress

- name: run adaptive_compress
run: ${{github.workspace}}/build/example/adaptive_compress

benchmark:
needs:
- test
if: github.actor == 'azimafroozeh'
strategy:
fail-fast: true
matrix:
platform: [ m1 ]
BUILD_TYPE: [ Release ]
cc: [ clang ]
cxx: [ clang++ ]
runs-on: ${{ matrix.platform }}


steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4

- name: mkdir build
run: mkdir ${{github.workspace}}/build

- name: Configure CMake
run: cmake -DALP_BUILD_BENCHMARKING=ON -DALP_BUILD_TESTING=ON -DCMAKE_TOOLCHAIN_FILE=toolchain/m1.cmake -S ${{github.workspace}} -B ${{github.workspace}}/build
env:
CXX: ${{ matrix.cxx }}

- name: Build
run: cmake --build ${{github.workspace}}/build -j 16

- name: Test
working-directory: ${{github.workspace}}/build
run: ctest -j 4

# - name: run bench_alp_cutter_decode
# run: ${{github.workspace}}/build/benchmarks/bench/bench_alp_cutter_decode
#
# - name: run bench_alp_cutter_encode
# run: ${{github.workspace}}/build/benchmarks/bench/bench_alp_cutter_encode
#
# - name: run bench_alp_encode
# run: ${{github.workspace}}/build/benchmarks/bench/bench_alp_encode
#
# - name: run bench_alp_without_sampling
# run: ${{github.workspace}}/build/benchmarks/bench/bench_alp_without_sampling
#
# - name: run bench_chimp
# run: ${{github.workspace}}/build/benchmarks/bench/bench_chimp
#
# - name: run bench_chimp128
# run: ${{github.workspace}}/build/benchmarks/bench/bench_chimp128
#
# - name: run bench_gorillas
# run: ${{github.workspace}}/build/benchmarks/bench/bench_gorillas
#
# - name: run bench_patas
# run: ${{github.workspace}}/build/benchmarks/bench/bench_patas
#
# - name: run bench_zstd
# run: ${{github.workspace}}/build/benchmarks/bench/bench_zstd

full_dataset:
needs:
- test
if: github.actor == 'azimafroozeh'
strategy:
fail-fast: true
matrix:
platform: [ m1 ]
BUILD_TYPE: [ Release ]
cc: [ clang ]
cxx: [ clang++ ]
runs-on: ${{ matrix.platform }}


steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4

- name: mkdir build
run: mkdir ${{github.workspace}}/build

- name: Configure CMake
run: cmake -DALP_BUILD_BENCHMARKING=ON -DALP_BUILD_TESTING=ON -DALP_BUILD_BENCHMARKING_COMPRESSION_RATIO=ON -S ${{github.workspace}} -B ${{github.workspace}}/build
env:
CXX: ${{ matrix.cxx }}

- name: Build
run: cmake --build ${{github.workspace}}/build -j 16

- name: run alp
run: ${{github.workspace}}/build/benchmarks/bench_compression_ratio/bench_alp_compression_ratio

- name: run alp32
run: ${{github.workspace}}/build/benchmarks/bench_compression_ratio/bench_alp32_compression_ratio

- name: run zstd
run: ${{github.workspace}}/build/benchmarks/bench_compression_ratio/bench_zstd_compression_ratio




Loading

0 comments on commit 1fe02a1

Please sign in to comment.