Home | History | Annotate | Download | only in framework

Lines Matching refs:allocator

23 #include "tensorflow/core/framework/allocator.h"
30 // Add an allocator to the registry. Caller releases ownership of
31 // 'allocator'.
32 void Register(const string& name, int priority, Allocator* allocator);
34 // Return allocator with highest priority
36 Allocator* GetAllocator();
45 Allocator* allocator; // not owned
48 // Returns the Allocator registered for 'name' and 'priority',
50 Allocator* GetRegisteredAllocator(const string& name, int priority);
53 Allocator* m_curr_allocator_; // not owned
61 Allocator* allocator) {
62 AllocatorRegistry::Global()->Register(name, priority, allocator);
68 #define REGISTER_MEM_ALLOCATOR(name, priority, allocator) \
69 REGISTER_MEM_ALLOCATOR_UNIQ_HELPER(__COUNTER__, name, priority, allocator)
71 #define REGISTER_MEM_ALLOCATOR_UNIQ_HELPER(ctr, name, priority, allocator) \
72 REGISTER_MEM_ALLOCATOR_UNIQ(ctr, name, priority, allocator)
74 #define REGISTER_MEM_ALLOCATOR_UNIQ(ctr, name, priority, allocator) \
76 register_allocator_##ctr(name, priority, new allocator)