Fastor 项目使用教程
fastorPython服务端开发框架-极易上手,超出你的想象!项目地址:https://gitcode.com/gh_mirrors/fas/fastor
1. 项目的目录结构及介绍
Fastor 项目的目录结构如下:
fastor/
├── benchmark/
├── data/
├── docs/
│ └── imgs/
├── tests/
├── appveyor.yml
├── .gitignore
├── .travis.yml
├── CMakeLists.txt
├── LICENSE
├── README.md
└── library.json
目录介绍
benchmark/
: 包含性能测试相关的文件。data/
: 包含项目所需的数据文件。docs/
: 包含项目文档,特别是imgs/
目录下存放文档中的图片。tests/
: 包含项目的测试文件。appveyor.yml
: AppVeyor 持续集成配置文件。.gitignore
: Git 忽略文件配置。.travis.yml
: Travis CI 持续集成配置文件。CMakeLists.txt
: CMake 构建配置文件。LICENSE
: 项目许可证文件。README.md
: 项目说明文档。library.json
: 项目依赖库配置文件。
2. 项目的启动文件介绍
Fastor 项目的启动文件主要是 CMakeLists.txt
。这个文件定义了项目的构建过程,包括编译选项、链接库、源文件等。
CMakeLists.txt 主要内容
cmake_minimum_required(VERSION 3.0)
project(Fastor)
# 设置编译选项
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
# 添加源文件
file(GLOB_RECURSE SOURCES "*.cpp" "*.h")
# 添加可执行文件
add_executable(fastor ${SOURCES})
# 链接库
target_link_libraries(fastor ${LINK_LIBRARIES})
3. 项目的配置文件介绍
Fastor 项目的配置文件主要包括 library.json
和 appveyor.yml
。
library.json
library.json
文件定义了项目的依赖库和其他配置信息。
{
"name": "Fastor",
"version": "1.0.0",
"description": "A high performance tensor algebra framework for modern C++",
"dependencies": {
"boost": "^1.70.0"
}
}
appveyor.yml
appveyor.yml
文件定义了 AppVeyor 持续集成服务的配置。
version: 1.0.{build}
image: Visual Studio 2019
branches:
only:
- master
install:
- ps: Install-Product node 12
build_script:
- cmd: cmake -B build -S .
- cmd: cmake --build build --config Release
test_script:
- cmd: cmake --build build --target test
以上是 Fastor 项目的基本使用教程,涵盖了项目的目录结构、启动文件和配置文件的介绍。希望这些信息能帮助你更好地理解和使用 Fastor 项目。
fastorPython服务端开发框架-极易上手,超出你的想象!项目地址:https://gitcode.com/gh_mirrors/fas/fastor