Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
eff687b
Masked outer product implementation
aleksamilisavljevic Jan 26, 2024
1a9663b
Add unit test for the masked outer product
aleksamilisavljevic Jan 26, 2024
de9a6ce
OpenMP support and code changes
aleksamilisavljevic Feb 13, 2024
99a1040
test improvement
aleksamilisavljevic Feb 13, 2024
f5562e1
code cleanup
aleksamilisavljevic Feb 13, 2024
f64dee8
clear the matrix in special cases
aleksamilisavljevic Feb 13, 2024
ef07fec
special case of an empty mask
aleksamilisavljevic Feb 13, 2024
b79e7ff
empty mask special case
aleksamilisavljevic Feb 15, 2024
7b3f795
nonblocking implementation
byjtew Feb 16, 2024
99f5c84
Merge branch 'develop' into 283-provide-the-implementation-of-the-mas…
byjtew Feb 16, 2024
8dff749
Implementation in base + documentation
byjtew Feb 16, 2024
0a89a08
hyperdags implementation
byjtew Feb 16, 2024
6843e53
bsp1d+hybrid implementation
byjtew Feb 16, 2024
cbae669
Enable test for all backends
byjtew Feb 16, 2024
8b48135
rename maskedOuter to outer
aleksamilisavljevic Feb 15, 2024
abcc356
Masked outer product implementation
aleksamilisavljevic Jan 26, 2024
89b1184
Add unit test for the masked outer product
aleksamilisavljevic Jan 26, 2024
4dc1e37
OpenMP support and code changes
aleksamilisavljevic Feb 13, 2024
dfafe0c
test improvement
aleksamilisavljevic Feb 13, 2024
a73fcb1
code cleanup
aleksamilisavljevic Feb 13, 2024
6b91b64
clear the matrix in special cases
aleksamilisavljevic Feb 13, 2024
e91f9ed
special case of an empty mask
aleksamilisavljevic Feb 13, 2024
76bd102
empty mask special case
aleksamilisavljevic Feb 15, 2024
279894c
nonblocking implementation
byjtew Feb 16, 2024
eeed910
Implementation in base + documentation
byjtew Feb 16, 2024
28281fd
hyperdags implementation
byjtew Feb 16, 2024
6d3522b
bsp1d+hybrid implementation
byjtew Feb 16, 2024
f15bc07
Enable test for all backends
byjtew Feb 16, 2024
4a171bd
rename maskedOuter to outer
aleksamilisavljevic Feb 15, 2024
98d62b2
rename
aleksamilisavljevic Feb 16, 2024
7addcf7
descriptors support
aleksamilisavljevic Feb 19, 2024
fcf975f
Merge branch '283-provide-the-implementation-of-the-masked-outer-prod…
aleksamilisavljevic Feb 19, 2024
296ca85
unmerged conflict
aleksamilisavljevic Feb 19, 2024
e9012ba
code cleanup
aleksamilisavljevic Feb 20, 2024
b038241
Merge branch 'develop' into 283-provide-the-implementation-of-the-mas…
byjtew Feb 22, 2024
da9de37
unsupport structural complement
aleksamilisavljevic Feb 24, 2024
7289248
fix print of the unit test
aleksamilisavljevic Feb 26, 2024
c410d8f
code cleanup
aleksamilisavljevic Feb 26, 2024
9df4dc7
Merge branch 'develop' into 283-provide-the-implementation-of-the-mas…
aleksamilisavljevic Feb 26, 2024
b063624
unit test fix
aleksamilisavljevic Feb 26, 2024
883479e
code cleanup
aleksamilisavljevic Feb 26, 2024
c36b4d9
handle void matrix mask
aleksamilisavljevic Feb 26, 2024
e5223c1
handle invert masks properly
aleksamilisavljevic Feb 27, 2024
8e71a73
add name to notice
aleksamilisavljevic Feb 28, 2024
ff84662
Update NOTICE
byjtew Feb 28, 2024
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
4 changes: 2 additions & 2 deletions include/graphblas/base/blas3.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ namespace grb {
typename RIT, typename CIT, typename NIT,
Backend backend
>
RC maskedOuter(
RC outer(
Matrix< OutputType, backend, RIT, CIT, NIT > &A,
const Matrix< MaskType, backend, RIT, CIT, NIT > &mask,
const Vector< InputType1, backend, Coords > &u,
Expand All @@ -521,7 +521,7 @@ namespace grb {
(void) op;
(void) phase;
#ifdef _DEBUG
std::cerr << "Selected backend does not implement grb::maskedOuter\n";
std::cerr << "Selected backend does not implement grb::outer\n";
#endif
#ifndef NDEBUG
const bool selected_backend_does_not_support_masked_outer = false;
Expand Down
4 changes: 2 additions & 2 deletions include/graphblas/bsp1d/blas3.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ namespace grb {
typename Coords,
typename RIT, typename CIT, typename NIT
>
RC maskedOuter(
RC outer(
Matrix< OutputType, BSP1D, RIT, CIT, NIT > &A,
const Matrix< MaskType, BSP1D, RIT, CIT, NIT > &mask,
const Vector< InputType1, BSP1D, Coords > &u,
Expand All @@ -230,7 +230,7 @@ namespace grb {
void >::type * const = nullptr
) {
assert( phase != TRY );
RC ret = maskedOuter< descr, Operator >(
RC ret = outer< descr, Operator >(
internal::getLocal( A ),
internal::getLocal( mask ),
internal::getLocal( u ),
Expand Down
4 changes: 2 additions & 2 deletions include/graphblas/hyperdags/blas3.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ namespace grb {
typename Coords,
typename RIT, typename CIT, typename NIT
>
RC maskedOuter(
RC outer(
Matrix< OutputType, hyperdags, RIT, CIT, NIT > &A,
const Matrix< MaskType, hyperdags, RIT, CIT, NIT > &mask,
const Vector< InputType1, hyperdags, Coords > &u,
Expand All @@ -280,7 +280,7 @@ namespace grb {
!grb::is_object< OutputType >::value,
void >::type * const = nullptr
) {
const RC ret = maskedOuter< descr >(
const RC ret = outer< descr >(
internal::getMatrix( A ),
internal::getMatrix( mask ),
internal::getVector( u ),
Expand Down
6 changes: 3 additions & 3 deletions include/graphblas/nonblocking/blas3.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ namespace grb {
typename Coords,
typename RIT, typename CIT, typename NIT
>
RC maskedOuter(
RC outer(
Matrix< OutputType, nonblocking, RIT, CIT, NIT > &A,
const Matrix< MaskType, nonblocking, RIT, CIT, NIT > &mask,
const Vector< InputType1, nonblocking, Coords > &u,
Expand All @@ -442,7 +442,7 @@ namespace grb {
if( internal::NONBLOCKING::warn_if_not_native &&
config::PIPELINE::warn_if_not_native
) {
std::cerr << "Warning: maskedOuter (nonblocking) currently delegates "
std::cerr << "Warning: outer (nonblocking) currently delegates "
<< "to a blocking implementation.\n"
<< " Further similar such warnings will be suppressed.\n";
internal::NONBLOCKING::warn_if_not_native = false;
Expand All @@ -453,7 +453,7 @@ namespace grb {
internal::le.execution();

// second, delegate to the reference backend
return maskedOuter< descr, Operator >(
return outer< descr, Operator >(
internal::getRefMatrix( A ),
internal::getRefMatrix( mask ),
internal::getRefVector( u ),
Expand Down
12 changes: 6 additions & 6 deletions include/graphblas/reference/blas3.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -929,7 +929,7 @@ namespace grb {
typename Coords,
typename RIT, typename CIT, typename NIT
>
RC maskedOuter(
RC outer(
Matrix< OutputType, reference, RIT, CIT, NIT > &A,
const Matrix< MaskType, reference, RIT, CIT, NIT > &mask,
const Vector< InputType1, reference, Coords > &u,
Expand All @@ -947,23 +947,23 @@ namespace grb {
// static checks
NO_CAST_ASSERT( ( !(descr & descriptors::no_casting) ||
std::is_same< typename Operator::D1, InputType1 >::value
), "grb::maskedOuter",
), "grb::outer",
"called with a prefactor vector that does not match the first domain "
"of the given multiplication operator" );
NO_CAST_ASSERT( ( !(descr & descriptors::no_casting) ||
std::is_same< typename Operator::D2, InputType2 >::value
), "grb::maskedOuter",
), "grb::outer",
"called with a postfactor vector that does not match the first domain "
"of the given multiplication operator" );
NO_CAST_ASSERT( ( !(descr & descriptors::no_casting) ||
std::is_same< typename Operator::D3, OutputType >::value
), "grb::maskedOuter",
), "grb::outer",
"called with an output matrix that does not match the output domain of "
"the given multiplication operator" );
static_assert( !(descr & descriptors::invert_mask),
"grb::maskedOuter: invert_mask descriptor cannot be used ");
"grb::outer: invert_mask descriptor cannot be used ");
#ifdef _DEBUG
std::cout << "In grb::maskedOuter (reference)\n";
std::cout << "In grb::outer (reference)\n";
#endif

const size_t nrows = size( u );
Expand Down
2 changes: 1 addition & 1 deletion src/graphblas/hyperdags/hyperdags.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ std::string grb::internal::hyperdags::toString(
return "outer( matrix, vector, vector, operation )";

case MASKED_OUTER:
return "maskedOuter( matrix, matrix, vector, vector, operation )";
return "outer( matrix, matrix, vector, vector, operation )";

case MXV_VECTOR_VECTOR_MATRIX_VECTOR_VECTOR_R:
return "mxv( vector, vector, matrix, vector, vector, ring )";
Expand Down
12 changes: 6 additions & 6 deletions tests/unit/maskedOuter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ void grbProgram( const void *, const size_t in_size, int &error ) {


if( !error ) {
rc = grb::maskedOuter( Result1, Mask1, u, v, ring.getMultiplicativeOperator(), RESIZE );
rc = rc ? rc : grb::maskedOuter( Result1, Mask1, u, v, ring.getMultiplicativeOperator() );
rc = grb::outer( Result1, Mask1, u, v, ring.getMultiplicativeOperator(), RESIZE );
rc = rc ? rc : grb::outer( Result1, Mask1, u, v, ring.getMultiplicativeOperator() );
if( rc != grb::SUCCESS ) {
std::cerr << "Unexpected return code from grb::maskedOuter: "
<< toString( rc ) << ".\n";
Expand All @@ -100,8 +100,8 @@ void grbProgram( const void *, const size_t in_size, int &error ) {
}

if( !error ) {
rc = grb::maskedOuter< descriptors::force_row_major >( Result2, Mask2, u, v, ring.getMultiplicativeOperator(), RESIZE );
rc = rc ? rc : grb::maskedOuter< descriptors::force_row_major >( Result2, Mask2, u, v, ring.getMultiplicativeOperator() );
rc = grb::outer< descriptors::force_row_major >( Result2, Mask2, u, v, ring.getMultiplicativeOperator(), RESIZE );
rc = rc ? rc : grb::outer< descriptors::force_row_major >( Result2, Mask2, u, v, ring.getMultiplicativeOperator() );
if( rc != grb::SUCCESS ) {
std::cerr << "Unexpected return code from grb::maskedOuter: "
<< toString( rc ) << ".\n";
Expand Down Expand Up @@ -253,8 +253,8 @@ void grb_program_custom_size( const size_t &n, int &error ) {
}

if( !error ) {
rc = grb::maskedOuter( Result, Mask, u, v, ring.getMultiplicativeOperator(), RESIZE );
rc = rc ? rc : grb::maskedOuter( Result, Mask, u, v, ring.getMultiplicativeOperator() );
rc = grb::outer( Result, Mask, u, v, ring.getMultiplicativeOperator(), RESIZE );
rc = rc ? rc : grb::outer( Result, Mask, u, v, ring.getMultiplicativeOperator() );
if( rc != grb::SUCCESS ) {
std::cerr << "Unexpected return code from grb::maskedOuter: "
<< toString( rc ) << ".\n";
Expand Down