Skip to content

Commit

Permalink
add ownership note and fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
leofang committed Feb 13, 2024
1 parent 8b964e8 commit a1eecba
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions include/dlpack/dlpack.h
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ typedef struct DLManagedTensor {
* \brief Destructor - this should be called
* to destruct the manager_ctx which backs the DLManagedTensor. It can be
* NULL if there is no way for the caller to provide a reasonable destructor.
* The destructors deletes the argument self as well.
* The destructor deletes the argument self as well.
*/
void (*deleter)(struct DLManagedTensor * self);
} DLManagedTensor;
Expand All @@ -272,7 +272,12 @@ typedef struct DLManagedTensor {
/*! \brief bit mask to indicate that the tensor is read only. */
#define DLPACK_FLAG_BITMASK_READ_ONLY (1UL << 0UL)

/*! \brief bit mask to indicate that the tensor is a copy made by the producer. */
/*!
* \brief bit mask to indicate that the tensor is a copy made by the producer.
*
* If set, the tensor is considered solely owned throughout its lifetime by the
* consumer, until the producer-provided deleter is invoked.
*/
#define DLPACK_FLAG_BITMASK_IS_COPIED (1UL << 1UL)

/*!
Expand Down Expand Up @@ -302,7 +307,7 @@ struct DLManagedTensorVersioned {
*
* This should be called to destruct manager_ctx which holds the DLManagedTensorVersioned.
* It can be NULL if there is no way for the caller to provide a reasonable
* destructor. The destructors deletes the argument self as well.
* destructor. The destructor deletes the argument self as well.
*/
void (*deleter)(struct DLManagedTensorVersioned *self);
/*!
Expand Down

0 comments on commit a1eecba

Please sign in to comment.