Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rm useless generics for DensePolynomial #903

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions poly/benches/dense_uv_polynomial.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ fn bench_sparse_poly_evaluate<F: Field>(b: &mut Bencher, non_zero_entries: &usiz
fn bench_poly_evaluate<F: Field>(b: &mut Bencher, degree: &usize) {
// Per benchmark setup
let mut rng = &mut ark_std::test_rng();
let poly = DensePolynomial::<F>::rand(*degree, &mut rng);
let poly = DensePolynomial::rand(*degree, &mut rng);
b.iter(|| {
// Per benchmark iteration
let pt = F::rand(&mut rng);
Expand All @@ -71,7 +71,7 @@ fn bench_poly_add<F: Field>(b: &mut Bencher, degree: &usize) {
// Per benchmark setup
let mut rng = &mut ark_std::test_rng();
let poly_one = DensePolynomial::<F>::rand(*degree, &mut rng);
let poly_two = DensePolynomial::<F>::rand(*degree, &mut rng);
let poly_two = DensePolynomial::rand(*degree, &mut rng);
b.iter(|| {
// Per benchmark iteration
let _poly_three = &poly_one + &poly_two;
Expand Down
2 changes: 1 addition & 1 deletion poly/benches/fft.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ fn fft_setup_with_domain_size<F: FftField, D: EvaluationDomain<F>>(
) -> (D, Vec<F>) {
let mut rng = &mut ark_std::test_rng();
let domain = D::new(domain_size).unwrap();
let a = DensePolynomial::<F>::rand(degree - 1, &mut rng)
let a = DensePolynomial::rand(degree - 1, &mut rng)
.coeffs()
.to_vec();
(domain, a)
Expand Down
6 changes: 3 additions & 3 deletions poly/src/polynomial/univariate/dense.rs
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ impl<F: FftField> DensePolynomial<F> {

if self.coeffs.len() < domain_size {
// If degree(self) < len(Domain), then the quotient is zero, and the entire polynomial is the remainder
(DensePolynomial::<F>::zero(), self.clone())
(DensePolynomial::zero(), self.clone())
} else {
// Compute the quotient
//
Expand Down Expand Up @@ -206,8 +206,8 @@ impl<F: FftField> DensePolynomial<F> {
.zip(&quotient_vec)
.for_each(|(s, c)| *s += c);

let quotient = DensePolynomial::<F>::from_coefficients_vec(quotient_vec);
let remainder = DensePolynomial::<F>::from_coefficients_vec(remainder_vec);
let quotient = DensePolynomial::from_coefficients_vec(quotient_vec);
let remainder = DensePolynomial::from_coefficients_vec(remainder_vec);
(quotient, remainder)
}
}
Expand Down
Loading