If you access directly the elements of your arrays it will not allocate memory:
cum += points[1, j]
It's often worth adding a loop or reshaping your inputs so you can write
your inner code like that
and avoid memory allocation.
If you access directly the elements of your arrays it will not allocate memory:
cum += points[1, j]
It's often worth adding a loop or reshaping your inputs so you can write
your inner code like that
and avoid memory allocation.