added cbinds for C structs

sp3mm-interface
wlther 2 years ago
parent 347352fe1e
commit c093a6e11d

@ -42,4 +42,33 @@ module psb_objhandle_mod
type(c_ptr) :: item = c_null_ptr
end type psb_c_zspmat
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! sp3mm c code structs
! TODO : rename to conventions
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
type, bind(C, name=spmat) :: spmat_t
! number of non zeros and dimensions
integer(c_size_t) :: nz, m, n
! value array
real(c_float), allocatable :: as(:)
! columns array
integer(c_size_t), allocatable :: ja(:)
! row index pointers array
integer(c_size_t), allocatable :: irp(:)
! lengths of the rows
integer(c_size_t), allocatable :: rl(:)
! max value of rl
integer(c_size_t) :: max_row_nz
end type spmat_t
type, bind(C, name=CONFIG) :: config_t
! dimensions of the grid
integer(c_short) :: grid_rows, grid_cols
! how to compute symb mul (if required)
integer(c_int) :: symb_mm_row_impl_id
! thread num to use in OMP parallel region
integer(c_int) :: thread_num
! CHUNKS_DISTR_INTERF func pntr
type(c_ptr) :: chunk_distrb_func
end type config_t
end module psb_objhandle_mod

Loading…
Cancel
Save