//===- MapRef.h - A dim2lvl/lvl2dim map encoding ----------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // // A dim2lvl/lvl2dim map encoding class, with utility methods. // //===----------------------------------------------------------------------===// #ifndef MLIR_EXECUTIONENGINE_SPARSETENSOR_MAPREF_H #define MLIR_EXECUTIONENGINE_SPARSETENSOR_MAPREF_H #include <cinttypes> #include <cassert> #include <vector> namespace mlir { namespace sparse_tensor { /// A class for capturing the sparse tensor type map with a compact encoding. /// /// Currently, the following situations are supported: /// (1) map is a permutation /// (2) map has affine ops (restricted set) /// /// The pushforward/backward operations are fast for (1) but incur some obvious /// overhead for situation (2). /// class MapRef final { … }; } // namespace sparse_tensor } // namespace mlir #endif // MLIR_EXECUTIONENGINE_SPARSETENSOR_MAPREF_H