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

Changes Dot impl to be on ArrayRef for IxDyn #1494

Merged
merged 1 commit into from
Mar 25, 2025
Merged
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
7 changes: 7 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions crates/blas-tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,4 @@ openblas-cache = ["blas-src", "blas-src/openblas", "openblas-src/cache"]
netlib = ["blas-src", "blas-src/netlib"]
netlib-system = ["blas-src", "blas-src/netlib", "netlib-src/system"]
blis-system = ["blas-src", "blas-src/blis", "blis-src/system"]
accelerate = ["blas-src", "blas-src/accelerate"]
10 changes: 3 additions & 7 deletions src/linalg/impl_linalg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1099,16 +1099,12 @@ mod blas_tests
/// - The arrays have dimensions other than 1 or 2
/// - The array shapes are incompatible for the operation
/// - For vector dot product: the vectors have different lengths
///
impl<A, S, S2> Dot<ArrayBase<S2, IxDyn>> for ArrayBase<S, IxDyn>
where
S: Data<Elem = A>,
S2: Data<Elem = A>,
A: LinalgScalar,
impl<A> Dot<ArrayRef<A, IxDyn>> for ArrayRef<A, IxDyn>
where A: LinalgScalar
{
type Output = Array<A, IxDyn>;

fn dot(&self, rhs: &ArrayBase<S2, IxDyn>) -> Self::Output
fn dot(&self, rhs: &ArrayRef<A, IxDyn>) -> Self::Output
{
match (self.ndim(), rhs.ndim()) {
(1, 1) => {
Expand Down
Loading