xref: /llvm-project/mlir/lib/Conversion/LLVMCommon/MemRefDescriptor.h (revision b5d847b1b95750d0af40cfc8c71a8fec50bb8613)
1*b5d847b1SAlex Zinenko //===- MemRefDescriptor.h - MemRef descriptor constants ---------*- C++ -*-===//
2*b5d847b1SAlex Zinenko //
3*b5d847b1SAlex Zinenko // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4*b5d847b1SAlex Zinenko // See https://llvm.org/LICENSE.txt for license information.
5*b5d847b1SAlex Zinenko // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6*b5d847b1SAlex Zinenko //
7*b5d847b1SAlex Zinenko //===----------------------------------------------------------------------===//
8*b5d847b1SAlex Zinenko //
9*b5d847b1SAlex Zinenko // Defines constants that are used in LLVM dialect equivalents of MemRef type.
10*b5d847b1SAlex Zinenko //
11*b5d847b1SAlex Zinenko //===----------------------------------------------------------------------===//
12*b5d847b1SAlex Zinenko 
13*b5d847b1SAlex Zinenko #ifndef MLIR_LIB_CONVERSION_LLVMCOMMON_MEMREFDESCRIPTOR_H
14*b5d847b1SAlex Zinenko #define MLIR_LIB_CONVERSION_LLVMCOMMON_MEMREFDESCRIPTOR_H
15*b5d847b1SAlex Zinenko 
16*b5d847b1SAlex Zinenko static constexpr unsigned kAllocatedPtrPosInMemRefDescriptor = 0;
17*b5d847b1SAlex Zinenko static constexpr unsigned kAlignedPtrPosInMemRefDescriptor = 1;
18*b5d847b1SAlex Zinenko static constexpr unsigned kOffsetPosInMemRefDescriptor = 2;
19*b5d847b1SAlex Zinenko static constexpr unsigned kSizePosInMemRefDescriptor = 3;
20*b5d847b1SAlex Zinenko static constexpr unsigned kStridePosInMemRefDescriptor = 4;
21*b5d847b1SAlex Zinenko 
22*b5d847b1SAlex Zinenko static constexpr unsigned kRankInUnrankedMemRefDescriptor = 0;
23*b5d847b1SAlex Zinenko static constexpr unsigned kPtrInUnrankedMemRefDescriptor = 1;
24*b5d847b1SAlex Zinenko 
25*b5d847b1SAlex Zinenko #endif // MLIR_LIB_CONVERSION_LLVMCOMMON_MEMREFDESCRIPTOR_H
26