[][src]Trait ff_cl_gen::Limb

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

Loading content...

Required methods

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

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>

Loading content...

Provided methods

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

Loading content...

Implementors

impl Limb for Limb32[src]

type LimbType = u32

impl Limb for Limb64[src]

type LimbType = u64

Loading content...