2 * Copyright © 2017 Advanced Micro Devices, Inc.
5 * Permission is hereby granted, free of charge, to any person obtaining
6 * a copy of this software and associated documentation files (the
7 * "Software"), to deal in the Software without restriction, including
8 * without limitation the rights to use, copy, modify, merge, publish,
9 * distribute, sub license, and/or sell copies of the Software, and to
10 * permit persons to whom the Software is furnished to do so, subject to
11 * the following conditions:
13 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
14 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
15 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
16 * NON-INFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS, AUTHORS
17 * AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
20 * USE OR OTHER DEALINGS IN THE SOFTWARE.
22 * The above copyright notice and this permission notice (including the
23 * next paragraph) shall be included in all copies or substantial portions
27 // Class used to define a coordinate bit
36 Coordinate(INT_8 c
, UINT_32 n
);
38 VOID
set(INT_8 c
, UINT_32 n
);
39 UINT_32
ison(UINT_32 x
, UINT_32 y
, UINT_32 z
= 0, UINT_32 s
= 0, UINT_32 m
= 0);
43 BOOL_32
operator==(const Coordinate
& b
);
44 BOOL_32
operator<(const Coordinate
& b
);
45 BOOL_32
operator>(const Coordinate
& b
);
46 BOOL_32
operator<=(const Coordinate
& b
);
47 BOOL_32
operator>=(const Coordinate
& b
);
48 BOOL_32
operator!=(const Coordinate
& b
);
49 Coordinate
& operator++(INT_32
);
61 VOID
add(Coordinate
& co
);
62 VOID
add(CoordTerm
& cl
);
63 BOOL_32
remove(Coordinate
& co
);
64 BOOL_32
Exists(Coordinate
& co
);
65 VOID
copyto(CoordTerm
& cl
);
67 UINT_32
getxor(UINT_32 x
, UINT_32 y
, UINT_32 z
= 0, UINT_32 s
= 0, UINT_32 m
= 0);
69 VOID
getsmallest(Coordinate
& co
);
70 UINT_32
Filter(INT_8 f
, Coordinate
& co
, UINT_32 start
= 0, INT_8 axis
= '\0');
71 Coordinate
& operator[](UINT_32 i
);
72 BOOL_32
operator==(const CoordTerm
& b
);
73 BOOL_32
operator!=(const CoordTerm
& b
);
74 BOOL_32
exceedRange(UINT_32 xRange
, UINT_32 yRange
= 0, UINT_32 zRange
= 0, UINT_32 sRange
= 0);
77 static const UINT_32 MaxCoords
= 8;
79 Coordinate m_coord
[MaxCoords
];
86 VOID
remove(Coordinate
& co
);
87 BOOL_32
Exists(Coordinate
& co
);
88 VOID
resize(UINT_32 n
);
90 virtual UINT_64
solve(UINT_32 x
, UINT_32 y
, UINT_32 z
= 0, UINT_32 s
= 0, UINT_32 m
= 0);
91 virtual VOID
solveAddr(UINT_64 addr
, UINT_32 sliceInM
,
92 UINT_32
& x
, UINT_32
& y
, UINT_32
& z
, UINT_32
& s
, UINT_32
& m
);
94 VOID
copy(CoordEq
& o
, UINT_32 start
= 0, UINT_32 num
= 0xFFFFFFFF);
95 VOID
reverse(UINT_32 start
= 0, UINT_32 num
= 0xFFFFFFFF);
96 VOID
xorin(CoordEq
& x
, UINT_32 start
= 0);
97 UINT_32
Filter(INT_8 f
, Coordinate
& co
, UINT_32 start
= 0, INT_8 axis
= '\0');
98 VOID
shift(INT_32 amount
, INT_32 start
= 0);
99 virtual CoordTerm
& operator[](UINT_32 i
);
100 VOID
mort2d(Coordinate
& c0
, Coordinate
& c1
, UINT_32 start
= 0, UINT_32 end
= 0);
101 VOID
mort3d(Coordinate
& c0
, Coordinate
& c1
, Coordinate
& c2
, UINT_32 start
= 0, UINT_32 end
= 0);
103 BOOL_32
operator==(const CoordEq
& b
);
104 BOOL_32
operator!=(const CoordEq
& b
);
107 static const UINT_32 MaxEqBits
= 64;
110 CoordTerm m_eq
[MaxEqBits
];