Caffe2 - C++ API
A deep learning, cross platform ML framework
Data Structures | Macros | Typedefs | Enumerations
dlpack.h File Reference

The common header of DLPack. More...

#include <stdint.h>
#include <stddef.h>

Go to the source code of this file.

Data Structures

struct  DLContext
 A Device context for Tensor and operator. More...
 
struct  DLDataType
 The data type the tensor can hold. More...
 
struct  DLTensor
 Plain C Tensor object, does not manage memory. More...
 
struct  DLManagedTensor
 C Tensor object, manage memory of DLTensor. This data structure is intended to faciliate the borrowing of DLTensor by another framework. It is not meant to transfer the tensor. When the borrowing framework doesn't need the tensor, it should call the deleter to notify the host that the resource is no longer needed. More...
 

Macros

#define DLPACK_EXTERN_C
 
#define DLPACK_VERSION   010
 The current version of dlpack.
 
#define DLPACK_DLL
 DLPACK_DLL prefix for windows.
 

Typedefs

typedef struct DLManagedTensor DLManagedTensor
 C Tensor object, manage memory of DLTensor. This data structure is intended to faciliate the borrowing of DLTensor by another framework. It is not meant to transfer the tensor. When the borrowing framework doesn't need the tensor, it should call the deleter to notify the host that the resource is no longer needed.
 

Enumerations

enum  DLDeviceType {
  kDLCPU = 1, kDLGPU = 2, kDLCPUPinned = 3, kDLOpenCL = 4,
  kDLMetal = 8, kDLVPI = 9, kDLROCM = 10
}
 The device type in DLContext.
 
enum  DLDataTypeCode { kDLInt = 0U, kDLUInt = 1U, kDLFloat = 2U }
 The type code options DLDataType.
 

Detailed Description

The common header of DLPack.

Copyright (c) 2017 by Contributors

Definition in file dlpack.h.