ONE - On-device Neural Engine
Loading...
Searching...
No Matches
Domain.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 __NEST_DOMAIN_H__
18#define __NEST_DOMAIN_H__
19
20#include "nest/Closure.h"
21
22namespace nest
23{
24
25class Domain
26{
27public:
28 Domain() = default;
29
30public:
31 Domain(const DomainID &id) : _id{id}
32 {
33 // DO NOTHING
34 }
35
36public:
37 Domain(const Domain &) = default;
38
39public:
40 template <typename... Args> Closure operator()(Args &&...indices)
41 {
42 return Closure{_id, std::forward<Args>(indices)...};
43 }
44
45public:
46 const DomainID &id(void) const { return _id; }
47
48private:
49 DomainID const _id;
50};
51
52} // namespace nest
53
54#endif // __NEST_DOMAIN_H__
Domain(const Domain &)=default
Domain(const DomainID &id)
Definition Domain.h:31
Domain()=default
const DomainID & id(void) const
Definition Domain.h:46
Closure operator()(Args &&...indices)
Definition Domain.h:40
Definition Block.h:27