Compare commits
No commits in common. "eceeee1c50867dc6d9a26b3c6e7efa6bba19c7ac" and "777077a72320d44c837971b3c435b4e44830d0b7" have entirely different histories.
eceeee1c50
...
777077a723
|
@ -1108,13 +1108,13 @@ where
|
||||||
pub fn call_abs<'ctx, G: CodeGenerator + ?Sized>(
|
pub fn call_abs<'ctx, G: CodeGenerator + ?Sized>(
|
||||||
generator: &mut G,
|
generator: &mut G,
|
||||||
ctx: &mut CodeGenContext<'ctx, '_>,
|
ctx: &mut CodeGenContext<'ctx, '_>,
|
||||||
n: (Type, BasicValueEnum<'ctx>),
|
arg: (Type, BasicValueEnum<'ctx>),
|
||||||
) -> Result<BasicValueEnum<'ctx>, String> {
|
) -> Result<BasicValueEnum<'ctx>, String> {
|
||||||
const FN_NAME: &str = "abs";
|
const FN_NAME: &str = "abs";
|
||||||
helper_call_numpy_unary_elementwise(
|
helper_call_numpy_unary_elementwise(
|
||||||
generator,
|
generator,
|
||||||
ctx,
|
ctx,
|
||||||
n,
|
arg,
|
||||||
FN_NAME,
|
FN_NAME,
|
||||||
&|_ctx, elem_ty| elem_ty,
|
&|_ctx, elem_ty| elem_ty,
|
||||||
&|_generator, ctx, val_ty, val| match val {
|
&|_generator, ctx, val_ty, val| match val {
|
||||||
|
@ -1192,7 +1192,6 @@ macro_rules! create_helper_call_numpy_unary_elementwise {
|
||||||
/// * `$fn_name:literal`: To be passed to the `fn_name` parameter of [`helper_call_numpy_unary_elementwise`].
|
/// * `$fn_name:literal`: To be passed to the `fn_name` parameter of [`helper_call_numpy_unary_elementwise`].
|
||||||
/// * `$on_scalar:expr`: The closure (see below for its type) that acts on float scalar values and returns
|
/// * `$on_scalar:expr`: The closure (see below for its type) that acts on float scalar values and returns
|
||||||
/// the boolean results of LLVM type `i1`. The returned `i1` value will be converted into an `i8`.
|
/// the boolean results of LLVM type `i1`. The returned `i1` value will be converted into an `i8`.
|
||||||
///
|
|
||||||
/// ```rust
|
/// ```rust
|
||||||
/// // Type of `$on_scalar:expr`
|
/// // Type of `$on_scalar:expr`
|
||||||
/// fn on_scalar<'ctx, G: CodeGenerator + ?Sized>(
|
/// fn on_scalar<'ctx, G: CodeGenerator + ?Sized>(
|
||||||
|
@ -1228,7 +1227,6 @@ macro_rules! create_helper_call_numpy_unary_elementwise_float_to_bool {
|
||||||
/// * `$name:ident`: The identifier of the rust function to be generated.
|
/// * `$name:ident`: The identifier of the rust function to be generated.
|
||||||
/// * `$fn_name:literal`: To be passed to the `fn_name` parameter of [`helper_call_numpy_unary_elementwise`].
|
/// * `$fn_name:literal`: To be passed to the `fn_name` parameter of [`helper_call_numpy_unary_elementwise`].
|
||||||
/// * `$on_scalar:expr`: The closure (see below for its type) that acts on float scalar values and returns float results.
|
/// * `$on_scalar:expr`: The closure (see below for its type) that acts on float scalar values and returns float results.
|
||||||
///
|
|
||||||
/// ```rust
|
/// ```rust
|
||||||
/// // Type of `$on_scalar:expr`
|
/// // Type of `$on_scalar:expr`
|
||||||
/// fn on_scalar<'ctx, G: CodeGenerator + ?Sized>(
|
/// fn on_scalar<'ctx, G: CodeGenerator + ?Sized>(
|
||||||
|
|
Loading…
Reference in New Issue