Commit 5e066523 authored by Adam Procter's avatar Adam Procter

Formatting

parent 4ccb3757
......@@ -20,7 +20,7 @@ namespace ngraph
{
namespace kernel
{
template <typename TI,typename TO>
template <typename TI, typename TO>
void convert(TI* arg, TO* out, size_t count)
{
for (size_t i = 0; i < count; i++)
......
......@@ -23,7 +23,7 @@ namespace ngraph
template <typename T>
void copy(T* arg, T* out, size_t count)
{
memcpy(out,arg,sizeof(T) * count);
memcpy(out, arg, sizeof(T) * count);
}
}
}
......
......@@ -24,7 +24,8 @@ namespace ngraph
namespace kernel
{
template <typename T>
void equal(T* arg0, T* arg1, char* out, size_t count) // FIXME: temporarily char not bool
void
equal(T* arg0, T* arg1, char* out, size_t count) // FIXME: temporarily char not bool
{
for (size_t i = 0; i < count; i++)
{
......
......@@ -21,7 +21,10 @@ namespace ngraph
namespace kernel
{
template <typename T>
void greater(T* arg0, T* arg1, char* out, size_t count) // FIXME: temporarily char not bool
void greater(T* arg0,
T* arg1,
char* out,
size_t count) // FIXME: temporarily char not bool
{
for (size_t i = 0; i < count; i++)
{
......
......@@ -21,7 +21,10 @@ namespace ngraph
namespace kernel
{
template <typename T>
void greater_eq(T* arg0, T* arg1, char* out, size_t count) // FIXME: temporarily char not bool
void greater_eq(T* arg0,
T* arg1,
char* out,
size_t count) // FIXME: temporarily char not bool
{
for (size_t i = 0; i < count; i++)
{
......
......@@ -21,7 +21,10 @@ namespace ngraph
namespace kernel
{
template <typename T>
void less_eq(T* arg0, T* arg1, char* out, size_t count) // FIXME: temporarily char not bool
void less_eq(T* arg0,
T* arg1,
char* out,
size_t count) // FIXME: temporarily char not bool
{
for (size_t i = 0; i < count; i++)
{
......
......@@ -20,7 +20,9 @@ namespace ngraph
{
namespace kernel
{
void logical_not(char* arg, char* out, size_t count) // FIXME: temporararily char not bool
void logical_not(char* arg,
char* out,
size_t count) // FIXME: temporararily char not bool
{
for (size_t i = 0; i < count; i++)
{
......
......@@ -24,7 +24,10 @@ namespace ngraph
namespace kernel
{
template <typename T>
void not_equal(T* arg0, T* arg1, char* out, size_t count) // FIXME: temporarily char not bool
void not_equal(T* arg0,
T* arg1,
char* out,
size_t count) // FIXME: temporarily char not bool
{
for (size_t i = 0; i < count; i++)
{
......
......@@ -25,7 +25,7 @@ namespace ngraph
{
for (size_t i = 0; i < count; i++)
{
out[i] = std::pow(arg0[i],arg1[i]);
out[i] = std::pow(arg0[i], arg1[i]);
}
}
}
......
......@@ -21,7 +21,11 @@ namespace ngraph
namespace kernel
{
template <typename T>
void select(char* arg0, T* arg1, T* arg2, T* out, size_t count) // FIXME: temporararily char not bool
void select(char* arg0,
T* arg1,
T* arg2,
T* out,
size_t count) // FIXME: temporararily char not bool
{
for (size_t i = 0; i < count; i++)
{
......
......@@ -70,18 +70,34 @@
#include "ngraph/ops/tuple.hpp"
#include "ngraph/pass/manager.hpp"
#include "ngraph/pass/topological_sort.hpp"
#include "ngraph/runtime/ngvm/eigen/broadcast_scalar.hpp"
#include "ngraph/runtime/ngvm/eigen/broadcast_vector_colwise.hpp"
#include "ngraph/runtime/ngvm/eigen/broadcast_vector_rowwise.hpp"
#include "ngraph/runtime/ngvm/eigen/concat_matrix.hpp"
#include "ngraph/runtime/ngvm/eigen/concat_vector.hpp"
#include "ngraph/runtime/ngvm/eigen/dot.hpp"
#include "ngraph/runtime/ngvm/eigen/matrix_mult.hpp"
#include "ngraph/runtime/ngvm/eigen/matrix_slice.hpp"
#include "ngraph/runtime/ngvm/eigen/matrix_transpose.hpp"
#include "ngraph/runtime/ngvm/eigen/matrix_vector_product.hpp"
#include "ngraph/runtime/ngvm/eigen/reduce_matrix_columns.hpp"
#include "ngraph/runtime/ngvm/eigen/reduce_matrix_rows.hpp"
#include "ngraph/runtime/ngvm/eigen/reduce_to_scalar.hpp"
#include "ngraph/runtime/ngvm/eigen/replace_matrix_slice.hpp"
#include "ngraph/runtime/ngvm/eigen/replace_vector_slice.hpp"
#include "ngraph/runtime/ngvm/eigen/scalar_tensor_product.hpp"
#include "ngraph/runtime/ngvm/eigen/sum_matrix_columns.hpp"
#include "ngraph/runtime/ngvm/eigen/sum_matrix_rows.hpp"
#include "ngraph/runtime/ngvm/eigen/sum_to_scalar.hpp"
#include "ngraph/runtime/ngvm/eigen/vector_slice.hpp"
#include "ngraph/runtime/ngvm/external_function.hpp"
#include "ngraph/runtime/ngvm/instruction/abs.hpp"
#include "ngraph/runtime/ngvm/instruction/acos.hpp"
#include "ngraph/runtime/ngvm/instruction/add.hpp"
#include "ngraph/runtime/ngvm/instruction/asin.hpp"
#include "ngraph/runtime/ngvm/instruction/atan.hpp"
#include "ngraph/runtime/ngvm/eigen/broadcast_scalar.hpp"
#include "ngraph/runtime/ngvm/eigen/broadcast_vector_colwise.hpp"
#include "ngraph/runtime/ngvm/eigen/broadcast_vector_rowwise.hpp"
#include "ngraph/runtime/ngvm/instruction/call.hpp"
#include "ngraph/runtime/ngvm/instruction/ceiling.hpp"
#include "ngraph/runtime/ngvm/eigen/concat_matrix.hpp"
#include "ngraph/runtime/ngvm/eigen/concat_vector.hpp"
#include "ngraph/runtime/ngvm/instruction/constant.hpp"
#include "ngraph/runtime/ngvm/instruction/convert.hpp"
#include "ngraph/runtime/ngvm/instruction/copy.hpp"
......@@ -89,19 +105,14 @@
#include "ngraph/runtime/ngvm/instruction/cos.hpp"
#include "ngraph/runtime/ngvm/instruction/cosh.hpp"
#include "ngraph/runtime/ngvm/instruction/divide.hpp"
#include "ngraph/runtime/ngvm/eigen/dot.hpp"
#include "ngraph/runtime/ngvm/instruction/equal.hpp"
#include "ngraph/runtime/ngvm/instruction/exp.hpp"
#include "ngraph/runtime/ngvm/instruction/floor.hpp"
#include "ngraph/runtime/ngvm/instruction/greater_eq.hpp"
#include "ngraph/runtime/ngvm/instruction/greater.hpp"
#include "ngraph/runtime/ngvm/instruction/less_eq.hpp"
#include "ngraph/runtime/ngvm/instruction/greater_eq.hpp"
#include "ngraph/runtime/ngvm/instruction/less.hpp"
#include "ngraph/runtime/ngvm/instruction/less_eq.hpp"
#include "ngraph/runtime/ngvm/instruction/log.hpp"
#include "ngraph/runtime/ngvm/eigen/matrix_mult.hpp"
#include "ngraph/runtime/ngvm/eigen/matrix_slice.hpp"
#include "ngraph/runtime/ngvm/eigen/matrix_transpose.hpp"
#include "ngraph/runtime/ngvm/eigen/matrix_vector_product.hpp"
#include "ngraph/runtime/ngvm/instruction/maximum.hpp"
#include "ngraph/runtime/ngvm/instruction/minimum.hpp"
#include "ngraph/runtime/ngvm/instruction/multiply.hpp"
......@@ -109,26 +120,15 @@
#include "ngraph/runtime/ngvm/instruction/not.hpp"
#include "ngraph/runtime/ngvm/instruction/not_equal.hpp"
#include "ngraph/runtime/ngvm/instruction/power.hpp"
#include "ngraph/runtime/ngvm/eigen/reduce_matrix_columns.hpp"
#include "ngraph/runtime/ngvm/eigen/reduce_matrix_rows.hpp"
#include "ngraph/runtime/ngvm/eigen/reduce_to_scalar.hpp"
#include "ngraph/runtime/ngvm/eigen/replace_matrix_slice.hpp"
#include "ngraph/runtime/ngvm/eigen/replace_vector_slice.hpp"
#include "ngraph/runtime/ngvm/instruction/return.hpp"
#include "ngraph/runtime/ngvm/eigen/scalar_tensor_product.hpp"
#include "ngraph/runtime/ngvm/instruction/select.hpp"
#include "ngraph/runtime/ngvm/instruction/sign.hpp"
#include "ngraph/runtime/ngvm/instruction/sin.hpp"
#include "ngraph/runtime/ngvm/instruction/sinh.hpp"
#include "ngraph/runtime/ngvm/instruction/sqrt.hpp"
#include "ngraph/runtime/ngvm/instruction/subtract.hpp"
#include "ngraph/runtime/ngvm/eigen/sum_matrix_columns.hpp"
#include "ngraph/runtime/ngvm/eigen/sum_matrix_rows.hpp"
#include "ngraph/runtime/ngvm/eigen/sum_to_scalar.hpp"
#include "ngraph/runtime/ngvm/instruction/tan.hpp"
#include "ngraph/runtime/ngvm/instruction/tanh.hpp"
#include "ngraph/runtime/ngvm/eigen/vector_slice.hpp"
#include "ngraph/runtime/ngvm/external_function.hpp"
#include "ngraph/runtime/utils.hpp"
#include "ngraph/util.hpp"
......@@ -325,7 +325,7 @@ std::vector<typename ET::type>
{ \
REGISTER_INSTRUCTION( \
op::ParameterizedConstant<T>, \
instruction::ConstantInstruction<T>, \
instruction::ConstantInstruction<T>, \
std::vector<T::type>{ \
get_vector<T>(dynamic_cast<const op::ParameterizedConstant<T>*>(n)->get_value())}, \
out[0]); \
......@@ -385,7 +385,7 @@ ExternalFunction::OpMap& ExternalFunction::get_op_map()
auto c_value_strings = c->get_value_strings();
#define M_REGISTER_POLYMORPHIC_CONSTANT(ET) \
ef->get_instructions()->push_back(make_shared<instruction::ConstantInstruction<ET>>( \
ef->get_instructions()->push_back(make_shared<instruction::ConstantInstruction<ET>>( \
parse_string<typename ET::type>(c_value_strings), out[0]));
DO_ON_ELEMENT_TYPE(c_element_type,
......@@ -532,7 +532,7 @@ ExternalFunction::OpMap& ExternalFunction::get_op_map()
result_element_type == (TO::element_type())) \
{ \
ef->get_instructions()->push_back( \
make_shared<instruction::ConvertInstruction<TI, TO>>(in[0], out[0])); \
make_shared<instruction::ConvertInstruction<TI, TO>>(in[0], out[0])); \
}
// End hacky macro
......
......@@ -16,8 +16,8 @@
#include "ngraph/runtime/kernel/abs.hpp"
#include "ngraph/runtime/ngvm/call_frame.hpp"
#include "ngraph/runtime/ngvm/utils.hpp"
#include "ngraph/runtime/ngvm/instruction.hpp"
#include "ngraph/runtime/ngvm/utils.hpp"
#include "ngraph/runtime/tensor_view.hpp"
namespace ngraph
......@@ -32,8 +32,7 @@ namespace ngraph
class AbsInstruction : public Instruction
{
public:
AbsInstruction(const TensorViewInfo& arg,
const TensorViewInfo& out)
AbsInstruction(const TensorViewInfo& arg, const TensorViewInfo& out)
: m_arg(arg)
, m_out(out)
{
......
......@@ -16,8 +16,8 @@
#include "ngraph/runtime/kernel/acos.hpp"
#include "ngraph/runtime/ngvm/call_frame.hpp"
#include "ngraph/runtime/ngvm/utils.hpp"
#include "ngraph/runtime/ngvm/instruction.hpp"
#include "ngraph/runtime/ngvm/utils.hpp"
#include "ngraph/runtime/tensor_view.hpp"
namespace ngraph
......@@ -32,8 +32,7 @@ namespace ngraph
class AcosInstruction : public Instruction
{
public:
AcosInstruction(const TensorViewInfo& arg,
const TensorViewInfo& out)
AcosInstruction(const TensorViewInfo& arg, const TensorViewInfo& out)
: m_arg(arg)
, m_out(out)
{
......
......@@ -16,8 +16,8 @@
#include "ngraph/runtime/kernel/add.hpp"
#include "ngraph/runtime/ngvm/call_frame.hpp"
#include "ngraph/runtime/ngvm/utils.hpp"
#include "ngraph/runtime/ngvm/instruction.hpp"
#include "ngraph/runtime/ngvm/utils.hpp"
#include "ngraph/runtime/tensor_view.hpp"
namespace ngraph
......
......@@ -16,8 +16,8 @@
#include "ngraph/runtime/kernel/asin.hpp"
#include "ngraph/runtime/ngvm/call_frame.hpp"
#include "ngraph/runtime/ngvm/utils.hpp"
#include "ngraph/runtime/ngvm/instruction.hpp"
#include "ngraph/runtime/ngvm/utils.hpp"
#include "ngraph/runtime/tensor_view.hpp"
namespace ngraph
......@@ -32,8 +32,7 @@ namespace ngraph
class AsinInstruction : public Instruction
{
public:
AsinInstruction(const TensorViewInfo& arg,
const TensorViewInfo& out)
AsinInstruction(const TensorViewInfo& arg, const TensorViewInfo& out)
: m_arg(arg)
, m_out(out)
{
......
......@@ -16,8 +16,8 @@
#include "ngraph/runtime/kernel/atan.hpp"
#include "ngraph/runtime/ngvm/call_frame.hpp"
#include "ngraph/runtime/ngvm/utils.hpp"
#include "ngraph/runtime/ngvm/instruction.hpp"
#include "ngraph/runtime/ngvm/utils.hpp"
#include "ngraph/runtime/tensor_view.hpp"
namespace ngraph
......@@ -32,8 +32,7 @@ namespace ngraph
class AtanInstruction : public Instruction
{
public:
AtanInstruction(const TensorViewInfo& arg,
const TensorViewInfo& out)
AtanInstruction(const TensorViewInfo& arg, const TensorViewInfo& out)
: m_arg(arg)
, m_out(out)
{
......
......@@ -16,8 +16,8 @@
#include "ngraph/runtime/kernel/ceiling.hpp"
#include "ngraph/runtime/ngvm/call_frame.hpp"
#include "ngraph/runtime/ngvm/utils.hpp"
#include "ngraph/runtime/ngvm/instruction.hpp"
#include "ngraph/runtime/ngvm/utils.hpp"
#include "ngraph/runtime/tensor_view.hpp"
namespace ngraph
......@@ -32,8 +32,7 @@ namespace ngraph
class CeilingInstruction : public Instruction
{
public:
CeilingInstruction(const TensorViewInfo& arg,
const TensorViewInfo& out)
CeilingInstruction(const TensorViewInfo& arg, const TensorViewInfo& out)
: m_arg(arg)
, m_out(out)
{
......
......@@ -16,8 +16,8 @@
#include "ngraph/runtime/kernel/convert.hpp"
#include "ngraph/runtime/ngvm/call_frame.hpp"
#include "ngraph/runtime/ngvm/utils.hpp"
#include "ngraph/runtime/ngvm/instruction.hpp"
#include "ngraph/runtime/ngvm/utils.hpp"
#include "ngraph/runtime/tensor_view.hpp"
namespace ngraph
......@@ -28,12 +28,11 @@ namespace ngraph
{
namespace instruction
{
template <typename ETI,typename ETO>
template <typename ETI, typename ETO>
class ConvertInstruction : public Instruction
{
public:
ConvertInstruction(const TensorViewInfo& arg,
const TensorViewInfo& out)
ConvertInstruction(const TensorViewInfo& arg, const TensorViewInfo& out)
: m_arg(arg)
, m_out(out)
{
......@@ -46,7 +45,7 @@ namespace ngraph
size_t count = get_tensor_element_count(call_frame, m_arg);
kernel::convert<typename ETI::type,typename ETO::type>(arg, out, count);
kernel::convert<typename ETI::type, typename ETO::type>(arg, out, count);
}
protected:
......
......@@ -16,8 +16,8 @@
#include "ngraph/runtime/kernel/copy.hpp"
#include "ngraph/runtime/ngvm/call_frame.hpp"
#include "ngraph/runtime/ngvm/utils.hpp"
#include "ngraph/runtime/ngvm/instruction.hpp"
#include "ngraph/runtime/ngvm/utils.hpp"
#include "ngraph/runtime/tensor_view.hpp"
namespace ngraph
......@@ -32,8 +32,7 @@ namespace ngraph
class CopyInstruction : public Instruction
{
public:
CopyInstruction(const TensorViewInfo& arg,
const TensorViewInfo& out)
CopyInstruction(const TensorViewInfo& arg, const TensorViewInfo& out)
: m_arg(arg)
, m_out(out)
{
......
......@@ -16,8 +16,8 @@
#include "ngraph/runtime/kernel/cos.hpp"
#include "ngraph/runtime/ngvm/call_frame.hpp"
#include "ngraph/runtime/ngvm/utils.hpp"
#include "ngraph/runtime/ngvm/instruction.hpp"
#include "ngraph/runtime/ngvm/utils.hpp"
#include "ngraph/runtime/tensor_view.hpp"
namespace ngraph
......@@ -32,8 +32,7 @@ namespace ngraph
class CosInstruction : public Instruction
{
public:
CosInstruction(const TensorViewInfo& arg,
const TensorViewInfo& out)
CosInstruction(const TensorViewInfo& arg, const TensorViewInfo& out)
: m_arg(arg)
, m_out(out)
{
......
......@@ -16,8 +16,8 @@
#include "ngraph/runtime/kernel/cosh.hpp"
#include "ngraph/runtime/ngvm/call_frame.hpp"
#include "ngraph/runtime/ngvm/utils.hpp"
#include "ngraph/runtime/ngvm/instruction.hpp"
#include "ngraph/runtime/ngvm/utils.hpp"
#include "ngraph/runtime/tensor_view.hpp"
namespace ngraph
......@@ -32,8 +32,7 @@ namespace ngraph
class CoshInstruction : public Instruction
{
public:
CoshInstruction(const TensorViewInfo& arg,
const TensorViewInfo& out)
CoshInstruction(const TensorViewInfo& arg, const TensorViewInfo& out)
: m_arg(arg)
, m_out(out)
{
......
......@@ -16,8 +16,8 @@
#include "ngraph/runtime/kernel/divide.hpp"
#include "ngraph/runtime/ngvm/call_frame.hpp"
#include "ngraph/runtime/ngvm/utils.hpp"
#include "ngraph/runtime/ngvm/instruction.hpp"
#include "ngraph/runtime/ngvm/utils.hpp"
#include "ngraph/runtime/tensor_view.hpp"
namespace ngraph
......@@ -33,8 +33,8 @@ namespace ngraph
{
public:
DivideInstruction(const TensorViewInfo& arg0,
const TensorViewInfo& arg1,
const TensorViewInfo& out)
const TensorViewInfo& arg1,
const TensorViewInfo& out)
: m_arg0(arg0)
, m_arg1(arg1)
, m_out(out)
......
......@@ -16,8 +16,8 @@
#include "ngraph/runtime/kernel/equal.hpp"
#include "ngraph/runtime/ngvm/call_frame.hpp"
#include "ngraph/runtime/ngvm/utils.hpp"
#include "ngraph/runtime/ngvm/instruction.hpp"
#include "ngraph/runtime/ngvm/utils.hpp"
#include "ngraph/runtime/tensor_view.hpp"
namespace ngraph
......@@ -33,8 +33,8 @@ namespace ngraph
{
public:
EqualInstruction(const TensorViewInfo& arg0,
const TensorViewInfo& arg1,
const TensorViewInfo& out)
const TensorViewInfo& arg1,
const TensorViewInfo& out)
: m_arg0(arg0)
, m_arg1(arg1)
, m_out(out)
......@@ -45,7 +45,8 @@ namespace ngraph
{
typename ET::type* arg0 = get_tensor_data_ptr<ET>(call_frame, m_arg0);
typename ET::type* arg1 = get_tensor_data_ptr<ET>(call_frame, m_arg1);
char* out = get_tensor_data_ptr<element::Bool>(call_frame, m_out); // FIXME: temporarily char not bool
char* out = get_tensor_data_ptr<element::Bool>(
call_frame, m_out); // FIXME: temporarily char not bool
size_t count = get_tensor_element_count(call_frame, m_arg0);
......
......@@ -16,8 +16,8 @@
#include "ngraph/runtime/kernel/exp.hpp"
#include "ngraph/runtime/ngvm/call_frame.hpp"
#include "ngraph/runtime/ngvm/utils.hpp"
#include "ngraph/runtime/ngvm/instruction.hpp"
#include "ngraph/runtime/ngvm/utils.hpp"
#include "ngraph/runtime/tensor_view.hpp"
namespace ngraph
......@@ -32,8 +32,7 @@ namespace ngraph
class ExpInstruction : public Instruction
{
public:
ExpInstruction(const TensorViewInfo& arg,
const TensorViewInfo& out)
ExpInstruction(const TensorViewInfo& arg, const TensorViewInfo& out)
: m_arg(arg)
, m_out(out)
{
......
......@@ -16,8 +16,8 @@
#include "ngraph/runtime/kernel/floor.hpp"
#include "ngraph/runtime/ngvm/call_frame.hpp"
#include "ngraph/runtime/ngvm/utils.hpp"
#include "ngraph/runtime/ngvm/instruction.hpp"
#include "ngraph/runtime/ngvm/utils.hpp"
#include "ngraph/runtime/tensor_view.hpp"
namespace ngraph
......@@ -32,8 +32,7 @@ namespace ngraph
class FloorInstruction : public Instruction
{
public:
FloorInstruction(const TensorViewInfo& arg,
const TensorViewInfo& out)
FloorInstruction(const TensorViewInfo& arg, const TensorViewInfo& out)
: m_arg(arg)
, m_out(out)
{
......
......@@ -16,8 +16,8 @@
#include "ngraph/runtime/kernel/greater.hpp"
#include "ngraph/runtime/ngvm/call_frame.hpp"
#include "ngraph/runtime/ngvm/utils.hpp"
#include "ngraph/runtime/ngvm/instruction.hpp"
#include "ngraph/runtime/ngvm/utils.hpp"
#include "ngraph/runtime/tensor_view.hpp"
namespace ngraph
......@@ -33,8 +33,8 @@ namespace ngraph
{
public:
GreaterInstruction(const TensorViewInfo& arg0,
const TensorViewInfo& arg1,
const TensorViewInfo& out)
const TensorViewInfo& arg1,
const TensorViewInfo& out)
: m_arg0(arg0)
, m_arg1(arg1)
, m_out(out)
......@@ -45,7 +45,8 @@ namespace ngraph
{
typename ET::type* arg0 = get_tensor_data_ptr<ET>(call_frame, m_arg0);
typename ET::type* arg1 = get_tensor_data_ptr<ET>(call_frame, m_arg1);
char* out = get_tensor_data_ptr<element::Bool>(call_frame, m_out); // FIXME: temporarily char not bool
char* out = get_tensor_data_ptr<element::Bool>(
call_frame, m_out); // FIXME: temporarily char not bool
size_t count = get_tensor_element_count(call_frame, m_arg0);
......
......@@ -16,8 +16,8 @@
#include "ngraph/runtime/kernel/greater_eq.hpp"
#include "ngraph/runtime/ngvm/call_frame.hpp"
#include "ngraph/runtime/ngvm/utils.hpp"
#include "ngraph/runtime/ngvm/instruction.hpp"
#include "ngraph/runtime/ngvm/utils.hpp"
#include "ngraph/runtime/tensor_view.hpp"
namespace ngraph
......@@ -33,8 +33,8 @@ namespace ngraph
{
public:
GreaterEqInstruction(const TensorViewInfo& arg0,
const TensorViewInfo& arg1,
const TensorViewInfo& out)
const TensorViewInfo& arg1,
const TensorViewInfo& out)
: m_arg0(arg0)
, m_arg1(arg1)
, m_out(out)
......@@ -45,7 +45,8 @@ namespace ngraph
{
typename ET::type* arg0 = get_tensor_data_ptr<ET>(call_frame, m_arg0);
typename ET::type* arg1 = get_tensor_data_ptr<ET>(call_frame, m_arg1);
char* out = get_tensor_data_ptr<element::Bool>(call_frame, m_out); // FIXME: temporarily char not bool
char* out = get_tensor_data_ptr<element::Bool>(
call_frame, m_out); // FIXME: temporarily char not bool
size_t count = get_tensor_element_count(call_frame, m_arg0);
......
......@@ -16,8 +16,8 @@
#include "ngraph/runtime/kernel/less.hpp"
#include "ngraph/runtime/ngvm/call_frame.hpp"
#include "ngraph/runtime/ngvm/utils.hpp"
#include "ngraph/runtime/ngvm/instruction.hpp"
#include "ngraph/runtime/ngvm/utils.hpp"
#include "ngraph/runtime/tensor_view.hpp"
namespace ngraph
......@@ -33,8 +33,8 @@ namespace ngraph
{
public:
LessInstruction(const TensorViewInfo& arg0,
const TensorViewInfo& arg1,
const TensorViewInfo& out)
const TensorViewInfo& arg1,
const TensorViewInfo& out)
: m_arg0(arg0)
, m_arg1(arg1)
, m_out(out)
......@@ -45,7 +45,8 @@ namespace ngraph
{
typename ET::type* arg0 = get_tensor_data_ptr<ET>(call_frame, m_arg0);
typename ET::type* arg1 = get_tensor_data_ptr<ET>(call_frame, m_arg1);
char* out = get_tensor_data_ptr<element::Bool>(call_frame, m_out); // FIXME: temporarily char not bool
char* out = get_tensor_data_ptr<element::Bool>(
call_frame, m_out); // FIXME: temporarily char not bool
size_t count = get_tensor_element_count(call_frame, m_arg0);
......
......@@ -16,8 +16,8 @@
#include "ngraph/runtime/kernel/less_eq.hpp"
#include "ngraph/runtime/ngvm/call_frame.hpp"
#include "ngraph/runtime/ngvm/utils.hpp"
#include "ngraph/runtime/ngvm/instruction.hpp"
#include "ngraph/runtime/ngvm/utils.hpp"
#include "ngraph/runtime/tensor_view.hpp"
namespace ngraph
......@@ -33,8 +33,8 @@ namespace ngraph
{
public:
LessEqInstruction(const TensorViewInfo& arg0,
const TensorViewInfo& arg1,
const TensorViewInfo& out)
const TensorViewInfo& arg1,
const TensorViewInfo& out)
: m_arg0(arg0)
, m_arg1(arg1)
, m_out(out)
......@@ -45,7 +45,8 @@ namespace ngraph
{
typename ET::type* arg0 = get_tensor_data_ptr<ET>(call_frame, m_arg0);
typename ET::type* arg1 = get_tensor_data_ptr<ET>(call_frame, m_arg1);
char* out = get_tensor_data_ptr<element::Bool>(call_frame, m_out); // FIXME: temporarily char not bool
char* out = get_tensor_data_ptr<element::Bool>(
call_frame, m_out); // FIXME: temporarily char not bool
size_t count = get_tensor_element_count(call_frame, m_arg0);
......
......@@ -16,8 +16,8 @@
#include "ngraph/runtime/kernel/log.hpp"
#include "ngraph/runtime/ngvm/call_frame.hpp"
#include "ngraph/runtime/ngvm/utils.hpp"
#include "ngraph/runtime/ngvm/instruction.hpp"
#include "ngraph/runtime/ngvm/utils.hpp"
#include "ngraph/runtime/tensor_view.hpp"
namespace ngraph
......@@ -32,8 +32,7 @@ namespace ngraph
class LogInstruction : public Instruction
{
public:
LogInstruction(const TensorViewInfo& arg,
const TensorViewInfo& out)
LogInstruction(const TensorViewInfo& arg, const TensorViewInfo& out)
: m_arg(arg)
, m_out(out)
{
......
......@@ -16,8 +16,8 @@
#include "ngraph/runtime/kernel/maximum.hpp"
#include "ngraph/runtime/ngvm/call_frame.hpp"
#include "ngraph/runtime/ngvm/utils.hpp"
#include "ngraph/runtime/ngvm/instruction.hpp"
#include "ngraph/runtime/ngvm/utils.hpp"
#include "ngraph/runtime/tensor_view.hpp"
namespace ngraph
......@@ -33,8 +33,8 @@ namespace ngraph
{
public:
MaximumInstruction(const TensorViewInfo& arg0,
const TensorViewInfo& arg1,
const TensorViewInfo& out)
const TensorViewInfo& arg1,
const TensorViewInfo& out)
: m_arg0(arg0)
, m_arg1(arg1)
, m_out(out)
......
......@@ -16,8 +16,8 @@
#include "ngraph/runtime/kernel/minimum.hpp"
#include "ngraph/runtime/ngvm/call_frame.hpp"
#include "ngraph/runtime/ngvm/utils.hpp"
#include "ngraph/runtime/ngvm/instruction.hpp"
#include "ngraph/runtime/ngvm/utils.hpp"
#include "ngraph/runtime/tensor_view.hpp"
namespace ngraph
......@@ -33,8 +33,8 @@ namespace ngraph
{
public:
MinimumInstruction(const TensorViewInfo& arg0,
const TensorViewInfo& arg1,
const TensorViewInfo& out)
const TensorViewInfo& arg1,
const TensorViewInfo& out)
: m_arg0(arg0)
, m_arg1(arg1)
, m_out(out)
......
......@@ -16,8 +16,8 @@
#include "ngraph/runtime/kernel/multiply.hpp"
#include "ngraph/runtime/ngvm/call_frame.hpp"
#include "ngraph/runtime/ngvm/utils.hpp"
#include "ngraph/runtime/ngvm/instruction.hpp"
#include "ngraph/runtime/ngvm/utils.hpp"
#include "ngraph/runtime/tensor_view.hpp"
namespace ngraph
......@@ -33,8 +33,8 @@ namespace ngraph
{
public:
MultiplyInstruction(const TensorViewInfo& arg0,
const TensorViewInfo& arg1,
const TensorViewInfo& out)
const TensorViewInfo& arg1,
const TensorViewInfo& out)
: m_arg0(arg0)
, m_arg1(arg1)
, m_out(out)
......
......@@ -16,8 +16,8 @@
#include "ngraph/runtime/kernel/negate.hpp"
#include "ngraph/runtime/ngvm/call_frame.hpp"
#include "ngraph/runtime/ngvm/utils.hpp"
#include "ngraph/runtime/ngvm/instruction.hpp"
#include "ngraph/runtime/ngvm/utils.hpp"
#include "ngraph/runtime/tensor_view.hpp"
namespace ngraph
......@@ -32,8 +32,7 @@ namespace ngraph
class NegateInstruction : public Instruction
{
public:
NegateInstruction(const TensorViewInfo& arg,
const TensorViewInfo& out)
NegateInstruction(const TensorViewInfo& arg, const TensorViewInfo& out)
: m_arg(arg)
, m_out(out)
{
......
......@@ -16,8 +16,8 @@
#include "ngraph/runtime/kernel/not.hpp"
#include "ngraph/runtime/ngvm/call_frame.hpp"
#include "ngraph/runtime/ngvm/utils.hpp"
#include "ngraph/runtime/ngvm/instruction.hpp"
#include "ngraph/runtime/ngvm/utils.hpp"
#include "ngraph/runtime/tensor_view.hpp"
namespace ngraph
......@@ -31,8 +31,7 @@ namespace ngraph
class NotInstruction : public Instruction
{
public:
NotInstruction(const TensorViewInfo& arg,
const TensorViewInfo& out)
NotInstruction(const TensorViewInfo& arg, const TensorViewInfo& out)
: m_arg(arg)
, m_out(out)
{
......@@ -40,8 +39,10 @@ namespace ngraph
virtual void execute(CallFrame& call_frame) const override
{
char* arg = get_tensor_data_ptr<element::Bool>(call_frame, m_arg); // FIXME: temporarily char not bool
char* out = get_tensor_data_ptr<element::Bool>(call_frame, m_out); // FIXME: temporarily char not bool
char* arg = get_tensor_data_ptr<element::Bool>(
call_frame, m_arg); // FIXME: temporarily char not bool
char* out = get_tensor_data_ptr<element::Bool>(
call_frame, m_out); // FIXME: temporarily char not bool
size_t count = get_tensor_element_count(call_frame, m_arg);
......
......@@ -16,8 +16,8 @@
#include "ngraph/runtime/kernel/not_equal.hpp"
#include "ngraph/runtime/ngvm/call_frame.hpp"
#include "ngraph/runtime/ngvm/utils.hpp"
#include "ngraph/runtime/ngvm/instruction.hpp"
#include "ngraph/runtime/ngvm/utils.hpp"
#include "ngraph/runtime/tensor_view.hpp"
namespace ngraph
......@@ -33,8 +33,8 @@ namespace ngraph
{
public:
NotEqualInstruction(const TensorViewInfo& arg0,
const TensorViewInfo& arg1,
const TensorViewInfo& out)
const TensorViewInfo& arg1,
const TensorViewInfo& out)
: m_arg0(arg0)
, m_arg1(arg1)
, m_out(out)
......@@ -45,7 +45,8 @@ namespace ngraph
{
typename ET::type* arg0 = get_tensor_data_ptr<ET>(call_frame, m_arg0);
typename ET::type* arg1 = get_tensor_data_ptr<ET>(call_frame, m_arg1);
char* out = get_tensor_data_ptr<element::Bool>(call_frame, m_out); // FIXME: temporarily char not bool
char* out = get_tensor_data_ptr<element::Bool>(
call_frame, m_out); // FIXME: temporarily char not bool
size_t count = get_tensor_element_count(call_frame, m_arg0);
......
......@@ -16,8 +16,8 @@
#include "ngraph/runtime/kernel/power.hpp"
#include "ngraph/runtime/ngvm/call_frame.hpp"
#include "ngraph/runtime/ngvm/utils.hpp"
#include "ngraph/runtime/ngvm/instruction.hpp"
#include "ngraph/runtime/ngvm/utils.hpp"
#include "ngraph/runtime/tensor_view.hpp"
namespace ngraph
......@@ -33,8 +33,8 @@ namespace ngraph
{
public:
PowerInstruction(const TensorViewInfo& arg0,
const TensorViewInfo& arg1,
const TensorViewInfo& out)
const TensorViewInfo& arg1,
const TensorViewInfo& out)
: m_arg0(arg0)
, m_arg1(arg1)
, m_out(out)
......
......@@ -16,8 +16,8 @@
#include "ngraph/runtime/kernel/select.hpp"
#include "ngraph/runtime/ngvm/call_frame.hpp"
#include "ngraph/runtime/ngvm/utils.hpp"
#include "ngraph/runtime/ngvm/instruction.hpp"
#include "ngraph/runtime/ngvm/utils.hpp"
#include "ngraph/runtime/tensor_view.hpp"
namespace ngraph
......@@ -33,9 +33,9 @@ namespace ngraph
{
public:
SelectInstruction(const TensorViewInfo& arg0,
const TensorViewInfo& arg1,
const TensorViewInfo& arg2,
const TensorViewInfo& out)
const TensorViewInfo& arg1,
const TensorViewInfo& arg2,
const TensorViewInfo& out)
: m_arg0(arg0)
, m_arg1(arg1)
, m_arg2(arg2)
......@@ -45,7 +45,8 @@ namespace ngraph
virtual void execute(CallFrame& call_frame) const override
{
char* arg0 = get_tensor_data_ptr<element::Bool>(call_frame, m_arg0); // FIXME: temporarily char not bool
char* arg0 = get_tensor_data_ptr<element::Bool>(
call_frame, m_arg0); // FIXME: temporarily char not bool
typename ET::type* arg1 = get_tensor_data_ptr<ET>(call_frame, m_arg1);
typename ET::type* arg2 = get_tensor_data_ptr<ET>(call_frame, m_arg2);
typename ET::type* out = get_tensor_data_ptr<ET>(call_frame, m_out);
......
......@@ -16,8 +16,8 @@
#include "ngraph/runtime/kernel/sign.hpp"
#include "ngraph/runtime/ngvm/call_frame.hpp"
#include "ngraph/runtime/ngvm/utils.hpp"
#include "ngraph/runtime/ngvm/instruction.hpp"
#include "ngraph/runtime/ngvm/utils.hpp"
#include "ngraph/runtime/tensor_view.hpp"
namespace ngraph
......@@ -32,8 +32,7 @@ namespace ngraph
class SignInstruction : public Instruction
{
public:
SignInstruction(const TensorViewInfo& arg,
const TensorViewInfo& out)
SignInstruction(const TensorViewInfo& arg, const TensorViewInfo& out)
: m_arg(arg)
, m_out(out)
{
......
......@@ -16,8 +16,8 @@
#include "ngraph/runtime/kernel/sin.hpp"
#include "ngraph/runtime/ngvm/call_frame.hpp"
#include "ngraph/runtime/ngvm/utils.hpp"
#include "ngraph/runtime/ngvm/instruction.hpp"
#include "ngraph/runtime/ngvm/utils.hpp"
#include "ngraph/runtime/tensor_view.hpp"
namespace ngraph
......@@ -32,8 +32,7 @@ namespace ngraph
class SinInstruction : public Instruction
{
public:
SinInstruction(const TensorViewInfo& arg,
const TensorViewInfo& out)
SinInstruction(const TensorViewInfo& arg, const TensorViewInfo& out)
: m_arg(arg)
, m_out(out)
{
......
......@@ -16,8 +16,8 @@
#include "ngraph/runtime/kernel/sinh.hpp"
#include "ngraph/runtime/ngvm/call_frame.hpp"
#include "ngraph/runtime/ngvm/utils.hpp"
#include "ngraph/runtime/ngvm/instruction.hpp"
#include "ngraph/runtime/ngvm/utils.hpp"
#include "ngraph/runtime/tensor_view.hpp"
namespace ngraph
......@@ -32,8 +32,7 @@ namespace ngraph
class SinhInstruction : public Instruction
{
public:
SinhInstruction(const TensorViewInfo& arg,
const TensorViewInfo& out)
SinhInstruction(const TensorViewInfo& arg, const TensorViewInfo& out)
: m_arg(arg)
, m_out(out)
{
......
......@@ -16,8 +16,8 @@
#include "ngraph/runtime/kernel/sqrt.hpp"
#include "ngraph/runtime/ngvm/call_frame.hpp"
#include "ngraph/runtime/ngvm/utils.hpp"
#include "ngraph/runtime/ngvm/instruction.hpp"
#include "ngraph/runtime/ngvm/utils.hpp"
#include "ngraph/runtime/tensor_view.hpp"
namespace ngraph
......@@ -32,8 +32,7 @@ namespace ngraph
class SqrtInstruction : public Instruction
{
public:
SqrtInstruction(const TensorViewInfo& arg,
const TensorViewInfo& out)
SqrtInstruction(const TensorViewInfo& arg, const TensorViewInfo& out)
: m_arg(arg)
, m_out(out)
{
......
......@@ -16,8 +16,8 @@
#include "ngraph/runtime/kernel/subtract.hpp"
#include "ngraph/runtime/ngvm/call_frame.hpp"
#include "ngraph/runtime/ngvm/utils.hpp"
#include "ngraph/runtime/ngvm/instruction.hpp"
#include "ngraph/runtime/ngvm/utils.hpp"
#include "ngraph/runtime/tensor_view.hpp"
namespace ngraph
......@@ -33,8 +33,8 @@ namespace ngraph
{
public:
SubtractInstruction(const TensorViewInfo& arg0,
const TensorViewInfo& arg1,
const TensorViewInfo& out)
const TensorViewInfo& arg1,
const TensorViewInfo& out)
: m_arg0(arg0)
, m_arg1(arg1)
, m_out(out)
......
......@@ -16,8 +16,8 @@
#include "ngraph/runtime/kernel/tan.hpp"
#include "ngraph/runtime/ngvm/call_frame.hpp"
#include "ngraph/runtime/ngvm/utils.hpp"
#include "ngraph/runtime/ngvm/instruction.hpp"
#include "ngraph/runtime/ngvm/utils.hpp"
#include "ngraph/runtime/tensor_view.hpp"
namespace ngraph
......@@ -32,8 +32,7 @@ namespace ngraph
class TanInstruction : public Instruction
{
public:
TanInstruction(const TensorViewInfo& arg,
const TensorViewInfo& out)
TanInstruction(const TensorViewInfo& arg, const TensorViewInfo& out)
: m_arg(arg)
, m_out(out)
{
......
......@@ -16,8 +16,8 @@
#include "ngraph/runtime/kernel/tanh.hpp"
#include "ngraph/runtime/ngvm/call_frame.hpp"
#include "ngraph/runtime/ngvm/utils.hpp"
#include "ngraph/runtime/ngvm/instruction.hpp"
#include "ngraph/runtime/ngvm/utils.hpp"
#include "ngraph/runtime/tensor_view.hpp"
namespace ngraph
......@@ -32,8 +32,7 @@ namespace ngraph
class TanhInstruction : public Instruction
{
public:
TanhInstruction(const TensorViewInfo& arg,
const TensorViewInfo& out)
TanhInstruction(const TensorViewInfo& arg, const TensorViewInfo& out)
: m_arg(arg)
, m_out(out)
{
......
......@@ -33,14 +33,18 @@ namespace ngraph
class CallFrame;
template <typename ET>
typename ET::type* get_tensor_data_ptr(CallFrame& call_frame, const TensorViewInfo& tensor_view_info)
typename ET::type* get_tensor_data_ptr(CallFrame& call_frame,
const TensorViewInfo& tensor_view_info)
{
return call_frame.get_tensor_view_data<ET>(tensor_view_info.get_index());
}
size_t get_tensor_element_count(CallFrame& call_frame, const TensorViewInfo& tensor_view_info)
size_t get_tensor_element_count(CallFrame& call_frame,
const TensorViewInfo& tensor_view_info)
{
return tensor_view_info.get_layout<ngraph::descriptor::layout::DenseTensorViewLayout>()->get_size();
return tensor_view_info
.get_layout<ngraph::descriptor::layout::DenseTensorViewLayout>()
->get_size();
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment