Futhark 项目教程

随笔11小时前发布
3 0 0

Futhark 项目教程

futharkAutomatic wrapping of C headers in Nim项目地址:https://gitcode.com/gh_mirrors/fut/futhark

1. 项目的目录结构及介绍

Futhark 项目的目录结构如下:




futhark/


├── bin/


├── doc/


├── examples/


├── lib/


├── src/


├── test/


├── .gitignore


├── .travis.yml


├── CHANGELOG.md


├── CONTRIBUTING.md


├── LICENSE


├── README.md


├── futhark.cabal


├── stack.yaml

bin/: 包含可执行文件。doc/: 包含项目文档。examples/: 包含示例代码。lib/: 包含库文件。src/: 包含源代码。test/: 包含测试文件。.gitignore: Git 忽略文件配置。.travis.yml: Travis CI 配置文件。CHANGELOG.md: 变更日志。CONTRIBUTING.md: 贡献指南。LICENSE: 许可证文件。README.md: 项目说明文件。futhark.cabal: Cabal 配置文件。stack.yaml: Stack 配置文件。

2. 项目的启动文件介绍

Futhark 项目的启动文件位于 src/ 目录下。主要的启动文件是 Main.hs,它负责初始化项目并启动程序。




-- src/Main.hs


module Main where


 


import Futhark


 


main :: IO ()


main = do


    putStrLn "Starting Futhark..."


    -- 初始化代码


    putStrLn "Futhark started successfully."

3. 项目的配置文件介绍

Futhark 项目的配置文件主要包括 futhark.cabalstack.yaml

futhark.cabal

futhark.cabal 是 Cabal 的配置文件,用于定义项目的依赖、源文件、测试等。




name:                futhark


version:             0.1.0.0


synopsis:            High-performance purely functional data-parallel array programming


description:         Please see the README on GitHub at <https://github.com/PMunch/futhark>


license:             BSD3


author:              "Peter Munro"


maintainer:          "example@example.com"


copyright:           "2023 Peter Munro"


category:            Data


build-type:          Simple


extra-source-files:  README.md


cabal-version:       >=1.10


 


executable futhark


  main-is:             Main.hs


  other-modules:       Futhark


  build-depends:       base >= 4.7 && < 5


  hs-source-dirs:      src


  default-language:    Haskell2010

stack.yaml

stack.yaml 是 Stack 的配置文件,用于定义项目的构建工具链和依赖。




resolver: lts-18.0


packages:


- .


extra-deps: []


flags: {}


extra-package-dbs: []

以上是 Futhark 项目的基本教程,涵盖了项目的目录结构、启动文件和配置文件的介绍。希望对您有所帮助!

futharkAutomatic wrapping of C headers in Nim项目地址:https://gitcode.com/gh_mirrors/fut/futhark

© 版权声明

相关文章

暂无评论

您必须登录才能参与评论!
立即登录
暂无评论...