diff --git a/RELEASES.md b/RELEASES.md index 7b03becf4..02554bdb9 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -14,6 +14,8 @@ Breaking Changes wrap their return value in an `ocl::Result`. * `Device::max_wg_size` now returns an `ocl::Result` instead of panicing. * `ProQue::max_wg_size` now returns an `ocl::Result` instead of panicing. +* [ocl-core]: `::create_context` has had it's signature changed. The + `properties` argument is now an `Option<&ContextProperties>`. Version 0.11.0 (2016-08-29) diff --git a/examples/trivial.rs b/examples/trivial.rs index 516a619f4..d1a111701 100644 --- a/examples/trivial.rs +++ b/examples/trivial.rs @@ -184,7 +184,7 @@ fn main_cored() { let device_ids = core::get_device_ids(&platform_id, None, None).unwrap(); let device_id = device_ids[0]; let context_properties = ContextProperties::new().platform(platform_id); - let context = core::create_context(&Some(context_properties), + let context = core::create_context(Some(&context_properties), &[device_id], None, None).unwrap(); let src_cstring = CString::new(src).unwrap(); let program = core::create_program_with_source(&context, &[src_cstring]).unwrap(); diff --git a/src/standard/context.rs b/src/standard/context.rs index ced1aeb5e..58395480f 100644 --- a/src/standard/context.rs +++ b/src/standard/context.rs @@ -174,7 +174,7 @@ impl Context { let device_list = try!(device_spec.to_device_list(platform.as_ref())); - let obj_core = try!(core::create_context(&properties, &device_list, pfn_notify, user_data)); + let obj_core = try!(core::create_context(properties.as_ref(), &device_list, pfn_notify, user_data)); Ok(Context { obj_core: obj_core, diff --git a/src/tests/buffer_copy.rs b/src/tests/buffer_copy.rs index 4c6994f8d..5442efdfe 100644 --- a/src/tests/buffer_copy.rs +++ b/src/tests/buffer_copy.rs @@ -22,7 +22,7 @@ fn buffer_copy_core() { let device_ids = core::get_device_ids(&platform_id, None, None).unwrap(); let device_id = device_ids[0]; let context_properties = ContextProperties::new().platform(platform_id); - let context = core::create_context(&Some(context_properties), + let context = core::create_context(Some(&context_properties), &[device_id], None, None).unwrap(); let src_cstring = CString::new(src).unwrap(); let program = core::create_program_with_source(&context, &[src_cstring]).unwrap();