Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremyfelder committed Jun 17, 2024
1 parent 5bc150b commit 291ec2b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions icicle/include/msm/msm.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,8 @@ namespace msm {
* @param msm_size MSM size \f$ N \f$. If a batch of MSMs (which all need to have the same size) is computed, this is
* the size of 1 MSM.
* @param config [MSMConfig](@ref MSMConfig) used in this MSM.
* @param output_points Device-allocated buffer of size config.points_size * precompute_factor for the extended points.
* @param output_points Device-allocated buffer of size config.points_size * precompute_factor for the extended
* points.
* @tparam A The type of points \f$ \{P_i\} \f$ which is typically an [affine
* Weierstrass](https://hyperelliptic.org/EFD/g1p/auto-shortw.html) point.
* @return `cudaSuccess` if the execution was successful and an error code otherwise.
Expand All @@ -146,7 +147,7 @@ namespace msm {
template <typename A, typename P>
cudaError_t precompute_msm_points(A* points, int msm_size, msm::MSMConfig& config, A* output_points);

/**
/**
* A function that precomputes MSM bases by extending them with their shifted copies.
* e.g.:
* Original points: \f$ P_0, P_1, P_2, ... P_{size} \f$
Expand All @@ -167,8 +168,7 @@ namespace msm {
*
*/
template <typename A, typename P>
[[deprecated("Use precompute_msm_points instead.")]]
cudaError_t precompute_msm_bases(
[[deprecated("Use precompute_msm_points instead.")]] cudaError_t precompute_msm_bases(
A* bases,
int bases_size,
int precompute_factor,
Expand Down
6 changes: 3 additions & 3 deletions icicle/src/msm/msm.cu
Original file line number Diff line number Diff line change
Expand Up @@ -905,15 +905,15 @@ namespace msm {
unsigned NUM_BLOCKS = (config.points_size + NUM_THREADS - 1) / NUM_THREADS;
for (int i = 1; i < config.precompute_factor; i++) {
left_shift_kernel<A, P><<<NUM_BLOCKS, NUM_THREADS, 0, stream>>>(
&output_points[(i - 1) * config.points_size], shift, config.points_size, &output_points[i * config.points_size]);
&output_points[(i - 1) * config.points_size], shift, config.points_size,
&output_points[i * config.points_size]);
}

return CHK_LAST();
}

template <typename A, typename P>
[[deprecated("Use precompute_msm_points instead.")]]
cudaError_t precompute_msm_bases(
[[deprecated("Use precompute_msm_points instead.")]] cudaError_t precompute_msm_bases(
A* bases,
int bases_size,
int precompute_factor,
Expand Down
6 changes: 3 additions & 3 deletions wrappers/rust/icicle-core/src/msm/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ pub fn msm<C: Curve + MSM<C>>(
/// * `output_bases` - Device-allocated buffer of size `bases_size` * `precompute_factor` for the extended bases.
///
/// Returns `Ok(())` if no errors occurred or a `CudaError` otherwise.
#[deprecated(since="2.5.0", note="Please use `precompute_points` instead")]
#[deprecated(since = "2.5.0", note = "Please use `precompute_points` instead")]
pub fn precompute_bases<C: Curve + MSM<C>>(
points: &(impl HostOrDeviceSlice<Affine<C>> + ?Sized),
precompute_factor: i32,
Expand Down Expand Up @@ -307,7 +307,7 @@ macro_rules! impl_msm {
ctx: &DeviceContext,
output_bases: *mut Affine<$curve>,
) -> CudaError;

#[link_name = concat!($curve_prefix, "_precompute_msm_points_cuda")]
pub(crate) fn precompute_points_cuda(
points: *const Affine<$curve>,
Expand Down Expand Up @@ -357,7 +357,7 @@ macro_rules! impl_msm {
.wrap()
}
}

fn precompute_points_unchecked(
points: &(impl HostOrDeviceSlice<Affine<$curve>> + ?Sized),
msm_size: i32,
Expand Down

0 comments on commit 291ec2b

Please sign in to comment.