Skip to content

Commit

Permalink
Update to include int32 hashmap keytype
Browse files Browse the repository at this point in the history
Update to stdlib_hashmap_wrappers.f90 that includes support for int32 vector key types.
  • Loading branch information
chuckyvt committed Mar 27, 2024
1 parent 8853ecd commit 65bdc89
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion src/stdlib_hashmap_wrappers.f90
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ end function hasher_fun

module procedure set_char_key, &
set_int8_key, &
set_other
set_other, &
set_int32_key

end interface set

Expand Down Expand Up @@ -308,6 +309,21 @@ subroutine set_other( other, value )
end subroutine set_other


subroutine set_int32_key( key, value )
!! Version: Experimental
!!
!! Sets the contents of the key from an INTEGER(INT8) vector
!! Arguments:
!! key - the output key
!! value - the input INTEGER(INT32) vector
type(key_type), intent(out) :: key
integer(int32), intent(in) :: value(:)

key % value = transfer(value, key % value)

end subroutine set_int32_key


subroutine set_int8_key( key, value )
!! Version: Experimental
!!
Expand Down

0 comments on commit 65bdc89

Please sign in to comment.