Mila 0.13.48
Deep Neural Network Library
Loading...
Searching...
No Matches
Mila::Dnn::UniqueIdGenerator Class Reference
module Dnn.Tensor

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.

Detailed Description

Thread-safe generator for unique tensor identifiers.

Provides atomic generation of unique IDs for tensor instances.

Member Function Documentation

◆ getNextId()

size_t Mila::Dnn::UniqueIdGenerator::getNextId ( )
inlinestatic

Generates the next unique identifier atomically.

Uses relaxed memory ordering for uniqueness across threads.

Returns
Unique size_t identifier
Here is the caller graph for this function:

Member Data Documentation

◆ counter_

std::atomic< size_t > Mila::Dnn::UniqueIdGenerator::counter_ { 0 }
staticprivate

Thread-safe counter for unique ID generation.


The documentation for this class was generated from the following file: