[][src]Trait neptune::BatchHasher

pub trait BatchHasher<A> where
    A: Arity<Scalar>, 
{ pub fn hash(
        &mut self,
        preimages: &[GenericArray<Scalar, A>]
    ) -> Result<Vec<Scalar>, Error>; pub fn hash_into_slice(
        &mut self,
        target_slice: &mut [Scalar],
        preimages: &[GenericArray<Scalar, A>]
    ) -> Result<(), Error> { ... }
pub fn max_batch_size(&self) -> usize { ... } }

Required methods

pub fn hash(
    &mut self,
    preimages: &[GenericArray<Scalar, A>]
) -> Result<Vec<Scalar>, Error>
[src]

Loading content...

Provided methods

pub fn hash_into_slice(
    &mut self,
    target_slice: &mut [Scalar],
    preimages: &[GenericArray<Scalar, A>]
) -> Result<(), Error>
[src]

pub fn max_batch_size(&self) -> usize[src]

max_batch_size is advisory. Implenters of BatchHasher should ensure that up to the returned max hashes can be safely performed on the target GPU (currently 2080Ti). The max returned should represent a safe batch size optimized for performance. BatchHasher users are responsible for not attempting to hash batches larger than the advised maximum.

Loading content...

Implementors

impl<A> BatchHasher<A> for SimplePoseidonBatchHasher<A> where
    A: Arity<Fr>, 
[src]

Loading content...