Despite many threads on this, I’m still confused. I want to avoid allocation but something is not working in my code. My setup is like the one below. Can someone explain the difference in this context,
A = (rand(3),rand(3),rand(3))
B = (rand(3),rand(3),rand(3))
option 1 works but I want to avoid it because it allocates:
B = deepcopy(A)
option 2 does not allocate but does not work:
copy!.(B,A)
neither does option 3:
map((b,a)-> b .= a, B, A)