llvm/mlir/lib/ExecutionEngine/SparseTensor/Storage.cpp

//===- StorageBase.cpp - TACO-flavored sparse tensor representation -------===//
//
// 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
//
//===----------------------------------------------------------------------===//
//
// This file contains method definitions for `SparseTensorStorageBase`.
// In particular we want to ensure that the default implementations of
// the "partial method specialization" trick aren't inline (since there's
// no benefit).
//
//===----------------------------------------------------------------------===//

#include "mlir/ExecutionEngine/SparseTensor/Storage.h"

usingnamespacemlir::sparse_tensor;

static inline bool isAllDense(uint64_t lvlRank, const LevelType *lvlTypes) {}

SparseTensorStorageBase::SparseTensorStorageBase( // NOLINT
    uint64_t dimRank, const uint64_t *dimSizes, uint64_t lvlRank,
    const uint64_t *lvlSizes, const LevelType *lvlTypes,
    const uint64_t *dim2lvl, const uint64_t *lvl2dim)
    :{}

// Helper macro for wrong "partial method specialization" errors.
#define FATAL_PIV

#define IMPL_GETPOSITIONS
MLIR_SPARSETENSOR_FOREVERY_FIXED_O()
#undef IMPL_GETPOSITIONS

#define IMPL_GETCOORDINATES
MLIR_SPARSETENSOR_FOREVERY_FIXED_O()
#undef IMPL_GETCOORDINATES

#define IMPL_GETCOORDINATESBUFFER
MLIR_SPARSETENSOR_FOREVERY_FIXED_O()
#undef IMPL_GETCOORDINATESBUFFER

#define IMPL_GETVALUES
MLIR_SPARSETENSOR_FOREVERY_V()
#undef IMPL_GETVALUES

#define IMPL_LEXINSERT
MLIR_SPARSETENSOR_FOREVERY_V()
#undef IMPL_LEXINSERT

#define IMPL_EXPINSERT
MLIR_SPARSETENSOR_FOREVERY_V()
#undef IMPL_EXPINSERT

#undef FATAL_PIV