Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "clblast-rs/vcpkg"]
path = clblast-rs/vcpkg
url = https://github.com/microsoft/vcpkg
1 change: 1 addition & 0 deletions clblast-rs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
target/
171 changes: 171 additions & 0 deletions clblast-rs/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions clblast-rs/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[package]
name = "clblast-rs"
version = "0.1.0"
edition = "2024"

[build-dependencies]
vcpkg = "0.2.15"

[dependencies]
opencl3 = "0.12.3"
25 changes: 25 additions & 0 deletions clblast-rs/build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
fn main() {
let mut config = vcpkg::Config::new();

if std::env::var("VCPKG_ROOT").is_err() {
println!("cargo:warning=VCPKG_ROOT is not set. Please set it to the path of your vcpkg installation.");
}

unsafe {
std::env::set_var("VCPKGRS_DYNAMIC", "1"); // DLL 読み込み許可
}

let target = std::env::var("TARGET").unwrap_or_default();
let triplet = match target.as_str() {
"x86_64-pc-windows-msvc" => "x64-windows",
"i686-pc-windows-msvc" => "x86-windows",
"aarch64-pc-windows-msvc" => "arm64-windows",
_ => "x64-windows",
};

config.target_triplet(triplet);

if let Err(e) = config.probe("clblast") { // CLBlast 探索
panic!("Failed to find clblast with vcpkg. Error: {}", e);
}
}
Empty file added clblast-rs/docs/new.md
Empty file.
Loading
Loading