Commit d693075f authored by Adam Procter's avatar Adam Procter

Review comments

parent 1024924b
......@@ -12,7 +12,6 @@
// See the License for the specific language governing permissions and
// ----------------------------------------------------------------------------
#include <cassert>
#include <cstdio>
#include <iostream>
#include <vector>
......@@ -33,9 +32,20 @@ CoordinateIterator::CoordinateIterator(const Shape& space_shape,
, m_window_inner_corner(window_inner_corner)
, m_current_coordinate(window_inner_corner)
{
assert(space_shape.size() == window_inner_corner.size());
assert(space_shape.size() == window_outer_corner.size());
assert(space_shape.size() == strides.size());
if (space_shape.size() != window_inner_corner.size())
{
throw ngraph_error("Coordinate iterator inner corner rank does not make space shape rank");
}
if (space_shape.size() != window_outer_corner.size())
{
throw ngraph_error("Coordinate iterator outer corner rank does not make space shape rank");
}
if (space_shape.size() != strides.size())
{
throw ngraph_error("Coordinate iterator stride rank does not make space shape rank");
}
for (size_t i = 0; i < space_shape.size(); i++)
{
......
......@@ -25,7 +25,7 @@ namespace ngraph
{
for (size_t i = 0; i < count; i++)
{
out[i] = TO(arg[i]);
out[i] = static_cast<TO>(arg[i]);
}
}
}
......
......@@ -24,8 +24,10 @@ 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) // TODO: using char for bool, is this right?
{
for (size_t i = 0; i < count; i++)
{
......
......@@ -24,7 +24,7 @@ namespace ngraph
void greater(T* arg0,
T* arg1,
char* out,
size_t count) // FIXME: temporarily char not bool
size_t count) // TODO: using char for bool, is this right?
{
for (size_t i = 0; i < count; i++)
{
......
......@@ -24,7 +24,7 @@ namespace ngraph
void greater_eq(T* arg0,
T* arg1,
char* out,
size_t count) // FIXME: temporarily char not bool
size_t count) // TODO: using char for bool, is this right?
{
for (size_t i = 0; i < count; i++)
{
......
......@@ -21,7 +21,10 @@ namespace ngraph
namespace kernel
{
template <typename T>
void less(T* arg0, T* arg1, char* out, size_t count) // FIXME: temporarily char not bool
void less(T* arg0,
T* arg1,
char* out,
size_t count) // TODO: using char for bool, is this right?
{
for (size_t i = 0; i < count; i++)
{
......
......@@ -24,7 +24,7 @@ namespace ngraph
void less_eq(T* arg0,
T* arg1,
char* out,
size_t count) // FIXME: temporarily char not bool
size_t count) // TODO: using char for bool, is this right?
{
for (size_t i = 0; i < count; i++)
{
......
......@@ -22,7 +22,7 @@ namespace ngraph
{
void logical_not(char* arg,
char* out,
size_t count) // FIXME: temporararily char not bool
size_t count) // TODO: using char for bool, is this right?
{
for (size_t i = 0; i < count; i++)
{
......
......@@ -27,7 +27,7 @@ namespace ngraph
void not_equal(T* arg0,
T* arg1,
char* out,
size_t count) // FIXME: temporarily char not bool
size_t count) // TODO: using char for bool, is this right?
{
for (size_t i = 0; i < count; i++)
{
......
......@@ -25,7 +25,7 @@ namespace ngraph
T* arg1,
T* arg2,
T* out,
size_t count) // FIXME: temporararily char not bool
size_t count) // TODO: using char for bool, is this right?
{
for (size_t i = 0; i < count; i++)
{
......
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