Open GoogleCodeExporter opened 9 years ago
[deleted comment]
This is a great idea.
When we first started playing with put and get I actually coded a version of
this, but wanted to allow a simple way of denoting multiple regions. I never
found an API I liked .
So your proposal is
kernel.putRegion(buf, 0 ,buf.length/2);
I think we could just overload put()
kernel.put(buf, 0 ,buf.length/2);
For multiple regions we could leverage the fluent style API
kernel.put(buf, 0 ,buf.length/2).put(buf, buf.length-10, 10);
For 'puts' this would work well, because we just cache the intent to put (we
defer the actual puts until kernel.execute() is called.
For gets this would be less efficient as we currently fetch each explicitly.
Unless we allow some form of transaction
kernel.start().put(buf,0,n).put(buf,m,p).execute(range).get(buf,0,n).get(buf,x,y
).end();
Which is verbose but efficient.
Gary
Gary
Original comment by frost.g...@gmail.com
on 17 Jun 2013 at 10:14
So in this, case start() changes the "mode" so to speak of the kernel, so that
nothing (not even the execute) is actually performed until end() is called?
Sounds interesting.
Original comment by paul.mi...@gmail.com
on 18 Jun 2013 at 4:48
Original issue reported on code.google.com by
paul.mi...@gmail.com
on 12 Jun 2013 at 2:00