CIRCT
21.0.0git
Loading...
Searching...
No Matches
lib
Dialect
ESI
runtime
cpp
lib
Context.cpp
Go to the documentation of this file.
1
//===- Context.cpp --------------------------------------------------------===//
2
//
3
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
// See https://llvm.org/LICENSE.txt for license information.
5
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
//
7
//===----------------------------------------------------------------------===//
8
//
9
// DO NOT EDIT!
10
// This file is distributed as part of an ESI package. The source for this file
11
// should always be modified within CIRCT (lib/dialect/ESI/runtime/cpp/).
12
//
13
//===----------------------------------------------------------------------===//
14
15
#include "
esi/Context.h
"
16
#include "
esi/Accelerator.h
"
17
18
using namespace
esi
;
19
20
void
Context::registerType(
Type
*type) {
21
if
(types.count(type->
getID
()))
22
throw
std::runtime_error(
"Type already exists in context"
);
23
types.emplace(type->
getID
(), std::unique_ptr<Type>(type));
24
}
25
26
std::unique_ptr<AcceleratorConnection>
27
Context::connect(std::string backend, std::string connection) {
28
return
registry::connect
(*
this
, backend, connection);
29
}
Accelerator.h
Context.h
esi::Type
Root class of the ESI type system.
Definition
Types.h:27
esi::Type::getID
ID getID() const
Definition
Types.h:33
esi::registry::connect
std::unique_ptr< AcceleratorConnection > connect(Context &ctxt, const std::string &backend, const std::string &connection)
Definition
Accelerator.cpp:262
esi
Definition
esi.py:1
Generated on Sat Jul 12 2025 00:09:34 for CIRCT by
1.9.8