7 void libshm_init(
const char *manager_exec_path);
10 class THManagedMapAllocatorInit {
12 THManagedMapAllocatorInit(
const char* manager_handle,
const char* filename);
13 std::string manager_handle_;
21 THManagedMapAllocator(
const char* manager_handle,
const char* filename,
int flags, ptrdiff_t size);
23 void close()
override;
25 ~THManagedMapAllocator() { close(); }
27 static at::DataPtr makeDataPtr(
const char* manager_handle,
const char* filename,
int flags, ptrdiff_t size);
28 static THManagedMapAllocator* fromDataPtr(
const at::DataPtr&);
30 const char* manager_handle()
const {
return manager_handle_.c_str(); }