mirror of
https://github.com/saymrwulf/pasta_curves-source.git
synced 2026-09-04 20:03:39 +00:00
Merge pull request #45 from filecoin-project/ec-gpu-020
Update to ec-gpu 0.2 release
This commit is contained in:
commit
191c416a76
4 changed files with 22 additions and 1 deletions
|
|
@ -55,7 +55,7 @@ blake2b_simd = { version = "1", optional = true, default-features = false }
|
||||||
lazy_static = { version = "1.4.0", optional = true }
|
lazy_static = { version = "1.4.0", optional = true }
|
||||||
|
|
||||||
# gpu dependencies
|
# gpu dependencies
|
||||||
ec-gpu = { version = "0.1.0", optional = true }
|
ec-gpu = { version = "0.2.0", optional = true }
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = ["bits", "sqrt-table"]
|
default = ["bits", "sqrt-table"]
|
||||||
|
|
|
||||||
|
|
@ -799,6 +799,13 @@ macro_rules! new_curve_impl {
|
||||||
*self *= *by;
|
*self *= *by;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "gpu")]
|
||||||
|
impl ec_gpu::GpuName for $name_affine {
|
||||||
|
fn name() -> alloc::string::String {
|
||||||
|
ec_gpu::name!()
|
||||||
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -770,6 +770,13 @@ impl FieldExt for Fp {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "gpu")]
|
||||||
|
impl ec_gpu::GpuName for Fp {
|
||||||
|
fn name() -> alloc::string::String {
|
||||||
|
ec_gpu::name!()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[cfg(feature = "gpu")]
|
#[cfg(feature = "gpu")]
|
||||||
impl ec_gpu::GpuField for Fp {
|
impl ec_gpu::GpuField for Fp {
|
||||||
fn one() -> alloc::vec::Vec<u32> {
|
fn one() -> alloc::vec::Vec<u32> {
|
||||||
|
|
|
||||||
|
|
@ -769,6 +769,13 @@ impl FieldExt for Fq {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "gpu")]
|
||||||
|
impl ec_gpu::GpuName for Fq {
|
||||||
|
fn name() -> alloc::string::String {
|
||||||
|
ec_gpu::name!()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[cfg(feature = "gpu")]
|
#[cfg(feature = "gpu")]
|
||||||
impl ec_gpu::GpuField for Fq {
|
impl ec_gpu::GpuField for Fq {
|
||||||
fn one() -> alloc::vec::Vec<u32> {
|
fn one() -> alloc::vec::Vec<u32> {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue