Open c0gent opened 6 years ago
This feedback is very valuable to me. I don't get enough. I really appreciate this kind of constructive criticism.
Global:
Display
implementations
Display
impls are useful for logging, diagnostics, etc.Documentation:
Cargo.toml
file that reminds to bump the semvers of html_root_url
Buffer:
new
method
default_queue
?
::default_queue
is used to return a reference to the currently set default queue. It's useful for a variety of purposes, such as ensuring multiple tasks use the same queue without have to store the queue separately.create_sub_buffer
don't use SpatialDims
for origin
create_sub_buffer
reword the documentation
default_queue
can be specified and why it's optional
from_gl_buffer
or change the arguments
read
, write
methods works, use futures ?
BufferBuilder:
context
along with the queue
method
host_data
method
dims
and/or use another type to represent the data with 1/2/3 dimensions
fill_val
and fill_event
because that's the same thing, use futures
BufferCmd:
new
method
read_async
map
method
gl_aquire
and gl_release
works (e.g. Remove antoher type, more clear)
block
is unsafe ?
block
to false is potentially unsafe due to asynchronous timings.rect
method and doesn't panic
ewait_opt
ewait
/enew
methods
Mem/MapFlags:
std::OpenOptions
for ocl::Mem/MapFlags
(https://doc.rust-lang.org/std/fs/struct.OpenOptions.html)
MemFlags::new().read_only().host_write_only()
)Device:
Device::first
will panic and don't needs to
Platform:
Vec
but &[]
in list_from_core
String
from profile
and extensions
PlatformInfo::Profile
and PlatformInfo::Extensions
queries returned owned strings.Kernel:
new
use Into<&str>
instead of the useless Into<String>
Into<String>
is far from useless. It allows the caller to pass either an owned string or a reference, avoiding an allocation in the former case.gwo
into set_gwo
and get_gwo
into gwo
core
into as_core
::core
functions need renaming to ::as_core
. Added to TODO.by_idx
into by_index
for more clarity
::named_arg_idx
. To fully expand that method name it would become ::named_argument_index
. This is just too verbose. ::named_arg_index
doesn't seem like it adds any more clarity at all either. So, on further reflection, the method will remain as it is.RwVec:
is_empty
method to the type
::len
is already returning stale values and is not to be treated like a usual ::len
method call. I'd rather not add more methods to make it seem as though these are somehow equivalent to their slice counterparts because they are not the same. I've added documentation to ::len
to explain that the value is immediately stale. Added to TODO (completed).EventArray:
push_some
Just pinging you, @Kerollmops :)
I'm actually really busy but I added a reminder to add more in this list. I will come back this week probably. 😃
This is very complex to make a clear answer. Their is too many points of conversation and I'm not done with improvements propositions yet. I want to find something like a Trello or one issue by improvement but in another repo to limit the noise for example (i.e. rust-lang/rfcs, crossbeam-rs/rfcs, haskell/rfcs).
Yeah, I was thinking about making a Github Project for it. Trello would be great too.
And why not RFCs ? Do you think it is overkill or something ?
Because nobody will be able to add issues to the github project or the Trello.
RFC would be fine, but yes, a bit overkill. In this case I think you should create a Trello board where the two of us can sort out the majority of the small issues. If any large questions remain, we can create an issue in this repo, or create an RFC repo.
Contact me via: https://gitter.im/cogciprocate/ocl if you need my attention. I usually keep the chat open so it's faster than communicating via github or e-mail :)
We are know talking on this Trello board.
Trello Project Board