ONE - On-device Neural Engine
Loading...
Searching...
No Matches
Session.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2018 Samsung Electronics Co., Ltd. All Rights Reserved
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#ifndef __ENCO_SESSION_H__
18#define __ENCO_SESSION_H__
19
20#include "Code.h"
21
22namespace enco
23{
24
25// TODO Rewrite this definition
26using SessionID = uint32_t;
27
29
32
34coco::Data *data(const SessionID &);
35
36static inline coco::Module *module(const coco::Data *d) { return module(session(d)); }
37static inline coco::Data *data(const coco::Module *m) { return data(session(m)); }
38
39// WARN This API is introduced just for backward compatibility
40// Do NOT use this anymore as it will be removed
41Code *code(const SessionID &);
42
43} // namespace enco
44
45#endif // __ENCO_SESSION_H__
Top-level element of coco IR which represents a neural network.
Definition Module.h:34
Definition Bundle.h:26
coco::Data * data(const SessionID &sess)
Definition Session.cpp:52
Code * code(const SessionID &sess)
Definition Session.cpp:54
uint32_t SessionID
Definition Session.h:26
SessionID session(const coco::Module *m)
Definition Session.cpp:48
coco::Module * module(const SessionID &sess)
Definition Session.cpp:51
SessionID make_session(coco::Module *m, coco::Data *d)
Definition Session.cpp:36
Core coco entity for constant weights.
Definition Data.h:31