Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8d076a6

Browse files
committed
Fix opencl interop examples to use OpenCL backend always
1 parent8df6b05 commit8d076a6

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

‎opencl-interop/examples/custom_kernel.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ use ocl_core::{ArgVal, Event};
77
use std::ffi::CString;
88

99
fnmain(){
10+
// Set the arrayfire backend to use OpenCL first,
11+
// because CUDA is the automatically preferred if available
12+
af::set_backend(af::Backend::OPENCL);
13+
1014
af::info();
1115
let dims = af::dim4!(8);
1216
let af_buffer = af::constant(0f32, dims.clone());

‎opencl-interop/examples/ocl_af_app.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ use arrayfire as af;
55
use ocl_core::{ContextProperties,Event};
66

77
fnmain(){
8-
// Set the arrayfire backend to use OopenCL first, because CUDA is the default
8+
// Set the arrayfire backend to use OpenCL first,
9+
// because CUDA is the automatically preferred if available
910
af::set_backend(af::Backend::OPENCL);
1011

1112
// Choose platform & device(s) to use. Create a context, queue,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp