Commit cd0f4fbd authored by Adam Procter's avatar Adam Procter Committed by Scott Cyphers

Remove single-line comments ending with backslash (#928)

* Remove single-line comments ending with backslash

These comments cause warnings on gcc.

* Add -DNGRAPH_DEBUG_ENABLE cmake option

* Forgot to update log.hpp

* Better comment in CMakeLists
parent 93b7b517
......@@ -70,6 +70,7 @@ option(NGRAPH_TOOLS_ENABLE "Control the building of tool" TRUE)
option(NGRAPH_CPU_ENABLE "Control the building of the CPU backend" TRUE)
option(NGRAPH_GPU_ENABLE "Control the building of the GPU backend" FALSE)
option(NGRAPH_DISTRIBUTED_ENABLE "Add distributed mode to the CPU backend" FALSE)
option(NGRAPH_DEBUG_ENABLE "Enable output for NGRAPH_DEBUG statements" FALSE)
#-----------------------------------------------------------------------------------------------
# Installation logic...
......@@ -170,6 +171,13 @@ if(NGRAPH_GPU_ENABLE)
endif()
endif()
#-----------------------------------------------------------------------------------------------
# enable or disable output from NGRAPH_DEBUG statements
#-----------------------------------------------------------------------------------------------
if(NGRAPH_DEBUG_ENABLE)
add_definitions(-DNGRAPH_DEBUG_ENABLE)
endif()
#-----------------------------------------------------------------------------------------------
# distributed support
#-----------------------------------------------------------------------------------------------
......
......@@ -345,18 +345,18 @@ pair<shared_ptr<op::Result>, shared_ptr<op::Parameter>>
//
// This cannot be achieved by ngraph::replace_node().
// With replace_node(), we could do:
// S S
// / \ |
// / \ => N
// / \ / \
// D0 D1 D0 D1
// [ S S ]
// [ / \ | ]
// [ / \ => N ]
// [ / \ / \ ]
// [ D0 D1 D0 D1 ]
//
// But we want:
// S S
// / \ / \
// / \ => N0 N1
// / \ / \
// D0 D1 D0 D1
// [ S S ]
// [ / \ / \ ]
// [ / \ => N0 N1 ]
// [ / \ / \ ]
// [ D0 D1 D0 D1 ]
//
// Typically new_node is connected to src_node already. The reason we don't create `new_node`
// inside the function and return it (similar to ngraph::insert_result_parameter_split) is that
......
......@@ -111,12 +111,14 @@ namespace ngraph
__PRETTY_FUNCTION__) \
.stream()
// #define NGRAPH_DEBUG \
// ngraph::log_helper(ngraph::LOG_TYPE::_LOG_TYPE_DEBUG, \
// ngraph::get_file_name(__FILE__), \
// __LINE__, \
// __PRETTY_FUNCTION__) \
// .stream()
#ifdef NGRAPH_DEBUG_ENABLE
#define NGRAPH_DEBUG \
ngraph::log_helper(ngraph::LOG_TYPE::_LOG_TYPE_DEBUG, \
ngraph::get_file_name(__FILE__), \
__LINE__, \
__PRETTY_FUNCTION__) \
.stream()
#else
#define NGRAPH_DEBUG ngraph::get_nil_stream()
#endif
}
......@@ -31,9 +31,7 @@ namespace ngraph
/// \f[
/// \mathit{reduce}\left(f,\{0\},
/// \left[ \begin{array}{ccc}
/// 1 & 2 \\
/// 3 & 4 \\
/// 5 & 6 \end{array} \right]\right) =
/// 1 & 2 \\ 3 & 4 \\ 5 & 6 \end{array} \right]\right) =
/// \left[ (1 + 3 + 5), (2 + 4 + 6) \right] =
/// \left[ 9, 12 \right]~~~\text{(dimension 0 (rows) is eliminated)}
/// \f]
......@@ -41,9 +39,7 @@ namespace ngraph
/// \f[
/// \mathit{reduce}\left(f,\{1\},
/// \left[ \begin{array}{ccc}
/// 1 & 2 \\
/// 3 & 4 \\
/// 5 & 6 \end{array} \right]\right) =
/// 1 & 2 \\ 3 & 4 \\ 5 & 6 \end{array} \right]\right) =
/// \left[ (1 + 2), (3 + 4), (5 + 6) \right] =
/// \left[ 3, 7, 11 \right]~~~\text{(dimension 1 (columns) is eliminated)}
/// \f]
......@@ -51,9 +47,7 @@ namespace ngraph
/// \f[
/// \mathit{reduce}\left(f,\{0,1\},
/// \left[ \begin{array}{ccc}
/// 1 & 2 \\
/// 3 & 4 \\
/// 5 & 6 \end{array} \right]\right) =
/// 1 & 2 \\ 3 & 4 \\ 5 & 6 \end{array} \right]\right) =
/// (1 + 2) + (3 + 4) + (5 + 6) =
/// 21~~~\text{(both dimensions (rows and columns) are eliminated)}
/// \f]
......
......@@ -33,9 +33,7 @@ namespace ngraph
/// \f[
/// \mathit{sum}\left(\{0\},
/// \left[ \begin{array}{ccc}
/// 1 & 2 \\
/// 3 & 4 \\
/// 5 & 6 \end{array} \right]\right) =
/// 1 & 2 \\ 3 & 4 \\ 5 & 6 \end{array} \right]\right) =
/// \left[ (1 + 3 + 5), (2 + 4 + 6) \right] =
/// \left[ 9, 12 \right]~~~\text{(dimension 0 (rows) is eliminated)}
/// \f]
......@@ -43,9 +41,7 @@ namespace ngraph
/// \f[
/// \mathit{sum}\left(\{1\},
/// \left[ \begin{array}{ccc}
/// 1 & 2 \\
/// 3 & 4 \\
/// 5 & 6 \end{array} \right]\right) =
/// 1 & 2 \\ 3 & 4 \\ 5 & 6 \end{array} \right]\right) =
/// \left[ (1 + 2), (3 + 4), (5 + 6) \right] =
/// \left[ 3, 7, 11 \right]~~~\text{(dimension 1 (columns) is eliminated)}
/// \f]
......@@ -53,9 +49,7 @@ namespace ngraph
/// \f[
/// \mathit{sum}\left(\{0,1\},
/// \left[ \begin{array}{ccc}
/// 1 & 2 \\
/// 3 & 4 \\
/// 5 & 6 \end{array} \right]\right) =
/// 1 & 2 \\ 3 & 4 \\ 5 & 6 \end{array} \right]\right) =
/// (1 + 2) + (3 + 4) + (5 + 6) =
/// 21~~~\text{(both dimensions (rows and columns) are eliminated)}
/// \f]
......
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