Ticket #3963 (closed enhancement: wontfix)

Opened 8 years ago

Last modified 19 months ago

Add ability to get return value from visitor to xmt_hash_table functions

Reported by: gemacke Owned by: gemacke
Priority: normal Milestone: 1.2
Version: 1.0 Severity: normal
Keywords: Cc:


Eric Goodman wants to be able to get a return value from the visitor he passes to the xmt_hash_table functions that take a visitor.

One possible solution is to have the functions' return values be tuples that include the return value of the visitor. This would make the interface unnecessarily complex IMHO.

Another solution is to have a version of these functions that returns an "accessor" that retains a lock on the entry until the lock is manually released or the accessor goes out of scope. This is the route taken by the concurrent_hash_map in Intel's Thread Building Blocks. From an interface standpoint, this is a much better solution. It also lets us completely get rid of needing to pass visitor to insert() and other functions as the main reason for the visitors is to do something before the lock is released. However, I tried out returning a const_accessor that didn't keep a lock from insert() instead of a value_type pointer, and it didn't get near as good performance. Keeping the lock may kill performance. This is also similar to the proxy object I tried using in the hash table for operator[] which had horrible performance. More testing needs to be done on this.

Perhaps there is another solution.

Change History

comment:1 Changed 8 years ago by gemacke

  • Status changed from new to accepted

comment:2 Changed 7 years ago by gemacke

  • component Eldorado deleted

comment:3 Changed 7 years ago by gemacke

  • Version set to 1.1
  • Milestone set to 1.0

comment:4 Changed 7 years ago by gemacke

  • Version changed from 1.1 to 1.0
  • Milestone changed from 1.0 to 1.1

comment:5 Changed 7 years ago by gemacke

  • Milestone changed from 1.1 to 1.2

comment:6 Changed 19 months ago by gemacke

  • Status changed from accepted to closed
  • Resolution set to wontfix

No longer relevant with Kokkos refactor.

Note: See TracTickets for help on using tickets.