Legion Runtime
Loading...
Searching...
No Matches
predicate.h
1/* Copyright 2026 Stanford University, NVIDIA Corporation
2 *
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16#ifndef __LEGION_PREDICATE_H__
17#define __LEGION_PREDICATE_H__
18
19#include "legion/api/types.h"
20
21namespace Legion {
22
33 class Predicate : public Unserializable {
34 public:
35 static const Predicate TRUE_PRED;
36 static const Predicate FALSE_PRED;
37 public:
38 Predicate(void);
39 Predicate(const Predicate& p);
40 Predicate(Predicate&& p) noexcept;
41 explicit Predicate(bool value);
42 ~Predicate(void);
43 protected:
44 FRIEND_ALL_RUNTIME_CLASSES
45 Internal::PredicateImpl* impl;
46 // Only the runtime should be allowed to make these
47 explicit Predicate(Internal::PredicateImpl* impl);
48 public:
49 Predicate& operator=(const Predicate& p);
50 Predicate& operator=(Predicate&& p) noexcept;
51 inline bool operator==(const Predicate& p) const;
52 inline bool operator<(const Predicate& p) const;
53 inline bool operator!=(const Predicate& p) const;
54 inline bool exists(void) const { return (impl != nullptr); }
55 private:
56 bool const_value;
57 };
58
59} // namespace Legion
60
61#include "legion/api/predicate.inl"
62
63#endif // __LEGION_PREDICATE_H__
Definition predicate.h:33
Definition types.h:334