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