File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -293,6 +293,11 @@ THAllocator* THCState_getCudaUVAAllocator(THCState* state)
293293 return state -> cudaUVAAllocator ;
294294}
295295
296+ THC_API THCDeviceAllocator * THCState_getDeviceAllocator (THCState * state )
297+ {
298+ return state -> cudaDeviceAllocator ;
299+ }
300+
296301void THCState_setDeviceAllocator (THCState * state , THCDeviceAllocator * allocator )
297302{
298303 state -> cudaDeviceAllocator = allocator ;
Original file line number Diff line number Diff line change @@ -139,6 +139,7 @@ THC_API struct cudaDeviceProp* THCState_getCurrentDeviceProperties(THCState* sta
139139THC_API struct THCRNGState * THCState_getRngState (THCState * state );
140140THC_API THAllocator * THCState_getCudaHostAllocator (THCState * state );
141141THC_API THAllocator * THCState_getCudaUVAAllocator (THCState * state );
142+ THC_API THCDeviceAllocator * THCState_getDeviceAllocator (THCState * state );
142143THC_API void THCState_setDeviceAllocator (THCState * state , THCDeviceAllocator * allocator );
143144
144145THC_API void THCMagma_init (THCState * state );
You can’t perform that action at this time.
0 commit comments