Skip to content

Commit 43d8eea

Browse files
committed
Fix coding style
1 parent 99b1d1d commit 43d8eea

File tree

3 files changed

+28
-16
lines changed

3 files changed

+28
-16
lines changed

cpp/src/arrow/sparse_tensor-test.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,8 +225,7 @@ TEST(TestSparseCSRMatrix, CreationFromNumericTensor2D) {
225225
ASSERT_EQ(1, si.indptr()->ndim());
226226
ASSERT_EQ(1, si.indices()->ndim());
227227

228-
const int64_t* indptr_begin =
229-
reinterpret_cast<const int64_t*>(si.indptr()->raw_data());
228+
const int64_t* indptr_begin = reinterpret_cast<const int64_t*>(si.indptr()->raw_data());
230229
std::vector<int64_t> indptr_values(indptr_begin,
231230
indptr_begin + si.indptr()->shape()[0]);
232231

cpp/src/arrow/sparse_tensor.cc

Lines changed: 24 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -419,19 +419,30 @@ SparseTensor<SparseIndexType>::SparseTensor(const Tensor& tensor)
419419
// ----------------------------------------------------------------------
420420
// Instantiate templates
421421

422-
#define INSTANTIATE_SPARSE_TENSOR(IndexType) \
423-
template class ARROW_TEMPLATE_EXPORT SparseTensor<IndexType>; \
424-
template ARROW_EXPORT SparseTensor<IndexType>::SparseTensor(const NumericTensor<UInt8Type>&); \
425-
template ARROW_EXPORT SparseTensor<IndexType>::SparseTensor(const NumericTensor<UInt16Type>&); \
426-
template ARROW_EXPORT SparseTensor<IndexType>::SparseTensor(const NumericTensor<UInt32Type>&); \
427-
template ARROW_EXPORT SparseTensor<IndexType>::SparseTensor(const NumericTensor<UInt64Type>&); \
428-
template ARROW_EXPORT SparseTensor<IndexType>::SparseTensor(const NumericTensor<Int8Type>&); \
429-
template ARROW_EXPORT SparseTensor<IndexType>::SparseTensor(const NumericTensor<Int16Type>&); \
430-
template ARROW_EXPORT SparseTensor<IndexType>::SparseTensor(const NumericTensor<Int32Type>&); \
431-
template ARROW_EXPORT SparseTensor<IndexType>::SparseTensor(const NumericTensor<Int64Type>&); \
432-
template ARROW_EXPORT SparseTensor<IndexType>::SparseTensor(const NumericTensor<HalfFloatType>&); \
433-
template ARROW_EXPORT SparseTensor<IndexType>::SparseTensor(const NumericTensor<FloatType>&); \
434-
template ARROW_EXPORT SparseTensor<IndexType>::SparseTensor(const NumericTensor<DoubleType>&)
422+
#define INSTANTIATE_SPARSE_TENSOR(IndexType) \
423+
template class ARROW_TEMPLATE_EXPORT SparseTensor<IndexType>; \
424+
template ARROW_EXPORT SparseTensor<IndexType>::SparseTensor( \
425+
const NumericTensor<UInt8Type>&); \
426+
template ARROW_EXPORT SparseTensor<IndexType>::SparseTensor( \
427+
const NumericTensor<UInt16Type>&); \
428+
template ARROW_EXPORT SparseTensor<IndexType>::SparseTensor( \
429+
const NumericTensor<UInt32Type>&); \
430+
template ARROW_EXPORT SparseTensor<IndexType>::SparseTensor( \
431+
const NumericTensor<UInt64Type>&); \
432+
template ARROW_EXPORT SparseTensor<IndexType>::SparseTensor( \
433+
const NumericTensor<Int8Type>&); \
434+
template ARROW_EXPORT SparseTensor<IndexType>::SparseTensor( \
435+
const NumericTensor<Int16Type>&); \
436+
template ARROW_EXPORT SparseTensor<IndexType>::SparseTensor( \
437+
const NumericTensor<Int32Type>&); \
438+
template ARROW_EXPORT SparseTensor<IndexType>::SparseTensor( \
439+
const NumericTensor<Int64Type>&); \
440+
template ARROW_EXPORT SparseTensor<IndexType>::SparseTensor( \
441+
const NumericTensor<HalfFloatType>&); \
442+
template ARROW_EXPORT SparseTensor<IndexType>::SparseTensor( \
443+
const NumericTensor<FloatType>&); \
444+
template ARROW_EXPORT SparseTensor<IndexType>::SparseTensor( \
445+
const NumericTensor<DoubleType>&)
435446

436447
INSTANTIATE_SPARSE_TENSOR(SparseCOOIndex);
437448
INSTANTIATE_SPARSE_TENSOR(SparseCSRIndex);

cpp/src/arrow/sparse_tensor.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,9 @@ class ARROW_EXPORT SparseTensorBase {
112112
public:
113113
virtual ~SparseTensorBase() = default;
114114

115-
SparseTensorFormat::type sparse_tensor_format_id() const { return sparse_index_->format_id(); }
115+
SparseTensorFormat::type sparse_tensor_format_id() const {
116+
return sparse_index_->format_id();
117+
}
116118

117119
std::shared_ptr<DataType> type() const { return type_; }
118120
std::shared_ptr<Buffer> data() const { return data_; }

0 commit comments

Comments
 (0)