Trait ff_cl_gen::Limb[][src]

pub trait Limb: Sized + Clone + Copy {
    type LimbType: Clone + Display;
    fn zero() -> Self;
fn new(val: Self::LimbType) -> Self;
fn value(&self) -> Self::LimbType;
fn bits() -> usize;
fn ptx_info() -> (&'static str, &'static str);
fn opencl_type() -> &'static str;
fn calc_inv(a: Self) -> Self;
fn calculate_r2<F: PrimeField>() -> Vec<Self>; fn limbs_of<T>(value: T) -> Vec<Self> { ... } }

Associated Types

Required methods

fn zero() -> Self[src]

fn new(val: Self::LimbType) -> Self[src]

fn value(&self) -> Self::LimbType[src]

fn bits() -> usize[src]

fn ptx_info() -> (&'static str, &'static str)[src]

fn opencl_type() -> &'static str[src]

fn calc_inv(a: Self) -> Self[src]

Calculate the INV parameter of Montgomery reduction algorithm for 32/64bit limbs

  • a - Is the first limb of modulus

fn calculate_r2<F: PrimeField>() -> Vec<Self>[src]

Provided methods

fn limbs_of<T>(value: T) -> Vec<Self>[src]

Implementors

impl Limb for Limb32[src]

type LimbType = u32

fn zero() -> Self[src]

fn new(val: Self::LimbType) -> Self[src]

fn value(&self) -> Self::LimbType[src]

fn bits() -> usize[src]

fn ptx_info() -> (&'static str, &'static str)[src]

fn opencl_type() -> &'static str[src]

fn calc_inv(a: Self) -> Self[src]

fn calculate_r2<F: PrimeField>() -> Vec<Self>[src]

impl Limb for Limb64[src]

type LimbType = u64

fn zero() -> Self[src]

fn new(val: Self::LimbType) -> Self[src]

fn value(&self) -> Self::LimbType[src]

fn bits() -> usize[src]

fn ptx_info() -> (&'static str, &'static str)[src]

fn opencl_type() -> &'static str[src]

fn calc_inv(a: Self) -> Self[src]

fn calculate_r2<F: PrimeField>() -> Vec<Self>[src]