3#ifndef LALA_CORE_TYPES_HPP
4#define LALA_CORE_TYPES_HPP
6#include "battery/utility.hpp"
7#include "battery/vector.hpp"
8#include "battery/string.hpp"
9#include "battery/tuple.hpp"
10#include "battery/variant.hpp"
11#include "battery/unique_ptr.hpp"
25template <
class Allocator>
38 battery::unique_ptr<this_type, allocator_type>
sub;
50 template<
class Alloc2>
55 this_type s = this_type(*other.sub, alloc);
56 sub = battery::allocate_unique<this_type>(alloc, std::move(s));
73 case Bool: printf(
"B");
break;
74 case Int: printf(
"Z");
break;
75 case Real: printf(
"R");
break;
76 case Set: printf(
"S(");
sub->print(); printf(
")");
break;
77 default: assert(
false);
84 if(u <= U::eq_zero()) {
97template <
class Alloc1,
class Alloc2>
99 if(
static_cast<int>(lhs.
tag) ==
static_cast<int>(rhs.
tag)) {
101 return *(lhs.
sub) == *(rhs.
sub);
127using logic_set = battery::vector<battery::tuple<F, F>,
typename F::allocator_type>;
Definition abstract_deps.hpp:14
battery::vector< battery::tuple< F, F >, typename F::allocator_type > logic_set
Definition sort.hpp:127
int AType
Definition sort.hpp:18
CUDA constexpr bool operator==(const CartesianProduct< As... > &a, const CartesianProduct< Bs... > &b)
Definition cartesian_product.hpp:503
battery::tuple< double, double > logic_real
Definition sort.hpp:119
long long int logic_int
Definition sort.hpp:114
bool logic_bool
Definition sort.hpp:109
Tag
Definition sort.hpp:27
@ Bool
Definition sort.hpp:28
@ Int
Definition sort.hpp:29
@ Set
Definition sort.hpp:31
@ Real
Definition sort.hpp:30
CUDA NI Sort(const Sort< Alloc2 > &other, const allocator_type &alloc=allocator_type())
Definition sort.hpp:51
CUDA bool is_real() const
Definition sort.hpp:68
CUDA bool is_bool() const
Definition sort.hpp:66
battery::unique_ptr< this_type, allocator_type > sub
Definition sort.hpp:38
CUDA NI Sort(Tag tag, Sort &&sub_ty, const allocator_type &alloc=allocator_type())
Definition sort.hpp:44
CUDA bool is_int() const
Definition sort.hpp:67
CUDA NI void print_value(const U &u) const
Definition sort.hpp:82
Tag tag
Definition sort.hpp:37
CUDA NI void print() const
Definition sort.hpp:71
CUDA bool is_set() const
Definition sort.hpp:69
CUDA Sort(Tag tag)
Definition sort.hpp:40
Sort & operator=(Sort &&)=default
Allocator allocator_type
Definition sort.hpp:34
CUDA Sort(const this_type &other)
Definition sort.hpp:60
Sort & operator=(const this_type &other)=default