Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/marian-nmt/marian.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRoman Grundkiewicz <rgrundki@exseed.ed.ac.uk>2018-03-13 00:04:05 +0300
committerRoman Grundkiewicz <rgrundki@exseed.ed.ac.uk>2018-03-13 00:04:05 +0300
commit43a22f2210902a8ea9a091b00071a1701e2fe3ae (patch)
treea890c496e2332897f89b6a83df85fa4d2e3189b8 /src
parent6d0c75cf48bab913e2c9c52f1c4c6cd0d656005d (diff)
Clean includes
Diffstat (limited to 'src')
-rw-r--r--src/functional/tmp.h2
-rw-r--r--src/graph/expression_graph.h6
-rw-r--r--src/graph/node.cpp5
-rw-r--r--src/graph/node_initializers.cpp1
-rw-r--r--src/graph/node_operators.cpp2
-rw-r--r--src/graph/node_operators_unary.h4
-rw-r--r--src/graph/parameters.h2
-rw-r--r--src/models/char_s2s.h2
-rw-r--r--src/optimizers/clippers.cpp2
-rw-r--r--src/tensors/gpu/algorithm.cu2
-rw-r--r--src/tensors/gpu/dropout.cu2
-rw-r--r--src/tensors/gpu/element.cu4
-rw-r--r--src/tensors/gpu/prod.cu2
-rw-r--r--src/tensors/gpu/tensor_operators.cu6
-rw-r--r--src/tensors/tensor.h2
-rw-r--r--src/tensors/tensor_operators.h8
-rw-r--r--src/training/graph_group_async.cpp2
-rw-r--r--src/training/graph_group_multinode.cpp2
-rw-r--r--src/training/graph_group_singleton.cpp2
-rw-r--r--src/training/sparse_tensor.cu3
20 files changed, 32 insertions, 29 deletions
diff --git a/src/functional/tmp.h b/src/functional/tmp.h
index 65cb49d8..fb2ba595 100644
--- a/src/functional/tmp.h
+++ b/src/functional/tmp.h
@@ -1,8 +1,8 @@
#pragma once
+#include "functional/array.h"
#include "functional/defs.h"
#include "functional/tensor.h"
-#include "functional/array.h"
namespace marian {
namespace functional {
diff --git a/src/graph/expression_graph.h b/src/graph/expression_graph.h
index c6cd4558..c5f12335 100644
--- a/src/graph/expression_graph.h
+++ b/src/graph/expression_graph.h
@@ -7,13 +7,13 @@
#include "common/config.h"
#include "common/definitions.h"
-#include "tensors/tensor_allocator.h"
#include "tensors/backend.h"
+#include "tensors/tensor_allocator.h"
-#include "graph/parameters.h"
#include "graph/chainable.h"
-#include "graph/node_operators.h"
#include "graph/node_initializers.h"
+#include "graph/node_operators.h"
+#include "graph/parameters.h"
#include "3rd_party/cnpy/cnpy.h"
diff --git a/src/graph/node.cpp b/src/graph/node.cpp
index 721cb30f..12399f53 100644
--- a/src/graph/node.cpp
+++ b/src/graph/node.cpp
@@ -1,7 +1,6 @@
-#include "tensors/backend.h"
-
-#include "graph/expression_graph.h"
#include "graph/node.h"
+#include "graph/expression_graph.h"
+#include "tensors/backend.h"
namespace marian {
diff --git a/src/graph/node_initializers.cpp b/src/graph/node_initializers.cpp
index 6650ede6..ef33f48d 100644
--- a/src/graph/node_initializers.cpp
+++ b/src/graph/node_initializers.cpp
@@ -1,5 +1,4 @@
#include "graph/node_initializers.h"
-
#include "3rd_party/svd/svd.h"
#include "layers/word2vec_reader.h"
diff --git a/src/graph/node_operators.cpp b/src/graph/node_operators.cpp
index 76f0b1e3..48a9aa08 100644
--- a/src/graph/node_operators.cpp
+++ b/src/graph/node_operators.cpp
@@ -1,5 +1,5 @@
-#include "expression_graph.h"
#include "node_operators.h"
+#include "expression_graph.h"
namespace marian {
diff --git a/src/graph/node_operators_unary.h b/src/graph/node_operators_unary.h
index 8d81a63a..8ab249a8 100644
--- a/src/graph/node_operators_unary.h
+++ b/src/graph/node_operators_unary.h
@@ -1,11 +1,11 @@
#pragma once
-#include "tensors/tensor.h"
#include "tensors/backend.h"
+#include "tensors/tensor.h"
+#include "functional/functional.h"
#include "graph/node.h"
#include "tensors/tensor_operators.h"
-#include "functional/functional.h"
//#include "tensors/gpu/cudnn_wrappers.h"
diff --git a/src/graph/parameters.h b/src/graph/parameters.h
index 99e3b2af..42b22c01 100644
--- a/src/graph/parameters.h
+++ b/src/graph/parameters.h
@@ -5,8 +5,8 @@
#include <unordered_set>
#include "common/definitions.h"
-#include "tensors/tensor_allocator.h"
#include "graph/chainable.h"
+#include "tensors/tensor_allocator.h"
namespace marian {
diff --git a/src/models/char_s2s.h b/src/models/char_s2s.h
index f0c5de5c..25a1d10e 100644
--- a/src/models/char_s2s.h
+++ b/src/models/char_s2s.h
@@ -1,9 +1,9 @@
#pragma once
#include "marian.h"
-#include "models/s2s.h"
#include "layers/convolution.h"
+#include "models/s2s.h"
namespace marian {
diff --git a/src/optimizers/clippers.cpp b/src/optimizers/clippers.cpp
index 0ed21f91..d396fabf 100644
--- a/src/optimizers/clippers.cpp
+++ b/src/optimizers/clippers.cpp
@@ -1,7 +1,7 @@
#include "clippers.h"
-#include "tensors/tensor_operators.h"
#include "functional/functional.h"
+#include "tensors/tensor_operators.h"
namespace marian {
void Elementwise::clip(Tensor t) {
diff --git a/src/tensors/gpu/algorithm.cu b/src/tensors/gpu/algorithm.cu
index d5f5b3ec..54c099c0 100644
--- a/src/tensors/gpu/algorithm.cu
+++ b/src/tensors/gpu/algorithm.cu
@@ -1,7 +1,9 @@
#include "tensors/gpu/algorithm.h"
+// clang-format off
#include "tensors/tensor_operators.h"
#include "tensors/gpu/cuda_helpers.h"
+// clang-format on
namespace marian {
namespace gpu {
diff --git a/src/tensors/gpu/dropout.cu b/src/tensors/gpu/dropout.cu
index dc82e49d..b416871f 100644
--- a/src/tensors/gpu/dropout.cu
+++ b/src/tensors/gpu/dropout.cu
@@ -3,8 +3,10 @@
#include <stdio.h>
#include <stdlib.h>
+// clang-format off
#include "tensors/tensor_operators.h"
#include "tensors/gpu/backend.h"
+// clang-format on
#define CUDA_CALL(x) \
do { \
diff --git a/src/tensors/gpu/element.cu b/src/tensors/gpu/element.cu
index f5c5fbe7..91831567 100644
--- a/src/tensors/gpu/element.cu
+++ b/src/tensors/gpu/element.cu
@@ -1,10 +1,10 @@
#include "tensors/gpu/element.h"
-#include "tensors/gpu/cuda_helpers.h"
#include "functional/array.h"
+#include "functional/functional.h"
#include "functional/tensor.h"
#include "functional/tmp.h"
-#include "functional/functional.h"
+#include "tensors/gpu/cuda_helpers.h"
namespace marian {
namespace gpu {
diff --git a/src/tensors/gpu/prod.cu b/src/tensors/gpu/prod.cu
index 57ff2007..46a6452d 100644
--- a/src/tensors/gpu/prod.cu
+++ b/src/tensors/gpu/prod.cu
@@ -1,8 +1,10 @@
#include <cublas_v2.h>
+// clang-format off
#include "tensors/gpu/prod.h"
#include "tensors/gpu/backend.h"
+// clang-format on
namespace marian {
diff --git a/src/tensors/gpu/tensor_operators.cu b/src/tensors/gpu/tensor_operators.cu
index 1160bdd1..9c7b7b54 100644
--- a/src/tensors/gpu/tensor_operators.cu
+++ b/src/tensors/gpu/tensor_operators.cu
@@ -1,11 +1,11 @@
//#include <thrust/transform_reduce.h>
-#include "tensors/gpu/cuda_helpers.h"
#include "tensors/tensor_operators.h"
-#include "tensors/gpu/backend.h"
-#include "functional/tensor.h"
#include "functional/functional.h"
+#include "functional/tensor.h"
+#include "tensors/gpu/backend.h"
+#include "tensors/gpu/cuda_helpers.h"
#include "3rd_party/reduce_all.h"
diff --git a/src/tensors/tensor.h b/src/tensors/tensor.h
index 9789428e..efdb67de 100644
--- a/src/tensors/tensor.h
+++ b/src/tensors/tensor.h
@@ -7,8 +7,8 @@
#include "common/definitions.h"
#include "common/shape.h"
-#include "tensors/memory_piece.h"
#include "tensors/backend.h"
+#include "tensors/memory_piece.h"
#include <algorithm>
diff --git a/src/tensors/tensor_operators.h b/src/tensors/tensor_operators.h
index 164fd12b..1eccaba3 100644
--- a/src/tensors/tensor_operators.h
+++ b/src/tensors/tensor_operators.h
@@ -1,23 +1,23 @@
#pragma once
#include "common/definitions.h"
-#include "tensors/tensor.h"
#include "tensors/allocator.h"
+#include "tensors/tensor.h"
#include "tensors/dispatch.h"
#include "functional/shape.h"
-#include "functional/tmp.h"
#include "functional/tensor.h"
+#include "functional/tmp.h"
#ifdef CUDA_FOUND
-#include "tensors/gpu/element.h"
#include "tensors/gpu/add.h"
+#include "tensors/gpu/element.h"
#include "tensors/gpu/prod.h"
#endif
-#include "tensors/cpu/element.h"
#include "tensors/cpu/add.h"
+#include "tensors/cpu/element.h"
namespace marian {
diff --git a/src/training/graph_group_async.cpp b/src/training/graph_group_async.cpp
index ee3b7d34..768bafdc 100644
--- a/src/training/graph_group_async.cpp
+++ b/src/training/graph_group_async.cpp
@@ -1,6 +1,6 @@
#include "training/graph_group_async.h"
-#include "tensors/tensor_operators.h"
#include "functional/functional.h"
+#include "tensors/tensor_operators.h"
namespace marian {
diff --git a/src/training/graph_group_multinode.cpp b/src/training/graph_group_multinode.cpp
index a09db862..9e4d7923 100644
--- a/src/training/graph_group_multinode.cpp
+++ b/src/training/graph_group_multinode.cpp
@@ -1,6 +1,6 @@
#include "training/graph_group_multinode.h"
-#include "tensors/tensor_operators.h"
#include "functional/functional.h"
+#include "tensors/tensor_operators.h"
namespace marian {
diff --git a/src/training/graph_group_singleton.cpp b/src/training/graph_group_singleton.cpp
index 528fff8f..4093e6c8 100644
--- a/src/training/graph_group_singleton.cpp
+++ b/src/training/graph_group_singleton.cpp
@@ -1,6 +1,6 @@
#include "training/graph_group_singleton.h"
-#include "tensors/tensor_operators.h"
#include "functional/functional.h"
+#include "tensors/tensor_operators.h"
namespace marian {
diff --git a/src/training/sparse_tensor.cu b/src/training/sparse_tensor.cu
index 78da9668..629b55f4 100644
--- a/src/training/sparse_tensor.cu
+++ b/src/training/sparse_tensor.cu
@@ -4,12 +4,11 @@
#include <thrust/sort.h>
#include <memory>
+#include "tensors/gpu/cuda_helpers.h"
#include "tensors/tensor.h"
#include "tensors/tensor_operators.h"
#include "training/sparse_tensor.h"
-#include "tensors/gpu/cuda_helpers.h"
-
namespace marian {
// TODO: create actual sparse tensor class. This one is just minimal