luqmana / rust-opencl

OpenCL bindings for Rust.
Other
170 stars 42 forks source link

Add restriction to trait KernelIndex to ensure that the trait Sizes i… #76

Closed AdamBrouwersHarries closed 9 years ago

AdamBrouwersHarries commented 9 years ago

…s implemented for Self. Fixing issue #71

This commit should fix issue #71, by forcing Self to implement the "Sized" trait. I'm fairly new to Rust, so if there's a better approach, please let me know!

eholk commented 9 years ago

Thanks! That fixed the warning for me.

AdamBrouwersHarries commented 8 years ago

Glad to help - would you mind if I dropped you an email at some point, as I'm keen to try and contribute more to the library, but there are some questions which I'd like clarified before I dive in (e.g. how much functionality do we want to provide "out of the box" vs keeping the library similar in style to "raw" opencl)

eholk commented 8 years ago

Yeah, definitely!

I'll go ahead and add my thoughts for the question you suggested. As it stands right now, the library is a kind of weird mix of low-level APIs and higher level APIs. The low level APIs should basically just be raw OpenCL wrappers that we can use to build higher level APIs on top of.

For the higher level APIs, I can see at least two levels that make sense. One would be to stick fairly close to the OpenCL paradigm, but maybe match the abstraction layer of the OpenCL C++ bindings. The second level would be something like an embedded DSL for array computing, similar to Accelerate for Haskell.

Given the fact that Cargo is much more mature than it used to be, it might make sense to split at least the very high level bindings into a separate project, and maybe even the mid level bindings as well.