Skip to content

Commit fc4cbfe

Browse files
committed
Numerous fixes to the documentation.
Signed-off-by: Michal Zientkiewicz <[email protected]>
1 parent 3da3a7e commit fc4cbfe

File tree

1 file changed

+24
-19
lines changed

1 file changed

+24
-19
lines changed

include/dali/dali.h

Lines changed: 24 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -135,15 +135,19 @@ typedef struct _DALIDeleter {
135135
/** Returns the last error code.
136136
*
137137
* Returns the error code associate with the recent unsuccessful call in the calling thread.
138-
* Succesful calls do not overwrite the value.
138+
* Successful calls do not overwrite the value.
139+
*
140+
* @retval Error code of the most recent unsuccessful DALI API call,
141+
* @retval DALI_SUCCESS if no error has occurred in the calling thread or the error
142+
* has been cleared with a call to daliClearLastError.
139143
*/
140144
DALI_API daliResult_t daliGetLastError();
141145

142146
/** Returns the last error message.
143147
*
144148
* Returns the detailed, context-specific message associated with the recent unsuccessful call
145149
* in the callling thread.
146-
* Succesful calls do not overwrite the value.
150+
* Successful calls do not overwrite the value.
147151
* The pointer is invalidated by intervening DALI calls in the same thread.
148152
*/
149153
DALI_API const char *daliGetLastErrorMessage();
@@ -467,7 +471,7 @@ DALI_API daliResult_t daliPipelineGetOutputCount(daliPipeline_h pipeline, int *o
467471
/** Gets a descriptor of the specified pipeline output.
468472
*
469473
* @param pipeline [in] The pipeline
470-
* @param out_desc [out] A pointer to a location where the decriptor is written.
474+
* @param out_desc [out] A pointer to a location where the descriptor is written.
471475
* @param index [in] The 0-based index of the output. See `daliPipelineGetOutputCount`.
472476
*
473477
* NOTE: The names returned by this function match those specified when defining the pipeline,
@@ -525,8 +529,9 @@ DALI_API daliResult_t daliPipelinePopOutputsAsync(
525529
* Otherwise, the outputs must not be used after this call has been made.
526530
*
527531
* @warning When NOT using DALI_EXEC_IS_DYNAMIC, the maximum number of live daliPipelineOutputs_h
528-
* obtained from a single pipeline must not exceed the prefetch_queue_depth. An attempt
529-
* to run the pipeline again after the
532+
* obtained from a single pipeline must not exceed the prefetch_queue_depth. Running the
533+
* pipeline again after the maximum number of live output sets is reached is an undefined
534+
* behavior.
530535
*/
531536
DALI_API daliResult_t daliPipelineOutputsDestroy(daliPipelineOutputs_h out);
532537

@@ -707,8 +712,8 @@ DALI_API daliResult_t daliTensorListAttachBuffer(
707712
* Attaches externally allocated buffers to a TensorList.
708713
* If provided, the deleters are called on all buffers when the samples are destroyed.
709714
*
710-
* The shape and sample offsets are used only during this function call and may be safely
711-
* disposed of after the function returns.
715+
* The sample descriptors are used only during this function call and may be safely disposed of
716+
* after the function returns.
712717
*
713718
* @param tensor_list the TensorList to attach the data to
714719
* @param num_samples the new number of samples in the batch
@@ -774,7 +779,7 @@ DALI_API daliResult_t daliTensorListGetStream(
774779

775780
/** Gets the readiness event associated with the TensorList.
776781
*
777-
* @param tensor_list [in] the tenosr list whose ready event is to be obtained
782+
* @param tensor_list [in] the tensor list whose ready event is to be obtained
778783
* @param out_event [out] the pointer to the return value
779784
*
780785
* @retval DALI_SUCCESS if the ready event handle was stored in *out_event
@@ -808,7 +813,7 @@ DALI_API daliResult_t daliTensorListGetOrCreateReadyEvent(
808813
* contains (*out_num_samples) * (*out_ndim) elements
809814
*
810815
* The pointer returned in `out_shape` remains valid until the TensorList is destroyed or modified.
811-
* If the caller is not intersted in some of the values, the pointers can be NULL.
816+
* If the caller is not interested in some of the values, the pointers can be NULL.
812817
*/
813818
DALI_API daliResult_t daliTensorListGetShape(
814819
daliTensorList_h tensor_list,
@@ -819,7 +824,7 @@ DALI_API daliResult_t daliTensorListGetShape(
819824
/** Gets a layout string describing the samples in the TensorList.
820825
*
821826
* @param tensor_list [in] the tensor list whose layout to obtain
822-
* @param out_layout [out] a pointer to the place where a pointer to the the layout string of
827+
* @param out_layout [out] a pointer to the place where a pointer to the layout string of
823828
* the samples in the tensor list is stored
824829
*
825830
* When present, the layout string consists of exactly `sample_ndim` single-character _axis labels_.
@@ -871,7 +876,7 @@ DALI_API daliResult_t daliTensorListGetSourceInfo(
871876
/** Gets the tensor descriptor of the specified sample.
872877
*
873878
* @param tensor_list [in] The tensor list
874-
* @param out_desc [out] A poitner to a location where the decriptor is written.
879+
* @param out_desc [out] A poitner to a location where the descriptor is written.
875880
* @param sample_idx [in] The index of the sample, whose descriptor to get.
876881
*
877882
* The descriptor stored in `out_desc` contains pointers. These pointers are invalidated by
@@ -1015,7 +1020,7 @@ DALI_API daliResult_t daliTensorGetStream(
10151020

10161021
/** Gets the readiness event associated with the Tensor.
10171022
*
1018-
* @param tensor [in] the tenosr list whose ready event is to be obtained
1023+
* @param tensor [in] the tensor list whose ready event is to be obtained
10191024
* @param out_event [out] the pointer to the return value
10201025
*
10211026
* @retval DALI_SUCCESS if the ready event handle was stored in *out_event
@@ -1028,7 +1033,7 @@ DALI_API daliResult_t daliTensorGetReadyEvent(
10281033

10291034
/** Gets the readiness event associated with the Tensor or creates a new one.
10301035
*
1031-
* @param tensor [in] the tensor to associate an even twith
1036+
* @param tensor [in] the tensor to associate an even twith
10321037
* @param out_event [out] optional, the event handle
10331038
*
10341039
* The function ensures that a readiness event is associated with the tensor.
@@ -1042,12 +1047,12 @@ DALI_API daliResult_t daliTensorGetOrCreateReadyEvent(
10421047

10431048
/** Gets the shape of the tensor
10441049
*
1045-
* @param tensor [in] the tensor whose shape to obtain
1046-
* @param out_ndim [out] optional; receives the number of dimensions
1047-
* @param out_shape [out] optional; receives the the pointer to the shape (array of extents)
1050+
* @param tensor [in] the tensor whose shape to obtain
1051+
* @param out_ndim [out] optional; receives the number of dimensions
1052+
* @param out_shape [out] optional; receives the pointer to the shape (array of extents)
10481053
*
10491054
* The pointer returned in `out_shape` remains valid until the Tensor is destroyed or modified.
1050-
* If the caller is not intersted in some of the values, the pointers can be NULL.
1055+
* If the caller is not interested in some of the values, the pointers can be NULL.
10511056
*/
10521057
DALI_API daliResult_t daliTensorGetShape(
10531058
daliTensor_h tensor,
@@ -1057,7 +1062,7 @@ DALI_API daliResult_t daliTensorGetShape(
10571062
/** Gets a layout string describing the data in the Tensor.
10581063
*
10591064
* @param tensor [in] the tensor whose layout to obtain
1060-
* @param out_layout [out] a pointer to the place where a pointer to the the layout string of
1065+
* @param out_layout [out] a pointer to the place where a pointer to the layout string of
10611066
* the samples in the tensor is stored
10621067
*
10631068
* When present, the layout string consists of exactly `ndim` single-character _axis labels_.
@@ -1104,7 +1109,7 @@ DALI_API daliResult_t daliTensorGetSourceInfo(
11041109
/** Gets the descriptor of the data in the tensor.
11051110
*
11061111
* @param tensor [in] The tensor
1107-
* @param out_desc [out] A poitner to a location where the decriptor is written.
1112+
* @param out_desc [out] A poitner to a location where the descriptor is written.
11081113
*
11091114
* The descriptor stored in `out_desc` contains pointers. These pointers are invalidated by
11101115
* destroying, clearing or resizing the Tensor or re-attaching new data to it.

0 commit comments

Comments
 (0)