MCPcopy Create free account
hub / github.com/Cambricon/mlu-ops / MLUOP_WIN_API mluOpSetSeqDataDescriptorBase

Function MLUOP_WIN_API mluOpSetSeqDataDescriptorBase

core/tensor.cpp:82–99  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

80}
81
82mluOpStatus_t MLUOP_WIN_API mluOpSetSeqDataDescriptorBase(
83 mluOpSeqDataDescriptor_t seq_data_desc, mluOpSeqDataLayout_t layout,
84 mluOpDataType_t dtype, int dimNb, const void *dimSize,
85 int seqLengthArraySize, const void *seqLengthArray, void *paddingFill) {
86 PARAM_CHECK("[mluOpSetSeqDataDescriptor]", seq_data_desc != NULL);
87 PARAM_CHECK("[mluOpSetSeqDataDescriptor]", dimSize != NULL);
88 PARAM_CHECK_GE("[mluOpSetSeqDataDescriptor]", layout, 0);
89 PARAM_CHECK_GE("[mluOpSetSeqDataDescriptor]", dtype, 0);
90 PARAM_CHECK_GT("[mluOpSetSeqDataDescriptor]", dimNb, 0);
91 PARAM_CHECK_GE("[mluOpSetSeqDataDescriptor]", seqLengthArraySize, 0);
92
93 seq_data_desc->dim = dimNb;
94 seq_data_desc->layout = layout;
95 seq_data_desc->dtype = dtype;
96 seq_data_desc->seq_length_size = seqLengthArraySize;
97 seq_data_desc->padding_fill = paddingFill;
98 return MLUOP_STATUS_SUCCESS;
99}
100
101mluOpStatus_t MLUOP_WIN_API mluOpSetSeqDataDescriptor(
102 mluOpSeqDataDescriptor_t seq_data_desc, mluOpSeqDataLayout_t layout,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected