Commit fb7b72a6 authored by Paul's avatar Paul
Browse files

Fix compiler warnings

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