[][src]Function reikna::factor::quick_factorize

pub fn quick_factorize(value: u64) -> Vec<u64>

Return a Vec<u64> of value's prime factorization.

This is a helper function that calls quick_factorize_wsp(), using value and a generated list of primes for the arguments. See quick_factorize_wsp() for more information.

Because this function generates a list of primes each time it is called, it is preferable to use quick_factorize_wsp() directly with an explicit list of primes if numerous factorizations are being computed.

Panics

Panics if prime_sieve(), see the documentation for this function for more information.

Examples

use reikna::factor::quick_factorize;
assert_eq!(quick_factorize(65_536), vec![2; 16]);
assert_eq!(quick_factorize(9_223_372_036_854_775_807), 
           vec![7, 7, 73, 127, 337, 92737, 649657]);