souffle
2.0.2-371-g6315b36
interpreter
BTreeIndex.cpp
Go to the documentation of this file.
1
/*
2
* Souffle - A Datalog Compiler
3
* Copyright (c) 2019, The Souffle Developers. All rights reserved.
4
* Licensed under the Universal Permissive License v 1.0 as shown at:
5
* - https://opensource.org/licenses/UPL
6
* - <souffle root>/licenses/SOUFFLE-UPL.txt
7
*/
8
9
/************************************************************************
10
*
11
* @file BTreeIndex.cpp
12
*
13
* Interpreter index with generic interface.
14
*
15
***********************************************************************/
16
17
#include "
interpreter/Relation.h
"
18
#include "
ram/Relation.h
"
19
#include "
ram/analysis/Index.h
"
20
#include "
souffle/utility/MiscUtil.h
"
21
22
namespace
souffle::interpreter
{
23
24
#define CREATE_BTREE_REL(Structure, Arity, ...) \
25
case (Arity): { \
26
return mk<Relation<Arity, interpreter::Btree>>(id.getAuxiliaryArity(), id.getName(), orderSet); \
27
}
28
29
Own<RelationWrapper>
createBTreeRelation
(
30
const
ram::Relation&
id
,
const
ram::analysis::MinIndexSelection& orderSet) {
31
switch
(
id
.getArity()) {
32
FOR_EACH_BTREE
(
CREATE_BTREE_REL
);
33
34
default
:
fatal
(
"Requested arity not yet supported. Feel free to add it."
);
35
}
36
}
37
38
}
// namespace souffle::interpreter
Index.h
Relation.h
CREATE_BTREE_REL
#define CREATE_BTREE_REL(Structure, Arity,...)
Definition:
BTreeIndex.cpp:30
souffle::interpreter::createBTreeRelation
Own< RelationWrapper > createBTreeRelation(const ram::Relation &id, const ram::analysis::MinIndexSelection &orderSet)
Definition:
BTreeIndex.cpp:35
MiscUtil.h
souffle::interpreter
Definition:
BrieIndex.cpp:22
Relation.h
FOR_EACH_BTREE
#define FOR_EACH_BTREE(func,...)
Definition:
Util.h:66
souffle::fatal
void fatal(const char *format, const Args &... args)
Definition:
MiscUtil.h:198
Generated by
1.8.17