Skip to content

Commit aa1e458

Browse files
committed
Put rblas impl in a private method
1 parent 74b2bca commit aa1e458

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

src/lib.rs

+10-9
Original file line numberDiff line numberDiff line change
@@ -2310,12 +2310,11 @@ impl<A, S> ArrayBase<S, Ix>
23102310
/// of complex operands, and thus not their inner product).
23112311
///
23122312
/// **Panics** if the arrays are not of the same length.
2313-
#[cfg(not(feature="rblas"))]
23142313
pub fn dot<S2>(&self, rhs: &ArrayBase<S2, Ix>) -> A
23152314
where S2: Data<Elem=A>,
23162315
A: LinalgScalar,
23172316
{
2318-
self.dot_generic(rhs)
2317+
self.dot_impl(rhs)
23192318
}
23202319

23212320
fn dot_generic<S2>(&self, rhs: &ArrayBase<S2, Ix>) -> A
@@ -2337,14 +2336,16 @@ impl<A, S> ArrayBase<S, Ix>
23372336
sum
23382337
}
23392338

2339+
#[cfg(not(feature="rblas"))]
2340+
fn dot_impl<S2>(&self, rhs: &ArrayBase<S2, Ix>) -> A
2341+
where S2: Data<Elem=A>,
2342+
A: LinalgScalar,
2343+
{
2344+
self.dot_generic(rhs)
2345+
}
2346+
23402347
#[cfg(feature="rblas")]
2341-
/// Compute the dot product of one-dimensional arrays.
2342-
///
2343-
/// The dot product is a sum of the elementwise products (no conjugation
2344-
/// of complex operands, and thus not their inner product).
2345-
///
2346-
/// **Panics** if the arrays are not of the same length.
2347-
pub fn dot<S2>(&self, rhs: &ArrayBase<S2, Ix>) -> A
2348+
fn dot_impl<S2>(&self, rhs: &ArrayBase<S2, Ix>) -> A
23482349
where S2: Data<Elem=A>,
23492350
A: LinalgScalar,
23502351
{

0 commit comments

Comments
 (0)