Skip to content

Commit 1f400bb

Browse files
committed
format: clang-format source files
1 parent e5b98d6 commit 1f400bb

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

examples/device/ta_dense_um_tensor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ void do_main_body(TiledArray::World& world, const long Nm, const long Bm,
100100

101101
using DeviceTile = TA::UMTensor<T>;
102102
using DeviceMatrix = TA::DistArray<TA::Tile<DeviceTile>>;
103-
using HostTensor = TA::Tensor<T>;
103+
using HostTensor = TA::Tensor<T>; // Should this be a PinnedTile ? Or is it okay because we call to_device on Tiles anyway?
104104
using HostMatrix = TA::DistArray<HostTensor>;
105105

106106
DeviceMatrix c(world, trange_c);

src/TiledArray/device/um_tensor.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,18 @@
2121

2222
#ifdef TILEDARRAY_HAS_DEVICE
2323

24-
#include <TiledArray/tensor/tensor.h>
2524
#include <TiledArray/device/um_tensor.h>
25+
#include <TiledArray/tensor/tensor.h>
2626

2727
namespace TiledArray {
2828

2929
// Explicit template instantiations for common types
3030
template class Tensor<double, device_um_allocator<double>>;
3131
template class Tensor<float, device_um_allocator<float>>;
32-
template class Tensor<std::complex<double>, device_um_allocator<std::complex<double>>>;
33-
template class Tensor<std::complex<float>, device_um_allocator<std::complex<float>>>;
32+
template class Tensor<std::complex<double>,
33+
device_um_allocator<std::complex<double>>>;
34+
template class Tensor<std::complex<float>,
35+
device_um_allocator<std::complex<float>>>;
3436
template class Tensor<int, device_um_allocator<int>>;
3537
template class Tensor<long, device_um_allocator<long>>;
3638

tests/tensor_um.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
*/
2222

2323
#include <TiledArray/tensor/tensor.h>
24+
2425
#include <TiledArray/device/um_tensor.h>
2526

2627
#include "global_fixture.h"
@@ -39,7 +40,7 @@ struct TensorUM_TA_Fixture {
3940
const range_type r;
4041

4142
TensorUM_TA_Fixture() : r(make_range(81)), t(r, 1) {
42-
rand_fill(18, t.size(), t.data());
43+
rand_fill(18, t.size(), t.data());
4344
}
4445

4546
~TensorUM_TA_Fixture() {}
@@ -77,7 +78,6 @@ struct TensorUM_TA_Fixture {
7778
// return tensor;
7879
// }
7980

80-
8181
// // make permutation definition object
8282
// static Permutation make_perm() {
8383
// std::array<unsigned int, GlobalFixture::dim> temp;
@@ -183,7 +183,7 @@ BOOST_AUTO_TEST_CASE(range_accessor) {
183183
BOOST_CHECK_EQUAL(t.range(), r); // check range accessof
184184
}
185185

186-
BOOST_AUTO_TEST_CASE(element_access) {
186+
BOOST_AUTO_TEST_CASE(element_access) {
187187
// check operator[] with array coordinate index and ordinal index
188188
for (std::size_t i = 0ul; i < t.size(); ++i) {
189189
BOOST_CHECK_LT(t[i], 42);

0 commit comments

Comments
 (0)