diff --git a/Cargo.toml b/Cargo.toml index 984a56d..08473fe 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -55,7 +55,7 @@ blake2b_simd = { version = "1", optional = true, default-features = false } lazy_static = { version = "1.4.0", optional = true } # gpu dependencies -ec-gpu = { version = "0.1.0", optional = true } +ec-gpu = { version = "0.2.0", optional = true } [features] default = ["bits", "sqrt-table"] diff --git a/src/curves.rs b/src/curves.rs index 8efc206..2fda775 100644 --- a/src/curves.rs +++ b/src/curves.rs @@ -799,6 +799,13 @@ macro_rules! new_curve_impl { *self *= *by; } } + + #[cfg(feature = "gpu")] + impl ec_gpu::GpuName for $name_affine { + fn name() -> alloc::string::String { + ec_gpu::name!() + } + } }; } diff --git a/src/fields/fp.rs b/src/fields/fp.rs index 0c0028c..08687fd 100644 --- a/src/fields/fp.rs +++ b/src/fields/fp.rs @@ -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")] impl ec_gpu::GpuField for Fp { fn one() -> alloc::vec::Vec { diff --git a/src/fields/fq.rs b/src/fields/fq.rs index 4d80c69..f22f61b 100644 --- a/src/fields/fq.rs +++ b/src/fields/fq.rs @@ -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")] impl ec_gpu::GpuField for Fq { fn one() -> alloc::vec::Vec {