Commit fb7b72a6 authored by Paul's avatar Paul
Browse files

Fix compiler warnings

parent 2dfd93ae
......@@ -13,11 +13,11 @@ struct literal
{
return "@literal";
}
shape compute_shape(std::vector<shape> input) const
shape compute_shape(std::vector<shape>) const
{
throw "builtin";
}
argument compute(std::vector<argument> input) const
argument compute(std::vector<argument>) const
{
throw "builtin";
}
......@@ -30,11 +30,11 @@ struct param
{
return "@param:" + parameter;
}
shape compute_shape(std::vector<shape> input) const
shape compute_shape(std::vector<shape>) const
{
throw "builtin";
}
argument compute(std::vector<argument> input) const
argument compute(std::vector<argument>) const
{
throw "builtin";
}
......
......@@ -81,7 +81,7 @@ struct operand
{
template <typename TypeErased_U_ = TypeErased_T_>
handle_type_(TypeErased_T_ value,
typename std::enable_if<std::is_reference<TypeErased_U_>::value>::type* = 0)
typename std::enable_if<std::is_reference<TypeErased_U_>::value>::type* = nullptr)
: value_(value)
{
}
......@@ -89,7 +89,7 @@ struct operand
template <typename TypeErased_U_ = TypeErased_T_>
handle_type_(TypeErased_T_ value,
typename std::enable_if<!std::is_reference<TypeErased_U_>::value, int>::type* =
0) noexcept : value_(std::move(value))
nullptr) noexcept : value_(std::move(value))
{
}
......
......@@ -74,7 +74,7 @@ struct raw_data
T result;
this->visit_at([&](auto x) {
result = x;
});
}, n);
return result;
}
};
......
......@@ -82,4 +82,4 @@ inline std::string to_string(const Range& r)
} // namespace rtg
#endif
\ No newline at end of file
#endif
......@@ -2,6 +2,7 @@
#define RTG_GUARD_TENSOR_VIEW_HPP
#include <rtg/shape.hpp>
#include <rtg/float_equal.hpp>
#include <iostream>
......@@ -123,7 +124,7 @@ struct tensor_view
{
for(std::size_t i = 0;i < x.shape_.elements();i++)
{
if(x[i] != y[i]) return false;
if(!float_equal(x[i], y[i])) return false;
}
return true;
}
......
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