NVIDIA / cuCollections

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[QST] Valid to use differently sized CGs between two invocations of `static_map::insert()`

thakkarV opened this issue · comments

One of the overloads for static_map::insert accepts a cooperative group as a function template. Can a user specify differently sized CG for the same instance of a static map between two separate invocations of insert?

The current static_map is exclusively using the linear probing scheme. i.e. for a given key, the same consecutive slots are checked regardless of the CG size or whether CG is used or not. So changing the CG size should work fine.

specify differently sized CG for the same instance of a static map between two separate invocations of insert

I assume those two invocations of insert are from different kernels. If you don't mind, why insert with different CG sizes is desired in your use case?

The current static_map is exclusively using the linear probing scheme.

I wasn't aware of that. In that case, probing with different CG sizes should always yield the correct probing sequence.

Thanks a lot! I think that answers my question.