From b2cad08a6d13aa91b8988cda07285f98ce171bbf Mon Sep 17 00:00:00 2001 From: emirsoyturk Date: Thu, 23 Jan 2025 13:38:12 +0200 Subject: [PATCH] spelling and format fix --- .../version-2.8.0/icicle/primitives/msm.md | 2 +- examples/c++/polynomial-multiplication/example.cpp | 2 +- icicle/backend/cpu/src/field/cpu_vec_ops.cpp | 3 +-- icicle/include/icicle/backend/vec_ops_backend.h | 11 +++++------ icicle/src/vec_ops.cpp | 10 ++++------ wrappers/rust/icicle-core/src/msm/mod.rs | 2 +- 6 files changed, 13 insertions(+), 17 deletions(-) diff --git a/docs/versioned_docs/version-2.8.0/icicle/primitives/msm.md b/docs/versioned_docs/version-2.8.0/icicle/primitives/msm.md index 7cb4a0abf..234cbae1c 100644 --- a/docs/versioned_docs/version-2.8.0/icicle/primitives/msm.md +++ b/docs/versioned_docs/version-2.8.0/icicle/primitives/msm.md @@ -79,7 +79,7 @@ The MSM supports batch mode - running multiple MSMs in parallel. It's always bet struct MSMConfig { device_context::DeviceContext ctx; /**< Details related to the device such as its id and stream id. */ int points_size; /**< Number of points in the MSM. If a batch of MSMs needs to be computed, this should be - * a number of different points. So, if each MSM re-uses the same set of points, this + * a number of different points. So, if each MSM reuses the same set of points, this * variable is set equal to the MSM size. And if every MSM uses a distinct set of * points, it should be set to the product of MSM size and [batch_size](@ref * batch_size). Default value: 0 (meaning it's equal to the MSM size). */ diff --git a/examples/c++/polynomial-multiplication/example.cpp b/examples/c++/polynomial-multiplication/example.cpp index bbc50bfa0..49d916776 100644 --- a/examples/c++/polynomial-multiplication/example.cpp +++ b/examples/c++/polynomial-multiplication/example.cpp @@ -23,7 +23,7 @@ void incremental_values(scalar_t* res, uint32_t count) } } -// calcaulting polynomial multiplication A*B via NTT,pointwise-multiplication and INTT +// calculating polynomial multiplication A*B via NTT,pointwise-multiplication and INTT // (1) allocate A,B on HOST. Randomize first half, zero second half // (2) allocate A,B,Res on device // (3) calc NTT for A and for B from host to device diff --git a/icicle/backend/cpu/src/field/cpu_vec_ops.cpp b/icicle/backend/cpu/src/field/cpu_vec_ops.cpp index db5ba8784..9423e4d35 100644 --- a/icicle/backend/cpu/src/field/cpu_vec_ops.cpp +++ b/icicle/backend/cpu/src/field/cpu_vec_ops.cpp @@ -487,8 +487,7 @@ REGISTER_VECTOR_DIV_BACKEND("CPU", cpu_vector_div); /*********************************** INV ***********************************/ template -eIcicleError cpu_vector_inv( - const Device& device, const T* vec_a, uint64_t size, const VecOpsConfig& config, T* output) +eIcicleError cpu_vector_inv(const Device& device, const T* vec_a, uint64_t size, const VecOpsConfig& config, T* output) { return cpu_2vectors_op(VecOperation::VECTOR_INV, vec_a, vec_a, size, config, output); } diff --git a/icicle/include/icicle/backend/vec_ops_backend.h b/icicle/include/icicle/backend/vec_ops_backend.h index 98e405863..4a6175658 100644 --- a/icicle/include/icicle/backend/vec_ops_backend.h +++ b/icicle/include/icicle/backend/vec_ops_backend.h @@ -103,15 +103,14 @@ namespace icicle { void register_vector_inv(const std::string& deviceType, VectorReduceOpImpl impl); -#define REGISTER_VECTOR_INV_BACKEND(DEVICE_TYPE, FUNC) \ +#define REGISTER_VECTOR_INV_BACKEND(DEVICE_TYPE, FUNC) \ namespace { \ - static bool UNIQUE(_reg_vec_inv) = []() -> bool { \ - register_vector_inv(DEVICE_TYPE, FUNC); \ + static bool UNIQUE(_reg_vec_inv) = []() -> bool { \ + register_vector_inv(DEVICE_TYPE, FUNC); \ return true; \ }(); \ } - void register_vector_sub(const std::string& deviceType, scalarVectorOpImpl impl); #define REGISTER_VECTOR_SUB_BACKEND(DEVICE_TYPE, FUNC) \ namespace { \ @@ -318,8 +317,8 @@ namespace icicle { #define REGISTER_VECTOR_INV_EXT_FIELD_BACKEND(DEVICE_TYPE, FUNC) \ namespace { \ - static bool UNIQUE(_reg_vec_inv_ext_field) = []() -> bool { \ - register_extension_vector_inv(DEVICE_TYPE, FUNC); \ + static bool UNIQUE(_reg_vec_inv_ext_field) = []() -> bool { \ + register_extension_vector_inv(DEVICE_TYPE, FUNC); \ return true; \ }(); \ } diff --git a/icicle/src/vec_ops.cpp b/icicle/src/vec_ops.cpp index 81f4249fe..5366698a3 100644 --- a/icicle/src/vec_ops.cpp +++ b/icicle/src/vec_ops.cpp @@ -247,15 +247,14 @@ namespace icicle { /*********************************** INV ***********************************/ ICICLE_DISPATCHER_INST(VectorInvDispatcher, vector_inv, VectorReduceOpImpl); - extern "C" eIcicleError CONCAT_EXPAND(FIELD, vector_inv)( - const scalar_t* vec_a, uint64_t size, const VecOpsConfig* config, scalar_t* output) + extern "C" eIcicleError + CONCAT_EXPAND(FIELD, vector_inv)(const scalar_t* vec_a, uint64_t size, const VecOpsConfig* config, scalar_t* output) { return VectorInvDispatcher::execute(vec_a, size, *config, output); } template <> - eIcicleError - vector_inv(const scalar_t* vec_a, uint64_t size, const VecOpsConfig& config, scalar_t* output) + eIcicleError vector_inv(const scalar_t* vec_a, uint64_t size, const VecOpsConfig& config, scalar_t* output) { return CONCAT_EXPAND(FIELD, vector_inv)(vec_a, size, &config, output); } @@ -270,8 +269,7 @@ namespace icicle { } template <> - eIcicleError vector_inv( - const extension_t* vec_a, uint64_t size, const VecOpsConfig& config, extension_t* output) + eIcicleError vector_inv(const extension_t* vec_a, uint64_t size, const VecOpsConfig& config, extension_t* output) { return CONCAT_EXPAND(FIELD, extension_vector_inv)(vec_a, vec_b, size, &config, output); } diff --git a/wrappers/rust/icicle-core/src/msm/mod.rs b/wrappers/rust/icicle-core/src/msm/mod.rs index 17a4ed1a8..73a2dceb3 100644 --- a/wrappers/rust/icicle-core/src/msm/mod.rs +++ b/wrappers/rust/icicle-core/src/msm/mod.rs @@ -95,7 +95,7 @@ pub trait MSM { /// * `scalars` - scalar values `s1, s2, ..., sn`. /// /// * `bases` - bases `P1, P2, ..., Pn`. The number of bases can be smaller than the number of scalars -/// in the case of batch MSM. In this case bases are re-used periodically. Alternatively, there can be more bases +/// in the case of batch MSM. In this case bases are reused periodically. Alternatively, there can be more bases /// than scalars if precomputation has been performed, you need to set `cfg.precompute_factor` in that case. /// /// * `cfg` - config used to specify extra arguments of the MSM.