From 9487cf83728fa2b1074c07d7abd9d41a97beb717 Mon Sep 17 00:00:00 2001 From: ImmanuelSegol <3ditds@gmail.com> Date: Thu, 29 Feb 2024 12:17:39 -0400 Subject: [PATCH] refactor --- docs/docs/icicle/rust-bindings/vec-ops.md | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/docs/docs/icicle/rust-bindings/vec-ops.md b/docs/docs/icicle/rust-bindings/vec-ops.md index 3be0d3269..d9d0370b0 100644 --- a/docs/docs/icicle/rust-bindings/vec-ops.md +++ b/docs/docs/icicle/rust-bindings/vec-ops.md @@ -155,20 +155,3 @@ pub trait VecOps { - **`add`**: Computes the element-wise sum of two vectors. - **`sub`**: Computes the element-wise difference between two vectors. - **`mul`**: Performs element-wise multiplication of two vectors. - -### Argument Validation - -Before invoking any of the above vector operations, we always call `check_vec_ops_args`, to make sure that inputs `a` and `b` can be operated on with and that the results pointer can contain the result: - -```rust -fn check_vec_ops_args(a: &HostOrDeviceSlice, b: &HostOrDeviceSlice, result: &mut HostOrDeviceSlice) { - if a.len() != b.len() || a.len() != result.len() { - panic!( - "left, right and output lengths {}; {}; {} do not match", - a.len(), - b.len(), - result.len() - ); - } -} -```