forked from pytorch/pytorch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTHCStorage.hpp
30 lines (22 loc) · 822 Bytes
/
THCStorage.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#pragma once
// STOP!!! Thinking of including this header directly? Please
// read Note [TH abstraction violation]
#include <THC/THCStorage.h>
// Should work with THStorageClass
#include <TH/THStorageFunctions.hpp>
#include <c10/core/ScalarType.h>
#include <cuda.h>
#include <cuda_runtime.h>
#include <cuda_fp16.h>
TORCH_CUDA_API THCStorage* THCStorage_new(THCState* state);
TORCH_CUDA_API void THCStorage_retain(THCState *state, THCStorage *storage);
TORCH_CUDA_API void THCStorage_resizeBytes(
THCState* state,
THCStorage* storage,
ptrdiff_t size_bytes);
TORCH_CUDA_API int THCStorage_getDevice(THCState* state, const THCStorage* storage);
TORCH_CUDA_API THCStorage* THCStorage_newWithDataAndAllocator(
THCState* state,
at::DataPtr&& data,
ptrdiff_t size,
at::Allocator* allocator);