> Am I misunderstanding the purpose of your ArrayObj type? It seems to me your 
> implementation of `macro indexArray*(x: ArrayObj{call}, y: ArrayIndex): 
> untyped` is little inflexible. After all, not every function returning an 
> ArrayObj will be just doing element-wise calculations (or should it?)...

You are absolutely correct. The current definition of `indexArray` in the 
repository is incomplete. You can find an improved one at

> [https://github.com/jcosborn/qex/blob/devel/src/new/fieldProxy.nim#L100](https://github.com/jcosborn/qex/blob/devel/src/new/fieldProxy.nim#L100)

Your suggestion of using a macro to annotate procs and modify a global compile 
time list of element-wise calculations is a good option, too. Perhaps that is a 
nice option for users to define their own element-wise operations. I will 
consider this. (J's rank system is in the back of my head, but I will not go 
down that path anytime soon.)

The complexity of `shift` goes up easily with MPI and vectorization. In QEX, we 
have something similar, which is probably the most complicated piece in the 
code base.

Reply via email to