2015-06-27 17:55:01 -07:00
|
|
|
#ifndef ISAAC_SYMBOLIC_PRESET_H_
|
|
|
|
#define ISAAC_SYMBOLIC_PRESET_H_
|
|
|
|
|
|
|
|
#include "isaac/symbolic/expression.h"
|
|
|
|
|
|
|
|
namespace isaac
|
|
|
|
{
|
|
|
|
|
|
|
|
namespace symbolic
|
|
|
|
{
|
|
|
|
|
|
|
|
namespace preset
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
class gemm
|
|
|
|
{
|
|
|
|
|
|
|
|
public:
|
|
|
|
struct args
|
|
|
|
{
|
2015-11-19 12:37:18 -05:00
|
|
|
args(): A(NULL), B(NULL), C(NULL), type(INVALID_EXPRESSION_TYPE){ }
|
|
|
|
value_scalar alpha;
|
2015-09-30 15:31:41 -04:00
|
|
|
lhs_rhs_element const * A;
|
|
|
|
lhs_rhs_element const * B;
|
2015-11-19 12:37:18 -05:00
|
|
|
value_scalar beta;
|
2015-09-30 15:31:41 -04:00
|
|
|
lhs_rhs_element const * C;
|
2015-06-27 17:55:01 -07:00
|
|
|
expression_type type;
|
|
|
|
|
|
|
|
operator bool() const
|
|
|
|
{
|
|
|
|
return type!=INVALID_EXPRESSION_TYPE && C!=NULL;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
private:
|
2015-09-30 15:31:41 -04:00
|
|
|
static void handle_node( math_expression::container_type const &tree, size_t rootidx, args & a);
|
2015-06-27 17:55:01 -07:00
|
|
|
|
|
|
|
public:
|
2015-09-30 15:31:41 -04:00
|
|
|
static args check(math_expression::container_type const &tree, size_t rootidx);
|
2015-06-27 17:55:01 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|