forked from M-Labs/nac3
core/ndstrides: fix alloca_ndarray comment
This commit is contained in:
parent
ac7cc15d90
commit
7e056b9747
|
@ -17,18 +17,16 @@ use crate::{
|
||||||
typecheck::typedef::{Type, TypeEnum},
|
typecheck::typedef::{Type, TypeEnum},
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/// Allocate an ndarray on the stack given its `ndims`.
|
||||||
Allocate an ndarray on the stack given its `ndims`.
|
///
|
||||||
|
/// `shape` and `strides` will be automatically allocated on the stack.
|
||||||
`shape` and `strides` will be automatically allocated on the stack.
|
///
|
||||||
|
/// The returned ndarray's content will be:
|
||||||
The returned ndarray's content will be:
|
/// - `data`: `nullptr`
|
||||||
- `data`: `nullptr`
|
/// - `itemsize`: **uninitialized** value
|
||||||
- `itemsize`: **uninitialized** value
|
/// - `ndims`: initialized value, set to the input `ndims`
|
||||||
- `ndims`: initialized value, set to the input `ndims`
|
/// - `shape`: initialized pointer to an allocated stack with **uninitialized** values
|
||||||
- `shape`: initialized pointer to an allocated stack with **uninitialized** values
|
/// - `strides`: 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>(
|
pub fn alloca_ndarray<'ctx, G>(
|
||||||
generator: &mut G,
|
generator: &mut G,
|
||||||
ctx: &mut CodeGenContext<'ctx, '_>,
|
ctx: &mut CodeGenContext<'ctx, '_>,
|
||||||
|
|
Loading…
Reference in New Issue