API: added diag(matrix)
This commit is contained in:
@@ -118,7 +118,7 @@ std::string axpy::generate_impl(std::string const & suffix, math_expression cons
|
||||
std::string array_access = "#scalartype #namereg = #pointer[#index];";
|
||||
std::string matrix_row = dtype + " #namereg = " + vload(p_.simd_width, "#scalartype", "i", "#pointer + #row*#stride", "#ld", backend, false) + ";";
|
||||
std::string matrix_column = dtype + " #namereg = " + vload(p_.simd_width, "#scalartype", "i*#stride", "#pointer + #column*#ld", "#stride", backend, false) + ";";
|
||||
std::string matrix_diag = dtype + " #namereg = " + vload(p_.simd_width, "#scalartype", "i*(#ld + #stride)", "#pointer + (#diag_offset<0)?-#diag_offset:(#diag_offset*#ld)", "#ld + #stride", backend, false) + ";";
|
||||
std::string matrix_diag = dtype + " #namereg = " + vload(p_.simd_width, "#scalartype", "i*(#ld + #stride)", "#pointer + ((#diag_offset<0)?-#diag_offset:(#diag_offset*#ld))", "#ld + #stride", backend, false) + ";";
|
||||
process(stream, RHS_NODE_TYPE, {{"array1", array1}, {"matrix_row", matrix_row}, {"matrix_column", matrix_column},
|
||||
{"matrix_diag", matrix_diag}, {"array_access", array_access}}, expressions, idx, mappings, processed);
|
||||
}
|
||||
@@ -165,7 +165,7 @@ std::string axpy::generate_impl(std::string const & suffix, math_expression cons
|
||||
stream.dec_tab();
|
||||
stream << "}" << std::endl;
|
||||
|
||||
// std::cout << stream.str() << std::endl;
|
||||
std::cout << stream.str() << std::endl;
|
||||
|
||||
return stream.str();
|
||||
}
|
||||
|
Reference in New Issue
Block a user