2 This file is part of the CSDP 5.0 package developed by Dr. Brian Borchers.
3 Which can be distributed under the LGPL licence. The source code and
4 manual can be downloaded at http://euler.nmt.edu/~brian/csdp.html.
6 Declarations needed to handle indexing into Fortran arrays and packed
13 First, to convert fortran i,j indices into a C vector index.
16 #define ijtok(iiii,jjjj,lda) ((jjjj-1)*lda+iiii-1)
22 #define ijtokp(iii,jjj,lda) ((iii+jjj*(jjj-1)/2)-1)
25 Next, to convert C vector index into Fortran i,j indices.
28 #define ktoi(k,lda) ((k % lda)+1)
29 #define ktoj(k,lda) ((k/lda)+1)
34 First, to convert fortran i,j indices into a C vector index.
37 #define ijtok(iiii,jjjj,lda) ((jjjj-1L)*lda+iiii-1L)
43 #define ijtokp(iii,jjj,lda) (((long int)iii+(long int)jjj*(jjj-1L)/2-1L))
46 Next, to convert C vector index into Fortran i,j indices.
49 #define ktoi(k,lda) (((long int)k % lda)+1L)
50 #define ktoj(k,lda) (((long int)k/lda)+1L)