Skip to content

Commit

Permalink
core::create_context signature change. [BREAKING]
Browse files Browse the repository at this point in the history
  • Loading branch information
c0gent committed Sep 19, 2016
1 parent 2a9190b commit 6197549
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions RELEASES.md
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion examples/trivial.rs
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion src/standard/context.rs
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/tests/buffer_copy.rs
Expand Up @@ -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();
Expand Down

0 comments on commit 6197549

Please sign in to comment.