[mlir][sparse] refactoring SparseTensorUtils: (2 of 4) reordering
authorwren romano <2998727+wrengr@users.noreply.github.com>
Thu, 29 Sep 2022 18:55:51 +0000 (11:55 -0700)
committerwren romano <2998727+wrengr@users.noreply.github.com>
Thu, 29 Sep 2022 21:42:07 +0000 (14:42 -0700)
commit4c9ee145c03cd87ad2f838d19919c254907172ed
tree3faf97d32d82e07e0d169c5afb7488f91c28c219
parent0fca5c5f45c3c290eba5f791ff14596f17162195
[mlir][sparse] refactoring SparseTensorUtils: (2 of 4) reordering

Previously, the SparseTensorUtils.cpp library contained a C++ core implementation, but hid it in an anonymous namespace and only exposed a C-API for accessing it. Now we are factoring out that C++ core into a standalone C++ library so that it can be used directly by downstream clients (per request of one such client). This refactoring has been decomposed into a stack of differentials in order to simplify the code review process, however the full stack of changes should be considered together.

* D133462: Part 1: split one file into several
* (this): Part 2: Reorder chunks within files
* D133831: Part 3: General code cleanup
* D133833: Part 4: Update documentation

This part moves chunks of code within files, but again aims to make no other changes. Many of these movements are part of a stylistic shift to reorder the components of class definitions as follows: data members, ctors/factories, getters, other public methods, private methods.

Depends On D133462

Reviewed By: aartbik

Differential Revision: https://reviews.llvm.org/D133830
mlir/include/mlir/ExecutionEngine/SparseTensor/COO.h
mlir/include/mlir/ExecutionEngine/SparseTensor/Storage.h
mlir/lib/ExecutionEngine/SparseTensorUtils.cpp