sooo close … sooo close

Dealing with a strange parameter passing/indexing thingy.
Something ain’t quite right.
Passing allocatable arrays from F90 to C, check.
Passing the array metadata (bounds), check.
Getting the pointer arithmetic correct (I think), check.
Getting the C version of this computational kernel prepped for Cuda-izing?
Well, ok, not really priceless. Part of a porting service.

2 thoughts on “sooo close … sooo close”

  1. Just curious — have you tried the BIND(C) stuff in F2003? I’m no Fortran expert, but that may allow you to pass an array directly to C and have the compiler do the necessary translation…? I don’t know how this works with allocateable arrays, though…

  2. @Jeff
    Yup, using the BIND(C) bits now. I don’t think it sends the metadata over correctly though for allocatable arrays.
    Will check (easy to create mini-codes for this).

Comments are closed.