We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Using Blaze, the result of a matrix * vector is the same as their dot product:
blaze::DynamicVector<int> a{1, 1, 0}; blaze::DynamicMatrix<int> b{{1, 2, 3}, {-1, -2, -3}}; auto ans = b * a;
would results in
( 3 ) ( -3 )
Having a matrix * matrix is also results in their dot product:
blaze::DynamicMatrix<int> a{{1, 0}, {1, -1}, {2, -2}}; blaze::DynamicMatrix<int> b{{1, 2, 3}, {-1, -2, -3}}; auto ans = b * a;
( 9 -8 ) ( -9 8 )
That would be really useful to have the same overloads for a tensor. I think we need to add the equivalents of dot3d1d, dot3d2d and dot2d3d.
For example, for calculating tensor * vector (like in dot3d1d), the for loop in the following:
for
blaze::DynamicVector<int> a{1, 1, 0}; blaze::DynamicTensor<int> b{{{1, 2, 3}, {-1, -2, -3}}, {{4, 5, 6}, {-4, -5, -6}}}; blaze::DynamicMatrix<int> ans(b.pages(), b.rows()); for (std::size_t i = 0; i != b.pages(); ++i) blaze::row(blaze::submatrix(ans, i, 0, 1, b.rows()), 0) = blaze::trans(blaze::pageslice(b, i) * a);
would results in the desired ans = b*a.
ans = b*a
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Using Blaze, the result of a matrix * vector is the same as their dot product:
would results in
Having a matrix * matrix is also results in their dot product:
That would be really useful to have the same overloads for a tensor. I think we need to add the equivalents of dot3d1d, dot3d2d and dot2d3d.
For example, for calculating tensor * vector (like in dot3d1d), the
for
loop in the following:would results in the desired
ans = b*a
.The text was updated successfully, but these errors were encountered: