On Wed, 1 Jul 2020, Ferguson, Michael Paul Pratt (Chapel Developer) wrote:
I find domain.dim(d) and domain.dims really valuable for
this sort of thing
https://chapel-lang.org/docs/master/builtins/ChapelArray.html#ChapelArray.dims
I guess I was more asking whether one form optimizes better than another.
The recursive inner loop looks like it will cause grief
to an optimizer. Is there a smarter way to write it?
It's true that the inner loop won't be vectorizable on its own.
However since it is within a forall loop, this would be a good
candidate for outer-loop vectorization with LLVM and RV. I'd like to
investigate that as part of my upcoming efforts on vectorization.
I will be sending you the final version of this SVD for your tests. It was
chosen for its complexity, challenging optimization aspects but also for
its ability to be parallelized in parts and acting as a test bed for some
experiments.
Your complexAsTuple function looks OK to me (although I would have left
out the type argument and let the whole thing infer types, like
inline proc complexAsTuple(t) return (t.re, t.im);
but that is a style thing).
I think I prefer yours. I did not realise you could leave out the type in
the parameter list.
The language currently supports casting from a tuple to a complex, e.g.
var b = (1.0, 2.0):complex;
but the inverse operation is not implemented. (Adding
it would be a reasonable feature request in my opinion;
one would just need to add a _cast overload in ChapelTuple):
var tup = (1.0+2.0i):(real, real); // doesn't compile today
Should I stick that on Github, put it into some global wishlist, or
resubmit it in 2021 after the COVID-19 vaccine is being produced!
Regards - Damian
Pacific Engineering Systems International, 277-279 Broadway, Glebe NSW 2037
Ph:+61-2-8571-0847 .. Fx:+61-2-9692-9623 | unsolicited email not wanted here
Views & opinions here are mine and not those of any past or present employer
_______________________________________________
Chapel-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/chapel-developers