MCPcopy Create free account
hub / github.com/NVIDIA/DALI / GetExternalSourceCopyMode

Function GetExternalSourceCopyMode

dali/c_api/c_api.cc:107–118  ·  view source on GitHub ↗

* @brief Extract InputOperatorSettingMode based on the DALI_ext_force_copy and DALI_ext_force_no_copy * * @param flags Flags typically specified in daliSetExternalInput* functions. */

Source from the content-addressed store, hash-verified

105 * @param flags Flags typically specified in daliSetExternalInput* functions.
106 */
107dali::InputOperatorCopyMode GetExternalSourceCopyMode(unsigned int flags) {
108 dali::InputOperatorCopyMode copy_mode = dali::InputOperatorCopyMode::DEFAULT;
109 DALI_ENFORCE(!((flags & DALI_ext_force_copy) && (flags & DALI_ext_force_no_copy)),
110 "External Source cannot be forced to use DALI_ext_force_copy and "
111 "DALI_ext_force_no_copy at the same time.");
112 if (flags & DALI_ext_force_copy) {
113 copy_mode = dali::InputOperatorCopyMode::FORCE_COPY;
114 } else if (flags & DALI_ext_force_no_copy) {
115 copy_mode = dali::InputOperatorCopyMode::FORCE_NO_COPY;
116 }
117 return copy_mode;
118}
119
120template <typename Backend>
121void SetExternalInput(daliPipelineHandle_t pipe_handle, const char *name, const void *data_ptr,

Callers 2

SetExternalInputFunction · 0.85
SetExternalInputTensorsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected