has_feature_api Function

public function has_feature_api(charptr) result(has) bind(C, name=namespace//"has_feature")

Query whether an optional feature is available in this build, currently only “mpi” is defined

Arguments

Type IntentOptional Attributes Name
character(kind=c_char, len=1), intent(in), optional :: charptr(*)

Return Value logical(kind=c_bool)


Source Code

function has_feature_api(charptr) result(has) &
      & bind(C, name=namespace//"has_feature")
   character(kind=c_char), intent(in), optional :: charptr(*)
   logical(c_bool) :: has
   character(len=:), allocatable :: feature

   has = .false._c_bool
   if (.not.present(charptr)) return

   call c_f_character(charptr, feature)
   has = logical(dftd3_has_feature(feature), c_bool)

end function has_feature_api