Both ways of writing macros shown in the following are supported for usage in @parallel_indices:
macro compute(A) esc(:($(INDICES[1]) + ($(INDICES[2])-1)*size($A,1))) end
macro compute_with_aliases(A) esc(:(ix + (iz -1)*size($A,1))) end
@parallel_indices (ix,iz) function write_indices!(A)
A[ix,end,iz] = @compute_with_aliases(A);
return
end
@parallel_indices (ix,iz) function write_indices!(A)
A[ix,end,iz] = @compute(A);
return
end
Both ways of writing macros shown in the following are supported for usage in
@parallel_indices
: