Comments (6)
Thank you for raising this issue Jonas. Please can you provide an example?
from cl3.
use cl3::device::*;
let id = get_platform_ids().unwrap().pop().unwrap();
use cl3::platform::get_platform_ids;
let devs = &get_device_ids(id, CL_DEVICE_TYPE_DEFAULT) .unwrap()[..1];
use cl3::context::create_context;
use std::ptr::{null, null_mut};
let ctx = create_context(devs, null(), None, null_mut()).unwrap();
use cl3::program::*;
const SRC : &'static str = "__kernel void func(){}";
let program = create_program_with_source(ctx, &[SRC]).unwrap();
use std::ffi::CString;
let no_options = CString::new("").unwrap();
compile_program(program, devs, &no_options, &[], &[], None, null_mut()).unwrap();`
In this example, compile_program can return Err(-30), which is CL_INVALID_VALUE.
This occurs due to the two empty slices not necessarily pointing to address 0,
compile_program can return CL_INVALID_VALUE if, and I quote "num_input_headers is zero and header_include_names or input_headers are not NULL".
cl3::program::link_program also suffers from the same problem
from cl3.
I've fixed the empty slice issue in compile_program
and added an assertion to ensure that the input_headers
slice and header_include_names
slice are the same length.
As for link_program
, it doesn't make sense to call it with an empty input_programs
slice, so I've added an assertion.
The changes are in the develop
branch. Please let me know if there are any other issues.
from cl3.
I can see enqueue_nd_range_kernel suffers from the same problem regarding events
from cl3.
Sorry Jonas, but I can't see a problem with enqueue_nd_range_kernel
events. They are just passed in as number and pointer parameters.
In the opencl crate, the events
parameter is passed in as a slice, however, that code checks for an empty list like compile_program
does now.
Any other issues?
from cl3.
Incorporated in version 0.6.5.
from cl3.
Related Issues (20)
- Update for latest OpenCL-Headers HOT 1
- InfoType::to_string shadows the implementation of `Display` HOT 1
- Use From trait for `conversions HOT 1
- Remove `Info` enums to support new OpenCL versions and extensions. HOT 1
- Add UUID and LUID types to InfoType HOT 1
- Don't panic if UUIDs or LUIDs are wrong size HOT 2
- Add external memory, external semaphore, and semaphore provisional extensions HOT 1
- Add provisional command-buffer extension HOT 1
- update headers for cl_intel_unified_shared_memory HOT 1
- Add definitions for cl_arm_protected_memory_allocation HOT 1
- Add cl_intel_mem_alloc_buffer_location property HOT 1
- Base `cl3` on a fork of `cl-sys` as it is no longer actively maintained. HOT 3
- Put deprecation notices behind conditional attributes HOT 1
- Add cl_ext_image_requirements_info extension definition HOT 1
- Declare OpenCL release_* and retain_* functions unsafe HOT 1
- Declare OpenCL functions that can lead to undefined behaviour as unsafe HOT 7
- Add definitions for cl_khr_command_buffer_mutable_dispatch HOT 1
- Update with new functions in OpenCL-Headers repo HOT 1
- Define function types for prototype declaration HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cl3.