Skip to content

Commit 65bdc89

Browse files
committed
Update to include int32 hashmap keytype
Update to stdlib_hashmap_wrappers.f90 that includes support for int32 vector key types.
1 parent 8853ecd commit 65bdc89

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

src/stdlib_hashmap_wrappers.f90

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,8 @@ end function hasher_fun
101101

102102
module procedure set_char_key, &
103103
set_int8_key, &
104-
set_other
104+
set_other, &
105+
set_int32_key
105106

106107
end interface set
107108

@@ -308,6 +309,21 @@ subroutine set_other( other, value )
308309
end subroutine set_other
309310

310311

312+
subroutine set_int32_key( key, value )
313+
!! Version: Experimental
314+
!!
315+
!! Sets the contents of the key from an INTEGER(INT8) vector
316+
!! Arguments:
317+
!! key - the output key
318+
!! value - the input INTEGER(INT32) vector
319+
type(key_type), intent(out) :: key
320+
integer(int32), intent(in) :: value(:)
321+
322+
key % value = transfer(value, key % value)
323+
324+
end subroutine set_int32_key
325+
326+
311327
subroutine set_int8_key( key, value )
312328
!! Version: Experimental
313329
!!

0 commit comments

Comments
 (0)