From 7e056b9747564c568401422d14b71e86f4328bfd Mon Sep 17 00:00:00 2001 From: lyken Date: Tue, 30 Jul 2024 15:09:14 +0800 Subject: [PATCH] core/ndstrides: fix alloca_ndarray comment --- nac3core/src/codegen/numpy_new/util.rs | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/nac3core/src/codegen/numpy_new/util.rs b/nac3core/src/codegen/numpy_new/util.rs index 3b5f3b31..6351614f 100644 --- a/nac3core/src/codegen/numpy_new/util.rs +++ b/nac3core/src/codegen/numpy_new/util.rs @@ -17,18 +17,16 @@ use crate::{ typecheck::typedef::{Type, TypeEnum}, }; -/** - Allocate an ndarray on the stack given its `ndims`. - - `shape` and `strides` will be automatically allocated on the stack. - - The returned ndarray's content will be: - - `data`: `nullptr` - - `itemsize`: **uninitialized** value - - `ndims`: initialized value, set to the input `ndims` - - `shape`: initialized pointer to an allocated stack with **uninitialized** values - - `strides`: initialized pointer to an allocated stack with **uninitialized** values -*/ +/// Allocate an ndarray on the stack given its `ndims`. +/// +/// `shape` and `strides` will be automatically allocated on the stack. +/// +/// The returned ndarray's content will be: +/// - `data`: `nullptr` +/// - `itemsize`: **uninitialized** value +/// - `ndims`: initialized value, set to the input `ndims` +/// - `shape`: initialized pointer to an allocated stack with **uninitialized** values +/// - `strides`: initialized pointer to an allocated stack with **uninitialized** values pub fn alloca_ndarray<'ctx, G>( generator: &mut G, ctx: &mut CodeGenContext<'ctx, '_>,