Skip to content

Commit

Permalink
Format files
Browse files Browse the repository at this point in the history
Co-authored-by: Marcel Koch <marcel.koch@kit.edu>
  • Loading branch information
ginkgo-bot and MarcelKoch committed May 23, 2022
1 parent cbc20c1 commit 5a3e79a
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 35 deletions.
31 changes: 15 additions & 16 deletions core/distributed/matrix_kernels.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,22 +48,21 @@ namespace gko {
namespace kernels {


#define GKO_DECLARE_BUILD_DIAG_OFFDIAG(ValueType, LocalIndexType, \
GlobalIndexType) \
void build_diag_offdiag( \
std::shared_ptr<const DefaultExecutor> exec, \
const device_matrix_data<ValueType, GlobalIndexType>& input, \
const distributed::Partition<LocalIndexType, GlobalIndexType>* \
row_partition, \
const distributed::Partition<LocalIndexType, GlobalIndexType>* \
col_partition, \
comm_index_type local_part, array<LocalIndexType>& diag_row_idxs, \
array<LocalIndexType>& diag_col_idxs, array<ValueType>& diag_values, \
array<LocalIndexType>& offdiag_row_idxs, \
array<LocalIndexType>& offdiag_col_idxs, \
array<ValueType>& offdiag_values, \
array<LocalIndexType>& local_gather_idxs, \
comm_index_type* recv_sizes, \
#define GKO_DECLARE_BUILD_DIAG_OFFDIAG(ValueType, LocalIndexType, \
GlobalIndexType) \
void build_diag_offdiag( \
std::shared_ptr<const DefaultExecutor> exec, \
const device_matrix_data<ValueType, GlobalIndexType>& input, \
const distributed::Partition<LocalIndexType, GlobalIndexType>* \
row_partition, \
const distributed::Partition<LocalIndexType, GlobalIndexType>* \
col_partition, \
comm_index_type local_part, array<LocalIndexType>& diag_row_idxs, \
array<LocalIndexType>& diag_col_idxs, array<ValueType>& diag_values, \
array<LocalIndexType>& offdiag_row_idxs, \
array<LocalIndexType>& offdiag_col_idxs, \
array<ValueType>& offdiag_values, \
array<LocalIndexType>& local_gather_idxs, comm_index_type* recv_sizes, \
array<GlobalIndexType>& local_to_global_ghost)


Expand Down
6 changes: 3 additions & 3 deletions cuda/distributed/matrix_kernels.cu
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "core/distributed/matrix_kernels.hpp"


#include <ginkgo/core/base/exception_helpers.hpp>


#include <thrust/binary_search.h>
#include <thrust/copy.h>
#include <thrust/distance.h>
Expand All @@ -49,6 +46,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <thrust/unique.h>


#include <ginkgo/core/base/exception_helpers.hpp>


#include "cuda/components/atomic.cuh"


Expand Down
6 changes: 3 additions & 3 deletions dpcpp/distributed/matrix_kernels.dp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "core/distributed/matrix_kernels.hpp"


#include <ginkgo/core/base/exception_helpers.hpp>


#include <oneapi/dpl/algorithm>
#include <oneapi/dpl/execution>
#include <oneapi/dpl/iterator>


#include <ginkgo/core/base/exception_helpers.hpp>


#include "dpcpp/components/atomic.dp.hpp"


Expand Down
6 changes: 3 additions & 3 deletions hip/distributed/matrix_kernels.hip.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "core/distributed/matrix_kernels.hpp"


#include <ginkgo/core/base/exception_helpers.hpp>


#include <thrust/binary_search.h>
#include <thrust/copy.h>
#include <thrust/distance.h>
Expand All @@ -49,6 +46,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <thrust/unique.h>


#include <ginkgo/core/base/exception_helpers.hpp>


#include "hip/components/atomic.hip.hpp"


Expand Down
21 changes: 11 additions & 10 deletions test/distributed/matrix_kernels.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
******************************<GINKGO LICENSE>*******************************/

#include "core/distributed/matrix_kernels.hpp"


#include <algorithm>
#include <memory>

Expand All @@ -44,7 +47,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <ginkgo/core/matrix/csr.hpp>


#include "core/distributed/matrix_kernels.hpp"
#include "core/test/utils.hpp"
#include "test/utils/executor.hpp"

Expand All @@ -69,9 +71,7 @@ class Matrix : public ::testing::Test {
ValueLocalGlobalIndexType())>::type;
using Mtx = gko::matrix::Csr<value_type, local_index_type>;

Matrix()
: engine(42)
{}
Matrix() : engine(42) {}

void SetUp()
{
Expand Down Expand Up @@ -129,12 +129,13 @@ class Matrix : public ::testing::Test {
diag_col_idxs, diag_values, offdiag_row_idxs, offdiag_col_idxs,
offdiag_values, gather_idxs, recv_sizes.get_data(),
local_to_global_col);
gko::kernels::EXEC_NAMESPACE::distributed_matrix::build_diag_offdiag(
exec, d_input, d_row_partition, d_col_partition, part,
d_diag_row_idxs, d_diag_col_idxs, d_diag_values,
d_offdiag_row_idxs, d_offdiag_col_idxs, d_offdiag_values,
d_gather_idxs, d_recv_sizes.get_data(),
d_local_to_global_col);
gko::kernels::EXEC_NAMESPACE::distributed_matrix::
build_diag_offdiag(
exec, d_input, d_row_partition, d_col_partition, part,
d_diag_row_idxs, d_diag_col_idxs, d_diag_values,
d_offdiag_row_idxs, d_offdiag_col_idxs, d_offdiag_values,
d_gather_idxs, d_recv_sizes.get_data(),
d_local_to_global_col);

assert_device_matrix_data_equal(diag_row_idxs, diag_col_idxs,
diag_values, d_diag_row_idxs,
Expand Down

0 comments on commit 5a3e79a

Please sign in to comment.