Results 1 to 2 of 2

Thread: Support of Multi-dimensional arrays

  1. #1
    Junior Member
    Join Date
    Sep 2011
    Posts
    1

    Support of Multi-dimensional arrays

    Hi,
    as OpenCL will is getting popular within the scientific community. I wonder if
    for the next release support for (dynamic) multi-dimensional arrays are planned or could
    be included - similar to what Fortran supports. e.g.

    Fortran- 90 : double precision :: A(1:Nx, 1:Ny, 1:Nz)

    could be done in C/C++ lilke

    void F(int Nx, int Ny, A[1:Nx][1:Ny])

    and access like A[1+x][y] ..., with x,y some integeer variables withing arrays bounds.

    or some similar notation (e.g. Intel Cilk+ Array notation)
    [ C-99 has something similar with VLA arrays, but seems to work only with
    static arrays for me, also are VLA arrays in C-99 are only heap allocated) .

    Having this array features similar to Fortran's would be awesome, and will give OpenCL a great boost in the science community .

    Thanks a lot

  2. #2
    Junior Member
    Join Date
    Oct 2011
    Posts
    1

    Re: Support of Multi-dimensional arrays

    Quote Originally Posted by Sheliak

    [ C-99 has something similar with VLA arrays, but seems to work only with
    static arrays for me, also are VLA arrays in C-99 are only heap allocated) .

    Having this array features similar to Fortran's would be awesome, and will give OpenCL a great boost in the science community .
    Yes we definitely need C99 VLA. It is a pity that current OpenCL is based on C99 but dropped VLA...
    Parallelism is already hard stuff, so if we can avoid messing up with dirty array linearization...

    It would also add an advantage on CUDA.

Similar Threads

  1. Replies: 4
    Last Post: 08-09-2011, 04:02 PM
  2. Replies: 3
    Last Post: 05-22-2011, 07:39 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •