cython shared memory in cython.parallel.prange - block
I have a function foo that takes a pointer to memory as argument and both writes and reads to that memory: cdef void foo (double *data): data[some_index_int] = some_value_double do_something_dependent_on (data) I'm allocating to data like so: cdef int N = some_int cdef double *data = <double*> malloc (N * sizeof (double)) cdef int i for i in cython.parallel.prange (N, nogil=True): foo (data) readout (data) My question is now: how do the different threads treat this? My guess is that the memory pointed to by data will be shared by all threads and 'simultaneously' read from or written to while