Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
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
52 changes: 33 additions & 19 deletions include/alp/base/blas0.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,12 +152,12 @@ namespace alp {
const Scalar< InputType1, InputStructure1, implementation > &x,
const Scalar< InputType2, InputStructure2, implementation > &y,
const OP &op = OP(),
const typename std::enable_if<
const std::enable_if_t<
alp::is_operator< OP >::value &&
!alp::is_object< InputType1 >::value &&
!alp::is_object< InputType2 >::value &&
!alp::is_object< OutputType >::value,
void >::type * = NULL
!alp::is_object< OutputType >::value
> * = nullptr
) {
#ifdef _DEBUG
std::cerr << "Selected backend does not implement alp::apply (scalar)\n";
Expand All @@ -167,10 +167,10 @@ namespace alp {
assert( backend_does_not_support_scalar_apply );
#endif

(void)out;
(void)x;
(void)y;
(void)op;
(void) out;
(void) x;
(void) y;
(void) op;

return UNSUPPORTED;
}
Expand Down Expand Up @@ -248,11 +248,18 @@ namespace alp {
class OP,
typename InputType, typename InputStructure,
typename IOType, typename IOStructure,
enum Backend implementation = config::default_backend >
RC foldr( const Scalar< InputType, InputStructure, implementation > &x,
enum Backend implementation = config::default_backend
>
RC foldr(
const Scalar< InputType, InputStructure, implementation > &x,
Scalar< IOType, IOStructure, implementation > &y,
const OP & op = OP(),
const typename std::enable_if< alp::is_operator< OP >::value && ! alp::is_object< InputType >::value && ! alp::is_object< IOType >::value, void >::type * = NULL ) {
const std::enable_if_t<
alp::is_operator< OP >::value &&
! alp::is_object< InputType >::value &&
! alp::is_object< IOType >::value
> * = nullptr
) {

#ifdef _DEBUG
std::cerr << "Selected backend does not implement alp::foldr (scalar)\n";
Expand All @@ -262,9 +269,9 @@ namespace alp {
assert( backend_does_not_support_scalar_foldr );
#endif

(void)x;
(void)y;
(void)op;
(void) x;
(void) y;
(void) op;

return UNSUPPORTED;
}
Expand Down Expand Up @@ -342,11 +349,18 @@ namespace alp {
class OP,
typename InputType, typename InputStructure,
typename IOType, typename IOStructure,
enum Backend implementation = config::default_backend >
RC foldl( Scalar< IOType, IOStructure, implementation > &x,
enum Backend implementation = config::default_backend
>
RC foldl(
Scalar< IOType, IOStructure, implementation > &x,
const Scalar< InputType, InputStructure, implementation > &y,
const OP & op = OP(),
const typename std::enable_if< alp::is_operator< OP >::value && ! alp::is_object< InputType >::value && ! alp::is_object< IOType >::value, void >::type * = NULL ) {
const std::enable_if_t<
alp::is_operator< OP >::value &&
! alp::is_object< InputType >::value &&
! alp::is_object< IOType >::value
> * = nullptr
) {

#ifdef _DEBUG
std::cerr << "Selected backend does not implement alp::foldl (scalar)\n";
Expand All @@ -356,9 +370,9 @@ namespace alp {
assert( backend_does_not_support_scalar_foldl );
#endif

(void)x;
(void)y;
(void)op;
(void) x;
(void) y;
(void) op;

return UNSUPPORTED;
}
Expand Down
Loading