|
Mila 0.13.48
Deep Neural Network Library
|
Thread-safe generator for unique tensor identifiers. More...
Static Public Member Functions | |
| static size_t | getNextId () |
| Generates the next unique identifier atomically. | |
Static Private Attributes | |
| static std::atomic< size_t > | counter_ { 0 } |
| Thread-safe counter for unique ID generation. | |
Thread-safe generator for unique tensor identifiers.
Provides atomic generation of unique IDs for tensor instances.
|
inlinestatic |
Generates the next unique identifier atomically.
Uses relaxed memory ordering for uniqueness across threads.

|
staticprivate |
Thread-safe counter for unique ID generation.