     call fftw_free(p)
</pre>
   <p>and here is an L&nbsp;&times;&nbsp;M&nbsp;&times;&nbsp;N 3d complex array:

<pre class="example">       complex(C_DOUBLE_COMPLEX), pointer :: arr(:,:,:)
       type(C_PTR) :: p
       p = fftw_alloc_complex(int(L * M * N, C_SIZE_T))
       call c_f_pointer(p, arr, [L,M,N])
       <em>...use arr and arr(i,j,k) as usual...</em>
       call fftw_free(p)
</pre>
   <p>See <a href="Reversing-array-dimensions.html#Reversing-array-dimensions">Reversing array dimensions</a> for an