@@ -159,6 +159,7 @@ struct Instruction {
159159
160160 union {
161161 struct /* AllocTensor Operands */ {
162+ /* ! \brief The storage to allocate from. */
162163 RegName storage;
163164 /* ! \brief The number of dimensions. */
164165 uint32_t ndim;
@@ -168,6 +169,7 @@ struct Instruction {
168169 DLDataType dtype;
169170 } alloc_tensor;
170171 struct /* AllocTensorReg Operands */ {
172+ /* ! \brief The storage to allocate from. */
171173 RegName storage;
172174 /* ! \brief The register to read the shape out of. */
173175 RegName shape_register;
@@ -257,8 +259,11 @@ struct Instruction {
257259 RegName* free_vars;
258260 };
259261 struct /* AllocStorage Operands */ {
262+ /* ! \brief The size of the allocation. */
260263 RegName allocation_size;
264+ /* ! \brief The alignment of the allocation. */
261265 RegName alignment;
266+ /* ! \brief The hint of the dtype. */
262267 DLDataType dtype_hint;
263268 } alloc_storage;
264269 };
@@ -282,30 +287,32 @@ struct Instruction {
282287 static Instruction InvokePacked (Index packed_index, Index arity, Index output_size,
283288 const std::vector<RegName>& args);
284289 /* ! \brief Construct an allocate tensor instruction with constant shape.
290+ * \param storage The storage to allocate out of.
285291 * \param shape The shape of the tensor.
286292 * \param dtype The dtype of the tensor.
287293 * \param dst The destination register.
288294 * \return The allocate tensor instruction.
289295 */
290- static Instruction AllocTensor (RegName storage, const std::vector<int64_t >& shape, DLDataType dtype, RegName dst);
296+ static Instruction AllocTensor (RegName storage,
297+ const std::vector<int64_t >& shape, DLDataType dtype, RegName dst);
291298 /* ! \brief Construct an allocate tensor instruction with register.
292- * \param The storage to allocate out of.
299+ * \param storage The storage to allocate out of.
293300 * \param shape_register The register containing the shape.
294301 * \param dtype The dtype of the tensor.
295302 * \param dst The destination register.
296303 * \return The allocate tensor instruction.
297304 */
298- static Instruction AllocTensorReg (RegName storage, RegName shape_register, DLDataType dtype, RegName dst);
305+ static Instruction AllocTensorReg (RegName storage,
306+ RegName shape_register, DLDataType dtype, RegName dst);
299307 /* ! \brief Construct an allocate datatype instruction.
300- * \param The storage to allocate out of.
301308 * \param tag The datatype tag.
302309 * \param num_fields The number of fields for the datatype.
303310 * \param fields The registers containing the fields.
304311 * \param dst The register name of the destination.
305312 * \return The allocate instruction tensor.
306313 */
307314 static Instruction AllocADT (Index tag, Index num_fields, const std::vector<RegName>& fields,
308- RegName dst);
315+ RegName dst);
309316 /* ! \brief Construct an allocate closure instruction.
310317 * \param func_index The index of the function table.
311318 * \param num_freevar The number of free variables.
@@ -381,7 +388,8 @@ struct Instruction {
381388 * \param dst The destination to place the storage.
382389 * \return The alloc storage instruction.
383390 */
384- static Instruction AllocStorage (RegName size, RegName alignment, DLDataType dtype_hint, RegName dst);
391+ static Instruction AllocStorage (RegName size, RegName alignment,
392+ DLDataType dtype_hint, RegName dst);
385393
386394 Instruction ();
387395 Instruction (const Instruction& instr);
0 commit comments