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

654 grb::set matrix to matrix broken in mixed domain #290

Merged
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
35 changes: 18 additions & 17 deletions include/graphblas/base/io.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1181,13 +1181,14 @@ namespace grb {
*/
template<
Descriptor descr = descriptors::no_operation,
typename OutputType, typename RIT, typename CIT, typename NIT,
typename InputType,
typename OutputType, typename InputType,
typename RIT1, typename CIT1, typename NIT1,
typename RIT2, typename CIT2, typename NIT2,
Backend backend
>
RC set(
Matrix< OutputType, backend, RIT, CIT, NIT > &C,
const Matrix< InputType, backend, RIT, CIT, NIT > &A,
Matrix< OutputType, backend, RIT1, CIT1, NIT1 > &A,
const Matrix< InputType, backend, RIT2, CIT2, NIT2 > &C,
const Phase &phase = EXECUTE,
const typename std::enable_if<
!grb::is_object< OutputType >::value &&
Expand All @@ -1198,8 +1199,8 @@ namespace grb {
const bool should_not_call_base_matrix_set = false;
assert( should_not_call_base_matrix_set );
#endif
(void) C;
(void) A;
(void) C;
(void) phase;
return UNSUPPORTED;
}
Expand All @@ -1222,10 +1223,10 @@ namespace grb {
* mutually exclusive for this primitive.
* \endparblock
*
* @tparam DataType The type of each element in the given matrix.
* @tparam MaskType The type of each element in the given mask.
* @tparam ValueType The type of the given value. Should be convertible
* to \a DataType.
* @tparam OutputType The type of each element in the given matrix.
* @tparam MaskType The type of each element in the given mask.
* @tparam ValueType The type of the given value. Should be convertible
* to \a OutputType.
* @tparam RIT The integer type for encoding row indices.
* @tparam CIT The integer type for encoding column indices.
* @tparam NIT The integer type for encoding nonzero indices.
Expand Down Expand Up @@ -1264,7 +1265,7 @@ namespace grb {
*
* When \a descr includes #grb::descriptors::no_casting then code shall not
* compile if one of the following conditions are met:
* -# \a ValueType does not match \a DataType; or
* -# \a ValueType does not match \a OutputType; or
* -# \a MaskType does not match <tt>bool</tt>.
*
* In these cases, the code shall not compile: implementations must throw
Expand Down Expand Up @@ -1292,18 +1293,18 @@ namespace grb {
*/
template<
Descriptor descr = descriptors::no_operation,
typename DataType, typename RIT, typename CIT, typename NIT,
typename MaskType,
typename ValueType,
typename OutputType, typename MaskType, typename ValueType,
typename RIT1, typename CIT1, typename NIT1,
typename RIT2, typename CIT2, typename NIT2,
Backend backend
>
RC set(
Matrix< DataType, backend, RIT, CIT, NIT > &C,
const Matrix< MaskType, backend, RIT, CIT, NIT > &mask,
const ValueType& val,
Matrix< OutputType, backend, RIT1, CIT1, NIT1 > &C,
const Matrix< MaskType, backend, RIT2, CIT2, NIT2 > &mask,
const ValueType &val,
const Phase &phase = EXECUTE,
const typename std::enable_if<
!grb::is_object< DataType >::value &&
!grb::is_object< OutputType >::value &&
!grb::is_object< ValueType >::value &&
!grb::is_object< MaskType >::value,
void >::type * const = nullptr
Expand Down
2 changes: 1 addition & 1 deletion include/graphblas/bsp1d/io.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1723,7 +1723,7 @@ namespace grb {
// each thread writes to a different interval of the destination array
// give pointers to hint at memmove whenever possible
// (StorageType should be trivially copyable)
std::copy_n(
(void) std::copy_n(
local_out.data(), num_nnz_local,
out.data() + first_nnz_local
);
Expand Down
10 changes: 6 additions & 4 deletions include/graphblas/nonblocking/io.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1134,7 +1134,8 @@ namespace grb {
std::cout << "Called grb::set (matrix-to-matrix, nonblocking)" << std::endl;
#endif
// static checks
NO_CAST_ASSERT( ( !(descr & descriptors::no_casting) ||
NO_CAST_ASSERT(
( !(descr & descriptors::no_casting) ||
std::is_same< InputType, OutputType >::value
), "grb::set",
"called with non-matching value types" );
Expand Down Expand Up @@ -1170,11 +1171,12 @@ namespace grb {
template<
Descriptor descr = descriptors::no_operation,
typename OutputType, typename InputType1, typename InputType2,
typename RIT, typename CIT, typename NIT
typename RIT1, typename CIT1, typename NIT1,
typename RIT2, typename CIT2, typename NIT2
>
RC set(
Matrix< OutputType, nonblocking, RIT, CIT, NIT > &C,
const Matrix< InputType1, nonblocking, RIT, CIT, NIT > &A,
Matrix< OutputType, nonblocking, RIT1, CIT1, NIT1 > &C,
const Matrix< InputType1, nonblocking, RIT2, CIT2, NIT2 > &A,
const InputType2 &val,
const Phase &phase = EXECUTE,
const typename std::enable_if<
Expand Down
Loading