Skip to content

Commit

Permalink
Added elsort type in fortran interface
Browse files Browse the repository at this point in the history
  • Loading branch information
cnegre committed Jan 8, 2020
1 parent 91e0cbc commit e20dd9c
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 2 deletions.
2 changes: 1 addition & 1 deletion example_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ MY_PATH=$(pwd)
export CC=${CC:=gcc}
export FC=${FC:=gfortran}
export CXX=${CXX:=g++}
export BLAS_VENDOR=${BLAS_VENDOR:=MKL}
export BLAS_VENDOR=${BLAS_VENDOR:=GNU}
export BML_OPENMP=${BML_OPENMP:=yes}
export INSTALL_DIR=${INSTALL_DIR:="${MY_PATH}/install"}
export BML_TESTING=${BML_TESTING:=yes}
Expand Down
8 changes: 8 additions & 0 deletions src/Fortran-interface/bml_interface_m.F90
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ module bml_interface_m
!! Matrix type is ellblock.
integer, parameter :: bml_matrix_type_ellblock_enum_id = 3

!> The enum values of the C API. Keep this synchronized with the
!! enum in bml_types.h.
!!
!! Matrix type is ellblock.
integer, parameter :: bml_matrix_type_ellsort_enum_id = 4

!> The enum values of the C API. Keep this synchronized with the
!! enum in bml_types.h.
!!
Expand Down Expand Up @@ -106,6 +112,8 @@ function get_matrix_id(type_string) result(id)
id = bml_matrix_type_ellpack_enum_id
case(BML_MATRIX_ELLBLOCK)
id = bml_matrix_type_ellblock_enum_id
case(BML_MATRIX_ELLSORT)
id = bml_matrix_type_ellsort_enum_id
case default
print *, "unknown matrix type"//trim(type_string)
error stop
Expand Down
4 changes: 4 additions & 0 deletions src/Fortran-interface/bml_introspection_m.F90
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@ function bml_get_type(a)
bml_get_type = "dense"
case(2)
bml_get_type = "ellpack"
case(3)
bml_get_type = "ellblock"
case(4)
bml_get_type = "ellsort"
case default
stop 'Unknown matrix type in bml_get_type'
end select
Expand Down
5 changes: 4 additions & 1 deletion src/Fortran-interface/bml_types_m.F90
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module bml_types_m

public :: bml_vector_t, bml_matrix_t
public :: bml_deallocate
public :: BML_MATRIX_DENSE, BML_MATRIX_ELLPACK, BML_MATRIX_ELLBLOCK
public :: BML_MATRIX_DENSE, BML_MATRIX_ELLPACK, BML_MATRIX_ELLBLOCK, BML_MATRIX_ELLSORT
public :: BML_ELEMENT_REAL, BML_ELEMENT_COMPLEX
public :: BML_DMODE_SEQUENTIAL, BML_DMODE_DISTRIBUTED
public :: BML_DMODE_GRAPH_DISTRIBUTED
Expand Down Expand Up @@ -50,6 +50,9 @@ module bml_types_m
!> The bml-ellblock matrix type identifier.
character(len=*), parameter :: BML_MATRIX_ELLBLOCK = "ellblock"

!> The bml-ellblock matrix type identifier.
character(len=*), parameter :: BML_MATRIX_ELLSORT = "ellsort"

!> The single precision identifier.
character(len=*), parameter :: BML_ELEMENT_REAL = "real"

Expand Down

0 comments on commit e20dd9c

Please sign in to comment.