|
| using | universe_type = typename Universe::local_type |
| |
| using | LIStore = VStore< universe_type, BasicAllocator > |
| |
| using | IStore = VStore< Universe, StoreAllocator > |
| |
| using | IProp = PIR< IStore, PropAllocator > |
| |
| using | ISimplifier = Simplifier< IProp, BasicAllocator > |
| |
| using | Split = SplitStrategy< IProp, BasicAllocator > |
| |
| using | IST = SearchTree< IProp, Split, BasicAllocator > |
| |
| using | IBAB = BAB< IST, LIStore > |
| |
| using | basic_allocator_type = BasicAllocator |
| |
| using | prop_allocator_type = PropAllocator |
| |
| using | store_allocator_type = StoreAllocator |
| |
| using | this_type = AbstractDomains< Universe, BasicAllocator, PropAllocator, StoreAllocator > |
| |
| using | F = TFormula< basic_allocator_type > |
| |
| using | FormulaPtr = battery::shared_ptr< TFormula< basic_allocator_type >, basic_allocator_type > |
| |
|
| template<class U2 , class BasicAlloc2 , class PropAllocator2 , class StoreAllocator2 > |
| CUDA | AbstractDomains (const tag_gpu_block_copy &, bool enable_sharing, const AbstractDomains< U2, BasicAlloc2, PropAllocator2, StoreAllocator2 > &other, const BasicAllocator &basic_allocator=BasicAllocator(), const PropAllocator &prop_allocator=PropAllocator(), const StoreAllocator &store_allocator=StoreAllocator()) |
| |
| template<class U2 , class BasicAlloc2 , class PropAllocator2 , class StoreAllocator2 > |
| CUDA | AbstractDomains (const AbstractDomains< U2, BasicAlloc2, PropAllocator2, StoreAllocator2 > &other, const BasicAllocator &basic_allocator=BasicAllocator(), const PropAllocator &prop_allocator=PropAllocator(), const StoreAllocator &store_allocator=StoreAllocator(), const tag_copy_cons &tag=tag_copy_cons{}) |
| |
| CUDA | AbstractDomains (const this_type &other, const BasicAllocator &basic_allocator=BasicAllocator(), const PropAllocator &prop_allocator=PropAllocator(), const StoreAllocator &store_allocator=StoreAllocator()) |
| |
| template<class Alloc > |
| CUDA | AbstractDomains (const Configuration< Alloc > &config, const BasicAllocator &basic_allocator=BasicAllocator(), const PropAllocator &prop_allocator=PropAllocator(), const StoreAllocator &store_allocator=StoreAllocator()) |
| |
| | AbstractDomains (AbstractDomains &&other)=default |
| |
| CUDA void | allocate (int num_vars, bool with_simplifier) |
| |
| CUDA void | deallocate () |
| |
| template<class F > |
| CUDA bool | interpret (const F &f) |
| |
| FormulaPtr | parse_cn () |
| |
| template<class F > |
| void | initialize_simplifier (const F &f) |
| |
| void | preprocess_ipc (F &f) |
| |
| void | add_minimize_objective_var (F &f, const F::Existential &max_var) |
| |
| void | preprocess_tcn (F &f) |
| |
| const char * | name_of_abstract_domain () const |
| |
| const char * | name_of_entailed_removal () const |
| |
| void | preprocess () |
| |
| CUDA bool | on_node () |
| |
| CUDA bool | is_printing_intermediate_sol () |
| |
| CUDA void | print_solution () |
| |
| template<class BestStore > |
| CUDA void | print_solution (const BestStore &best_store) |
| |
| CUDA void | prune () |
| |
| CUDA bool | update_solution_stats () |
| |
| CUDA bool | on_solution_node () |
| |
| CUDA void | on_failed_node () |
| |
| CUDA void | print_final_solution () |
| |
| CUDA void | print_mzn_statistics () |
| |
| template<class U2 , class BasicAlloc2 , class PropAlloc2 , class StoreAlloc2 > |
| CUDA void | meet (AbstractDomains< U2, BasicAlloc2, PropAlloc2, StoreAlloc2 > &other) |
| |
template<class Universe, class BasicAllocator, class PropAllocator, class StoreAllocator>
struct AbstractDomains< Universe, BasicAllocator, PropAllocator, StoreAllocator >
This class is parametrized by a universe of discourse, which is the domain of the variables in the store and various allocators:
- BasicAllocator: default allocator, used to allocate abstract domains, the environment, storing intermediate results, etc.
- PropAllocator: allocator used for the PC abstract domain, to allocate the propagators.
- StoreAllocator: allocator used for the store, to allocate the variables.
Normally, you should use the fastest memory for the store, then for the propagators and then for the rest.
template<class Universe , class BasicAllocator , class PropAllocator , class StoreAllocator >
template<class U2 , class BasicAlloc2 , class PropAllocator2 , class StoreAllocator2 >
| CUDA AbstractDomains< Universe, BasicAllocator, PropAllocator, StoreAllocator >::AbstractDomains |
( |
const tag_gpu_block_copy & |
, |
|
|
bool |
enable_sharing, |
|
|
const AbstractDomains< U2, BasicAlloc2, PropAllocator2, StoreAllocator2 > & |
other, |
|
|
const BasicAllocator & |
basic_allocator = BasicAllocator(), |
|
|
const PropAllocator & |
prop_allocator = PropAllocator(), |
|
|
const StoreAllocator & |
store_allocator = StoreAllocator() |
|
) |
| |
|
inline |
We copy other in a new element, and ignore every variable not used in a GPU block. This is because copying everything in each block is very slow.
NOTE: It is not the allocation itself that is slow, I think it calling many copy constructors for atomic variables (note that in simplifier we have an atomic memory if the underlying domain has one).
template<class Universe , class BasicAllocator , class PropAllocator , class StoreAllocator >
template<class U2 , class BasicAlloc2 , class PropAlloc2 , class StoreAlloc2 >
| CUDA void AbstractDomains< Universe, BasicAllocator, PropAllocator, StoreAllocator >::meet |
( |
AbstractDomains< U2, BasicAlloc2, PropAlloc2, StoreAlloc2 > & |
other | ) |
|
|
inline |
Extract in this the content of other.