Skip to content

Remove other derived type from hashmap #843

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 47 commits into from
Feb 27, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
1c681d1
RC1
chuckyvt Jun 30, 2024
4847f5c
Other_type cleanup and removal
chuckyvt Jul 3, 2024
9c5574b
Update src/stdlib_hashmap_chaining.f90
chuckyvt Jul 3, 2024
72f66b9
Update src/stdlib_hashmap_open.f90
chuckyvt Jul 3, 2024
b09a1ad
Update src/stdlib_hashmap_chaining.f90
chuckyvt Jul 3, 2024
b1cfb3b
Remove other type from test_chaining and test_open
chuckyvt Jul 3, 2024
2ae6665
Update stdlib_hashmap_chaining.f90
chuckyvt Jul 3, 2024
1cd2e2e
Update example_hashmaps_set_other_data.f90
chuckyvt Jul 3, 2024
5692eae
Update CMakeLists.txt
chuckyvt Jul 4, 2024
4a2200f
Update CMakeLists.txt
chuckyvt Jul 4, 2024
97ac470
Update CMakeLists.txt
chuckyvt Jul 4, 2024
45f6f2a
Revert "Update CMakeLists.txt"
chuckyvt Jul 4, 2024
df94ee5
Update CMakeLists.txt
chuckyvt Jul 4, 2024
970e389
Update example_hashmaps_set_other_data.f90
chuckyvt Jul 4, 2024
4b6d682
Update stdlib_hashmaps.md
chuckyvt Jul 7, 2024
8a1b4fa
Update to remove other_type references
chuckyvt Jul 10, 2024
61c1082
Update example_hashmaps_map_entry.f90
chuckyvt Jul 10, 2024
f7a6846
Update example_hashmaps_rehash.f90
chuckyvt Jul 10, 2024
aa9952e
Update example_hashmaps_remove.f90
chuckyvt Jul 10, 2024
9c8f7c2
Test allocate again
chuckyvt Jul 10, 2024
d83e555
Update to include allocate statement
chuckyvt Jul 10, 2024
0485d71
Typo fix
chuckyvt Jul 10, 2024
04e59c0
Update doc/specs/stdlib_hashmaps.md
chuckyvt Jul 11, 2024
27b7178
Update doc/specs/stdlib_hashmaps.md
chuckyvt Jul 11, 2024
4d9c68e
Update doc/specs/stdlib_hashmaps.md
chuckyvt Jul 11, 2024
da075e8
Update doc/specs/stdlib_hashmaps.md
chuckyvt Jul 11, 2024
e4f1556
Update example/hashmaps/CMakeLists.txt
chuckyvt Jul 11, 2024
1e33189
Update example/hashmaps/example_hashmaps_get_other_data.f90
chuckyvt Jul 11, 2024
c02421a
Update example/hashmaps/example_hashmaps_map_entry.f90
chuckyvt Jul 11, 2024
6228b58
Update example/hashmaps/example_hashmaps_remove.f90
chuckyvt Jul 11, 2024
5b2e71a
Update example/hashmaps/example_hashmaps_set_other_data.f90
chuckyvt Jul 11, 2024
ac93bca
Reverting back to in-line allocation
chuckyvt Jul 11, 2024
07febc3
Revert "Reverting back to in-line allocation"
chuckyvt Jul 11, 2024
4c453a0
Reapply "Reverting back to in-line allocation"
chuckyvt Jul 12, 2024
33ecef2
Update stdlib_hashmap_chaining.f90
chuckyvt Jul 12, 2024
30f2210
Update doc/specs/stdlib_hashmaps.md
chuckyvt Jul 15, 2024
d06e047
Update stdlib_hashmap_chaining.f90
chuckyvt Jul 16, 2024
8c562e4
Update stdlib_hashmap_chaining.f90
chuckyvt Jul 16, 2024
482776d
Update stdlib_hashmap_chaining.f90
chuckyvt Jul 16, 2024
56d9b9e
Set_other CI fix
chuckyvt Jul 16, 2024
03a9351
Update set_other again
chuckyvt Jul 16, 2024
a2bee26
Update stdlib_hashmap_chaining.f90
chuckyvt Jul 17, 2024
4cb9c4d
Update stdlib_hashmap_chaining.f90
chuckyvt Jul 17, 2024
32ba12d
Revert "Update stdlib_hashmap_chaining.f90"
chuckyvt Jul 17, 2024
cc14840
Revert "Update stdlib_hashmap_chaining.f90"
chuckyvt Jul 17, 2024
4120ec7
Update stdlib_hashmaps.f90
chuckyvt Aug 31, 2024
250252d
Revert "Update stdlib_hashmaps.f90"
chuckyvt Sep 4, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Reverting back to in-line allocation
Reverting back to inline allocation based on PR discussion.  Both approaches seemed to work fine.
  • Loading branch information
chuckyvt committed Feb 6, 2025
commit ac93bca1717816d168925ff866e486ed1ac6f5fd
6 changes: 1 addition & 5 deletions src/stdlib_hashmap_chaining.f90
Original file line number Diff line number Diff line change
Expand Up @@ -569,11 +569,7 @@ module subroutine map_chain_entry(map, key, other, conflict)
new_ent % next => map % slots(hash_index) % target
map % slots(hash_index) % target => new_ent
call copy_key( key, new_ent % key )
!if ( present(other) ) new_ent % other = other
if ( present(other) ) then
if ( allocated(new_ent % other) ) deallocate(new_ent % other)
allocate(new_ent % other, source = other)
endif
if ( present(other) ) new_ent % other = other
if ( new_ent % inmap == 0 ) then
map % num_entries = map % num_entries + 1
inmap = map % num_entries
Expand Down
6 changes: 1 addition & 5 deletions src/stdlib_hashmap_open.f90
Original file line number Diff line number Diff line change
Expand Up @@ -553,11 +553,7 @@ module subroutine map_open_entry(map, key, other, conflict)
call allocate_open_map_entry(map, new_ent)
new_ent % hash_val = hash_val
call copy_key( key, new_ent % key )
if ( present( other ) ) then
!new_ent % other = other
if ( allocated(new_ent % other) ) deallocate(new_ent % other)
allocate(new_ent % other, source = other)
endif
if ( present( other ) ) new_ent % other = other
inmap = new_ent % inmap
map % inverse( inmap ) % target => new_ent
map % slots( test_slot ) = inmap
Expand Down