Currently in-place arithmetic operations turn shared arrays into normal 
ones: eg

b = Base.shmem_randn(10)
b *= 2

results in b becoming a (not-shared) array. I'd like to overload these 
in-place arithmetic operations so that instead of writing

typeof(b)==SharedArray? b.s *= 2 : b *= 2

I can just write

b *= 2

and know that the shared status of my array will be preserved. How might 
one overload these operations?

(Note: I don't want c = b + b to automatically create a shared array c, 
since that allocates new shared memory.)

Reply via email to