chore(gpu): unify trait structs, refactor MSM API, fix naming, update docs#3325
Open
chore(gpu): unify trait structs, refactor MSM API, fix naming, update docs#3325
Conversation
ad0abb5 to
e4f022a
Compare
… docs zk-cuda-backend: - Create point_traits.h with canonical Affine<T>, Projective<T> definitions, replacing duplicates in curve.cu and common.cuh (PointSelector/ProjectiveSelector removed) - Standardize associated type name to FieldType (was Field in curve.cu) - Add mixed_add() to unified Projective<T> trait - Move MSM function declarations from curve.h to msm.h - Change MSM scratch buffer type from typed pointer to void* and add gpu_memory_allocated parameter, removing internal Montgomery conversion from unmanaged wrappers (callers must provide Montgomery points) - Add pippenger_scratch_size_g1/g2 helpers so callers can query exact scratch buffer size instead of computing it externally - Use safe_mul_sizeof from checked_arithmetic.h in managed wrappers, replacing verbose __builtin_mul_overflow blocks - Rename get_msm_threads_per_block -> msm_threads_per_block (int -> uint32_t) - Add Montgomery form annotations to Fp operator declarations - Update Rust FFI bindings to match new C API signatures - Add Display trait doc comments for G1/G2 types noting Montgomery assumption - Add NAMING_CONVENTIONS.md with full naming reference - Update README.md: project structure, MSM API examples, scratch size API, remove dead links
e4f022a to
9d73ffa
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
point_traits.hwith canonicalAffine<T>,Projective<T>definitions, replacing duplicates in
curve.cuandcommon.cuh(
PointSelector/ProjectiveSelectorremoved)FieldType(wasFieldincurve.cu)mixed_add()to unifiedProjective<T>traitcurve.htomsm.hvoid*and addgpu_memory_allocatedparameter, removing internal Montgomeryconversion from unmanaged wrappers (callers must provide Montgomery
points)
pippenger_scratch_size_g1/g2helpers so callers can query exactscratch buffer size instead of computing it externally
safe_mul_sizeoffromchecked_arithmetic.hin managed wrappers,replacing verbose
__builtin_mul_overflowblocksget_msm_threads_per_block->msm_threads_per_block(int->uint32_t)Fpoperator declarationsDisplaytrait doc comments for G1/G2 types noting Montgomery assumptionNAMING_CONVENTIONS.mdwith full naming referenceREADME.md: project structure, MSM API examples, scratch sizeAPI, remove dead links
closes: please link all relevant issues
PR content/description
Check-list: