2
************************************************************************************************************************
4
* Copyright (C) 2007-2022 Advanced Micro Devices, Inc. All rights reserved.
6
* Permission is hereby granted, free of charge, to any person obtaining a
7
* copy of this software and associated documentation files (the "Software"),
8
* to deal in the Software without restriction, including without limitation
9
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
10
* and/or sell copies of the Software, and to permit persons to whom the
11
* Software is furnished to do so, subject to the following conditions:
13
* The above copyright notice and this permission notice shall be included in
14
* all copies or substantial portions of the Software.
16
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19
* THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
20
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
21
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22
* OTHER DEALINGS IN THE SOFTWARE
24
***********************************************************************************************************************/
26
// Class used to define a coordinate bit
35
#if defined(__cplusplus)
38
#define ADDR_CPP11_COMPILER TRUE
41
#if __cplusplus >= 201103L
42
#define ADDR_CPP11_COMPILER TRUE
47
#if defined(ADDR_CPP11_COMPILER)
65
Coordinate(enum Dim dim, INT_32 n);
67
VOID set(enum Dim dim, INT_32 n);
68
UINT_32 ison(const UINT_32 *coords) const;
72
BOOL_32 operator==(const Coordinate& b);
73
BOOL_32 operator<(const Coordinate& b);
74
BOOL_32 operator>(const Coordinate& b);
75
BOOL_32 operator<=(const Coordinate& b);
76
BOOL_32 operator>=(const Coordinate& b);
77
BOOL_32 operator!=(const Coordinate& b);
78
Coordinate& operator++(INT_32);
90
VOID add(Coordinate& co);
91
VOID add(CoordTerm& cl);
92
BOOL_32 remove(Coordinate& co);
93
BOOL_32 Exists(Coordinate& co);
94
VOID copyto(CoordTerm& cl);
96
UINT_32 getxor(const UINT_32 *coords) const;
98
VOID getsmallest(Coordinate& co);
99
UINT_32 Filter(INT_8 f, Coordinate& co, UINT_32 start = 0, enum Dim axis = NUM_DIMS);
100
Coordinate& operator[](UINT_32 i);
101
BOOL_32 operator==(const CoordTerm& b);
102
BOOL_32 operator!=(const CoordTerm& b);
103
BOOL_32 exceedRange(const UINT_32 *ranges);
106
static const UINT_32 MaxCoords = 8;
108
Coordinate m_coord[MaxCoords];
115
VOID remove(Coordinate& co);
116
BOOL_32 Exists(Coordinate& co);
117
VOID resize(UINT_32 n);
119
virtual UINT_64 solve(const UINT_32 *coords) const;
120
virtual VOID solveAddr(UINT_64 addr, UINT_32 sliceInM,
121
UINT_32 *coords) const;
123
VOID copy(CoordEq& o, UINT_32 start = 0, UINT_32 num = 0xFFFFFFFF);
124
VOID reverse(UINT_32 start = 0, UINT_32 num = 0xFFFFFFFF);
125
VOID xorin(CoordEq& x, UINT_32 start = 0);
126
UINT_32 Filter(INT_8 f, Coordinate& co, UINT_32 start = 0, enum Dim axis = NUM_DIMS);
127
VOID shift(INT_32 amount, INT_32 start = 0);
128
virtual CoordTerm& operator[](UINT_32 i);
129
VOID mort2d(Coordinate& c0, Coordinate& c1, UINT_32 start = 0, UINT_32 end = 0);
130
VOID mort3d(Coordinate& c0, Coordinate& c1, Coordinate& c2, UINT_32 start = 0, UINT_32 end = 0);
132
BOOL_32 operator==(const CoordEq& b);
133
BOOL_32 operator!=(const CoordEq& b);
136
static const UINT_32 MaxEqBits = 64;
139
CoordTerm m_eq[MaxEqBits];