Commit a138509b authored by Bob Kimball's avatar Bob Kimball

clang-format-3.9 style

parent 22e2307b
...@@ -37,7 +37,6 @@ namespace nervana ...@@ -37,7 +37,6 @@ namespace nervana
} }
constexpr const char* get_ptr(size_t offset) const { return &_string[offset]; } constexpr const char* get_ptr(size_t offset) const { return &_string[offset]; }
constexpr size_t size() const { return _size; } constexpr size_t size() const { return _size; }
private: private:
const char* _string; const char* _string;
size_t _size; size_t _size;
...@@ -45,9 +44,8 @@ namespace nervana ...@@ -45,9 +44,8 @@ namespace nervana
constexpr const char* find_last(conststring s, size_t offset, char ch) constexpr const char* find_last(conststring s, size_t offset, char ch)
{ {
return offset == 0 return offset == 0 ? s.get_ptr(0) : (s[offset] == ch ? s.get_ptr(offset + 1)
? s.get_ptr(0) : find_last(s, offset - 1, ch));
: (s[offset] == ch ? s.get_ptr(offset + 1) : find_last(s, offset - 1, ch));
} }
constexpr const char* find_last(conststring s, char ch) constexpr const char* find_last(conststring s, char ch)
...@@ -69,7 +67,6 @@ namespace nervana ...@@ -69,7 +67,6 @@ namespace nervana
~log_helper(); ~log_helper();
std::ostream& stream() { return _stream; } std::ostream& stream() { return _stream; }
private: private:
std::stringstream _stream; std::stringstream _stream;
}; };
......
...@@ -27,7 +27,6 @@ public: ...@@ -27,7 +27,6 @@ public:
ElementType et = element_type_float); ElementType et = element_type_float);
const ElementType& get_type() const { return m_element_type; } const ElementType& get_type() const { return m_element_type; }
tensor_stride full_strides() const; tensor_stride full_strides() const;
tensor_stride strides() const; tensor_stride strides() const;
tensor_size sizes() const; tensor_size sizes() const;
...@@ -53,7 +52,6 @@ class ngraph::tensor_stride ...@@ -53,7 +52,6 @@ class ngraph::tensor_stride
public: public:
tensor_stride(); tensor_stride();
const ElementType& get_type() const { return m_element_type; } const ElementType& get_type() const { return m_element_type; }
tensor_stride full_strides() const; tensor_stride full_strides() const;
tensor_stride strides() const; tensor_stride strides() const;
......
...@@ -12,10 +12,10 @@ ...@@ -12,10 +12,10 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
#include <cassert>
#include <cmath>
#include <iostream> #include <iostream>
#include <sstream> #include <sstream>
#include <cmath>
#include <cassert>
#include "axes.hpp" #include "axes.hpp"
#include "util.hpp" #include "util.hpp"
......
This diff is collapsed.
...@@ -12,10 +12,10 @@ ...@@ -12,10 +12,10 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
#include <cmath>
#include <exception>
#include <memory> #include <memory>
#include <sstream> #include <sstream>
#include <exception>
#include <cmath>
#include "exop.hpp" #include "exop.hpp"
#include "op_graph.hpp" #include "op_graph.hpp"
......
This diff is collapsed.
This diff is collapsed.
...@@ -14,24 +14,21 @@ ...@@ -14,24 +14,21 @@
#pragma once #pragma once
#include "mock.hpp"
#include "exop.hpp" #include "exop.hpp"
#include "mock.hpp"
namespace ngraph namespace ngraph
{ {
//================================================================================================
//================================================================================================ // CpuTransformer
// CpuTransformer //================================================================================================
//================================================================================================ class CpuTransformer : public Transformer
class CpuTransformer : public Transformer {
{ public:
public:
virtual ~CpuTransformer() {} virtual ~CpuTransformer() {}
ExecutionState& execution_state() override { return m_execution_state; } ExecutionState& execution_state() override { return m_execution_state; }
private:
private:
ExecutionState m_execution_state; ExecutionState m_execution_state;
}; };
} // end namespace ngraph } // end namespace ngraph
...@@ -14,8 +14,8 @@ ...@@ -14,8 +14,8 @@
#pragma once #pragma once
#include <vector>
#include <memory> #include <memory>
#include <vector>
#include "element_type.hpp" #include "element_type.hpp"
#include "strides.hpp" #include "strides.hpp"
......
...@@ -14,8 +14,8 @@ ...@@ -14,8 +14,8 @@
#include <sstream> #include <sstream>
#include "op_graph.hpp"
#include "axes.hpp" #include "axes.hpp"
#include "op_graph.hpp"
#include "util.hpp" #include "util.hpp"
using namespace ngraph; using namespace ngraph;
...@@ -2794,7 +2794,9 @@ ElementWiseOp::ElementWiseOp() ...@@ -2794,7 +2794,9 @@ ElementWiseOp::ElementWiseOp()
{ {
} }
void ElementWiseOp::ElementWiseOp_init(std::vector<op_ptr>, Axes) {} void ElementWiseOp::ElementWiseOp_init(std::vector<op_ptr>, Axes)
{
}
//================================================================================================ //================================================================================================
// UnaryElementWiseOp // UnaryElementWiseOp
......
This diff is collapsed.
...@@ -51,7 +51,6 @@ public: ...@@ -51,7 +51,6 @@ public:
bool is_list() const { return m_is_list; } bool is_list() const { return m_is_list; }
T get_value() const { return m_value; } T get_value() const { return m_value; }
const std::vector<tree>& get_list() const { return m_list; } const std::vector<tree>& get_list() const { return m_list; }
static void traverse_tree(tree& s, std::function<void(T*)> func) static void traverse_tree(tree& s, std::function<void(T*)> func)
{ {
if (s.is_list()) if (s.is_list())
......
...@@ -148,7 +148,6 @@ namespace ngraph ...@@ -148,7 +148,6 @@ namespace ngraph
size_t get_total_milliseconds() const { return get_total_nanoseconds() / 1e6; } size_t get_total_milliseconds() const { return get_total_nanoseconds() / 1e6; }
size_t get_total_microseconds() const { return get_total_nanoseconds() / 1e3; } size_t get_total_microseconds() const { return get_total_nanoseconds() / 1e3; }
size_t get_total_nanoseconds() const { return m_total_time.count(); } size_t get_total_nanoseconds() const { return m_total_time.count(); }
private: private:
std::chrono::high_resolution_clock m_clock; std::chrono::high_resolution_clock m_clock;
std::chrono::time_point<std::chrono::high_resolution_clock> m_start_time; std::chrono::time_point<std::chrono::high_resolution_clock> m_start_time;
......
...@@ -74,7 +74,6 @@ public: ...@@ -74,7 +74,6 @@ public:
} }
bool operator!=(const uuid_type& other) const { return !(*this == other); } bool operator!=(const uuid_type& other) const { return !(*this == other); }
friend std::ostream& operator<<(std::ostream& out, const uuid_type& id) friend std::ostream& operator<<(std::ostream& out, const uuid_type& id)
{ {
out << id.to_string(); out << id.to_string();
......
...@@ -22,4 +22,6 @@ ...@@ -22,4 +22,6 @@
using namespace ngraph; using namespace ngraph;
TEST(names, name) {} TEST(names, name)
{
}
...@@ -134,7 +134,9 @@ TEST(util, contains) ...@@ -134,7 +134,9 @@ TEST(util, contains)
EXPECT_FALSE(contains(v1, 8)); EXPECT_FALSE(contains(v1, 8));
} }
TEST(util, remove_from) {} TEST(util, remove_from)
{
}
TEST(util, reduce) TEST(util, reduce)
{ {
......
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