13 个不稳定版本 (5 个重大更改)
0.6.0 | 2022年10月29日 |
---|---|
0.5.1 | 2022年5月18日 |
0.4.1 | 2021年5月1日 |
0.4.0 | 2020年9月4日 |
0.2.0 | 2019年12月7日 |
#5 in #kernels
在 2 个 crate 中使用 (通过 halide-runtime)
22KB
562 行
halide-build
Halide 过滤器的构建工具。
可以从 Rust 代码或命令行中使用。
命令行界面
要构建命令行界面,必须启用 bin
功能
$ cargo build --features=bin
构建
要从 Rust build.rs
构建内核
// Create the build context
let build = Build::new(halide_path, output_path);
// Add your source files
build.src.push("mykernel.cpp");
// Build
if build.build()? {
// Run
assert!(build.run()?);
// Link the resulting library
link_library("./libmykernel.a")
}
lib.rs
:
halide-build 用于编译 Halide 内核
依赖项
~235KB