Skip to content

Commit 83a7fb8

Browse files
nodeSpace9prady9
authored andcommitted
Set OpenCL backend for opencl interop example
1 parent 9334199 commit 83a7fb8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

opencl-interop/examples/ocl_af_app.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ use arrayfire as af;
55
use ocl_core::{ContextProperties, Event};
66

77
fn main() {
8+
// Set the arrayfire backend to use OopenCL first, because CUDA is the default
9+
af::set_backend(af::Backend::OPENCL);
10+
811
// Choose platform & device(s) to use. Create a context, queue,
912
let platform_id = ocl_core::default_platform().unwrap();
1013
let device_ids = ocl_core::get_device_ids(&platform_id, None, None).unwrap();

0 commit comments

Comments
 (0)