Skip to content

Commit 6ea9b3e

Browse files
authored
[DOCS] Include exchange api in the docs (#181)
1 parent 93c8f2a commit 6ea9b3e

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

docs/source/c_api.rst

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,17 @@ Enumerations
2727

2828
.. doxygenenum:: DLDataTypeCode
2929

30+
31+
Typedefs
32+
~~~~~~~~
33+
34+
.. doxygentypedef:: DLPackManagedTensorAllocator
35+
.. doxygentypedef:: DLPackManagedTensorFromPyObjectNoSync
36+
.. doxygentypedef:: DLPackManagedTensorToPyObjectNoSync
37+
.. doxygentypedef:: DLPackDLTensorFromPyObjectNoSync
38+
.. doxygentypedef:: DLPackCurrentWorkStream
39+
40+
3041
Structs
3142
~~~~~~~
3243

@@ -47,3 +58,9 @@ Structs
4758

4859
.. doxygenstruct:: DLManagedTensorVersioned
4960
:members:
61+
62+
.. doxygenstruct:: DLPackExchangeAPIHeader
63+
:members:
64+
65+
.. doxygenstruct:: DLPackExchangeAPI
66+
:members:

include/dlpack/dlpack.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,6 +415,7 @@ typedef int (*DLPackManagedTensorAllocator)(
415415
*
416416
* \param py_object The Python object to convert. Must have the same type
417417
* as the one the `DLPackExchangeAPI` was discovered from.
418+
* \param out The output DLManagedTensorVersioned.
418419
* \return The owning DLManagedTensorVersioned* or NULL on failure with a
419420
* Python exception set. If the data cannot be described using DLPack
420421
* this should be a BufferError if possible.
@@ -616,7 +617,7 @@ typedef struct DLPackExchangeAPI {
616617
/*!
617618
* \brief Producer function pointer for DLPackManagedTensorToPyObject
618619
* This function must be not NULL.
619-
* \sa DLPackManagedTensorToPyObject
620+
* \sa DLPackManagedTensorToPyObjectNoSync
620621
*/
621622
DLPackManagedTensorToPyObjectNoSync managed_tensor_to_py_object_no_sync;
622623
/*!

0 commit comments

Comments
 (0)