On Apr 26, 11:03 am, Stefan Karpinski <ste...@karpinski.org> wrote:
> If this kind of kernel requires immutable arrays, I would generally
> recommend not mutating your arrays while performing such magic :-)
Definitely. And you don't: there's no other operations intervening
while X = @kernel A.*B + C is executed.
What I'm talking about is a case like when you create some data in an
array, and then pass it around to accumulate delayed evaluation steps
in various parts of the code.
You might call it dynamically delayed evaluation since the system
creates kernels depending on the history of your data objects,
as opposed statically delayed evaluation like X = @kernel A.*B + C
where the programmer delimits the maximum delay explicitly.
I know there's a bit of a divide between those who want to do
dynamically delayed evaluation, and those who prefer statically
delayed evalutation since it's simpler and more explicit.
I personally like the static case, and I feel that it's best to start
with simple things first.
But I still think that having an immutable array type integrated into
Julia might make a big difference performance-wise at some point in
the future, so I wanted to ask the question now.