|
Prev
| Next
|
|
|
|
|
|
atomic_four_mat_mul_get.hpp |
|
@(@\newcommand{\W}[1]{ \; #1 \; }
\newcommand{\R}[1]{ {\rm #1} }
\newcommand{\B}[1]{ {\bf #1} }
\newcommand{\D}[2]{ \frac{\partial #1}{\partial #2} }
\newcommand{\DD}[3]{ \frac{\partial^2 #1}{\partial #2 \partial #3} }
\newcommand{\Dpow}[2]{ \frac{\partial^{#1}}{\partial {#2}^{#1}} }
\newcommand{\dpow}[2]{ \frac{ {\rm d}^{#1}}{{\rm d}\, {#2}^{#1}} }@)@This is cppad-20221105 documentation. Here is a link to its
current documentation
.
atomic_mat_mul Get Routine: Example Implementation
Syntax
mat_mul.get(call_id, n_left, n_middle, n_right)
Prototype
template <class Base>
void atomic_mat_mul<Base>::get(
size_t call_id, size_t& n_left, size_t& n_middle, size_t& n_right
)
Purpose
Retrieves the dimension information for a an atomic operation that computes
the matrix product
R = A * B
.
call_id
This argument identifies the dimension information for this matrix product.
n_left
This result is the row dimension of the matrices
A
and
R
.
n_middle
This result is the column dimension of the matrix
A
and row dimension of the matrix
B
.
n_right
This result is the column dimension of the matrices
B
and
R
.
Source
# include <cppad/example/atomic_four/mat_mul/mat_mul.hpp>
namespace CppAD { // BEGIN_CPPAD_NAMESPACE
// BEGIN PROTOTYPE
template <class Base>
void atomic_mat_mul<Base>::get(
size_t call_id, size_t& n_left, size_t& n_middle, size_t& n_right
)
// END PROTOTYPE
{
// thread
size_t thread = thread_alloc::thread_num();
assert( work_[thread] != nullptr );
assert( thread == (*work_[thread])[call_id].thread );
//
// n_left, n_middle, n_right
call_struct& call = (*work_[thread])[call_id];
n_left = call.n_left;
n_middle = call.n_middle;
n_right = call.n_right;
//
return;
}
} // END_CPPAD_NAMESPACE
Input File: include/cppad/example/atomic_four/mat_mul/get.hpp