Commit aea5fc08 authored by tqcq's avatar tqcq
Browse files

init repo.

parents
Loading
Loading
Loading
Loading

.clang-format

0 → 100644
+78 −0
Original line number Diff line number Diff line
# Generated from CLion C/C++ Code Style settings
BinPackParameters: false
BasedOnStyle: LLVM
AccessModifierOffset: -4
AlignArrayOfStructures: Left
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments:
  Enabled: true
  AcrossEmptyLines: true
  AcrossComments: false

AlignOperands: DontAlign
AllowAllArgumentsOnNextLine: false
AllowAllConstructorInitializersOnNextLine: false
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: Always
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: All
AllowShortIfStatementsOnASingleLine: true
AllowShortLambdasOnASingleLine: All
AllowShortLoopsOnASingleLine: true
AlwaysBreakTemplateDeclarations: Yes
# 函数和返回类型分两行,方便阅读
AlwaysBreakAfterReturnType: TopLevelDefinitions
BreakBeforeBraces: Custom
BraceWrapping:
  AfterCaseLabel: false
  AfterClass: false
  AfterControlStatement: Never
  AfterEnum: false
  AfterFunction: true
  AfterNamespace: false
  AfterUnion: false
  BeforeCatch: false
  BeforeElse: false
  IndentBraces: false
  SplitEmptyFunction: false
  SplitEmptyRecord: true
BreakBeforeBinaryOperators: NonAssignment
BreakBeforeTernaryOperators: true
BreakConstructorInitializers: BeforeColon
ConstructorInitializerAllOnOneLineOrOnePerLine: true
BreakInheritanceList: BeforeColon
ColumnLimit: 120
CompactNamespaces: false
ContinuationIndentWidth: 4
EmptyLineBeforeAccessModifier: LogicalBlock
SeparateDefinitionBlocks: Always
IndentCaseLabels: false
IndentPPDirectives: None
IndentWidth: 4
KeepEmptyLinesAtTheStartOfBlocks: true
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: false
PointerAlignment: Right
ReflowComments: false
SortIncludes: CaseSensitive
SpaceAfterCStyleCast: true
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeCpp11BracedList: false
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
SpaceBeforeRangeBasedForLoopColon: true
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 0
SpacesInAngles: false
SpacesInCStyleCastParentheses: false
SpacesInContainerLiterals: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
TabWidth: 4
UseTab: Never
PenaltyIndentedWhitespace: 1

.gitattributes

0 → 100644
+4 −0
Original line number Diff line number Diff line
*.gz filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.jpeg filter=lfs diff=lfs merge=lfs -text
*.jpg filter=lfs diff=lfs merge=lfs -text
+50 −0
Original line number Diff line number Diff line
name: android
on: 
  push:
    paths: 
      - ".github/workflows/android.yml"
      - "cmake/**"
      - "CMakeLists.txt"
      - "tile/**"
      - "third_party/**"
  
  pull_request:
    paths: 
      - ".github/workflows/android.yml"
      - "cmake/**"
      - "CMakeLists.txt"
      - "tile/**"
      - "third_party/**"
  
concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

jobs:
  build:
    runs-on: ubuntu-20.04
    strategy:
      matrix:
        build_arch: ["armeabi-v7a", "arm64-v8a", "x86", "x86_64"]
    env:
      TILE_CMAKE_OPTIONS: |
        -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_LATEST_HOME/build/cmake/android.toolchain.cmake \
        -DANDROID_PLATFORM=android-21 \
        -DCMAKE_INSTALL_PREFIX=install \
        -DCMAKE_BUILD_TYPE=Release \
        -DNCNN_VULKAN=ON \

    steps:
    - uses: actions/checkout@v4
      with: 
        submodules: true
    - name: install-tools
      run: |
        apt-get update -y
        apt-get install -y ninja-build

    - name: build
      run: |
        mkdir build && cd build
        cmake -GNinja .. ${{ env.TILE_CMAKE_OPTIONS}} -DCMAKE_ABI="${{matrix.build_arch}}" -DANDROID_ARM_NEON=ON 
        cmake --build . -j $(nproc)
+58 −0
Original line number Diff line number Diff line
---
name: linux-aarch64-cpu-gcc
on:
  push:
    paths:
      - ".gitea/workflows/linux-aarch64-gcc.yml"
      - "cmake/**"
      - "toolchains/aarch64-linux-gnu.toolchain.cmake"
      - "third_party/**"
      - "tile/**"
      - "!tile/fiber/detail/asm/*"
      - "tile/fiber/detail/asm/ucontext_aarch64.*"
      - "CMakeLists.txt"
      - "cmake/**"
  pull_request:
    paths:
      - ".gitea/workflows/linux-aarch64-gcc.yml"
      - "cmake/**"
      - "toolchains/aarch64-linux-gnu.toolchain.cmake"
      - "third_party/**"
      - "tile/**"
      - "!tile/fiber/detail/asm/*"
      - "tile/fiber/detail/asm/ucontext_aarch64.*"
      - "CMakeLists.txt"
      - "cmake/**"
concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true
permissions:
  contents: read
jobs:
  linux-gcc-aarch64:
    runs-on: ubuntu-20.04
    strategy:
      matrix:
        build_type: ["Debug", "Release"]
    steps:
      - uses: actions/checkout@v4
        with:
          submodules: recursive
      - name: install-tools
        run: |
          sudo apt-get update -y
          sudo apt-get install -y g++-aarch64-linux-gnu qemu-user-binfmt ninja-build
      - name: configure
        run: |
          mkdir build && cd build
          cmake -GNinja -DCMAKE_TOOLCHAIN_FILE=../toolchains/aarch64-linux-gnu.toolchain.cmake -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DTILE_BUILD_TESTS=ON -DTILE_BUILD_BENCHMARKS=ON ..
      - name: build 
        run: |
          cd build
          cmake --build . -j $(nproc)
      - name: test
        run: |-
          cd build
          sudo ln -sf /usr/aarch64-linux-gnu/lib/ld-linux-aarch64.so.1 /lib/ld-linux-aarch64.so.1 
          export LD_LIBRARY_PATH=/usr/aarch64-linux-gnu/lib
          ctest --output-on-failure -j $(nproc)
+84 −0
Original line number Diff line number Diff line
---
name: linux-arm-gcc
on:
  push:
    paths:
      - .gitea/workflows/linux-arm-gcc.yml
      - "cmake/**"
      - toolchains/arm-linux-gnueabi.toolchain.cmake
      - toolchains/arm-linux-gnueabihf.toolchain.cmake
      - third_party/**
      - tile/**
      - "!tile/fiber/detail/asm/*"
      - "tile/fiber/detail/asm/ucontext_arm.*"
      - CMakeLists.txt
      - cmake/**
  pull_request:
    paths:
      - .gitea/workflows/linux-arm-gcc.yml
      - "cmake/**"
      - toolchains/arm-linux-gnueabi.toolchain.cmake
      - toolchains/arm-linux-gnueabihf.toolchain.cmake
      - third_party/**
      - tile/**
      - "!tile/fiber/detail/asm/*"
      - "tile/fiber/detail/asm/ucontext_arm.*"
      - CMakeLists.txt
      - cmake/**
concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true
jobs:
  linux-gcc-arm:
    runs-on: ubuntu-20.04
    strategy:
      matrix:
        build_type: ["Debug", "Release"]
    steps:
      - uses: actions/checkout@v4
      - name: install-tools
        run: |
          sudo apt-get update -y
          sudo apt-get install -y g++-arm-linux-gnueabi qemu-user-binfmt ninja-build
      - name: configure
        run: |
          mkdir build && cd build
          cmake -GNinja -DCMAKE_TOOLCHAIN_FILE=../toolchains/arm-linux-gnueabi.toolchain.cmake -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DTILE_BUILD_TESTS=ON -DTILE_BUILD_TESTS=ON ..
      - name: build
        run: |
          cd build
          cmake --build . -j $(nproc)
      - name: test
        run: |
          cd build
          sudo ln -sf /usr/arm-linux-gnueabi/lib/ld-linux.so.3 /lib/ld-linux.so.3
          export LD_LIBRARY_PATH=/usr/arm-linux-gnueabi/lib
          ctest --output-on-failure -j $(nproc)

  linux-gcc-armhf:
    runs-on: ubuntu-20.04
    strategy:
      matrix:
        build_type: ["Debug", "Release"]
    steps:
      - uses: actions/checkout@v4
        with:
          submodules: recursive
      - name: arm-gnu-toolchain
        run: |
          sudo apt-get update -y
          sudo apt-get install -y g++-arm-linux-gnueabihf qemu-user-binfmt ninja-build
      - name: configure
        run: |
          mkdir build && cd build
          cmake -GNinja -DCMAKE_TOOLCHAIN_FILE=../toolchains/arm-linux-gnueabihf.toolchain.cmake -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DTILE_BUILD_TESTS=ON -DTILE_BUILD_BENCHMARKS=ON ..
      - name: build
        run: |
          cd build
          cmake --build . -j $(nproc)
      - name: test
        run: |-
          cd build
          sudo ln -sf /usr/arm-linux-gnueabihf/lib/ld-linux-armhf.so.3 /lib/ld-linux-armhf.so.3
          export LD_LIBRARY_PATH=/usr/arm-linux-gnueabihf/lib/
          ctest --output-on-failure -j $(nproc)
Loading