From 920a6729577d14ba9190abcb3a2c4087652228a4 Mon Sep 17 00:00:00 2001 From: Dennis Kobert Date: Sat, 4 Jan 2020 08:13:54 +0100 Subject: Add profiling extend gpu support --- src/solvers/ocl.rs | 29 ----------------------------- 1 file changed, 29 deletions(-) delete mode 100644 src/solvers/ocl.rs (limited to 'src/solvers/ocl.rs') diff --git a/src/solvers/ocl.rs b/src/solvers/ocl.rs deleted file mode 100644 index 7c6bb16..0000000 --- a/src/solvers/ocl.rs +++ /dev/null @@ -1,29 +0,0 @@ -use ocl::ProQue; - -pub fn trivial() -> ocl::Result<()> { - let src = r#" - __kernel void add(__global float* buffer, float scalar) { - buffer[get_global_id(0)] += scalar; - } - "#; - - let pro_que = ProQue::builder().src(src).dims(1 << 20).build()?; - - let buffer = pro_que.create_buffer::()?; - - let kernel = pro_que - .kernel_builder("add") - .arg(&buffer) - .arg(10.0f32) - .build()?; - - unsafe { - kernel.enq()?; - } - - let mut vec = vec![0.0f32; buffer.len()]; - buffer.read(&mut vec).enq()?; - - println!("The value at index [{}] is now '{}'!", 200007, vec[200007]); - Ok(()) -} -- cgit v1.2.3-70-g09d2