-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bigint impl for refactored metal EC backend (#21)
* feat: import mont_mul backend from https://github.com/geometryxyz/msl-secp256k1 * chore: add refactored metal_msm, will remove the previous one once this is completed * chore: migrate prev utils mod to refactored metal msm * feat: conversion between bigint and arbitrary limb size * lint * chore: ignore all metal ir and lib * test(bigint): add host test * test(bigint): adapt from https://github.com/geometryxyz/msl-secp256k1 * chore: ignore all constants file since it's been automatically generated * refactor: add overflow detection and correct suitable bigint val for each cases
- Loading branch information
Showing
39 changed files
with
2,702 additions
and
1 deletion.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
use thiserror::Error; | ||
|
||
#[derive(Debug, Error)] | ||
pub enum MetalError { | ||
#[error("Couldn't find a system default device for Metal")] | ||
DeviceNotFound(), | ||
#[error("Couldn't create a new Metal library: {0}")] | ||
LibraryError(String), | ||
#[error("Couldn't create a new Metal function object: {0}")] | ||
FunctionError(String), | ||
#[error("Couldn't create a new Metal compute pipeline: {0}")] | ||
PipelineError(String), | ||
#[error("Could not calculate {1} root of unity")] | ||
RootOfUnityError(String, u64), | ||
// #[error("Input length is {0}, which is not a power of two")] | ||
// InputError(usize), | ||
#[error("Invalid input: {0}")] | ||
InputError(String), | ||
} |
Oops, something went wrong.