41e52979e3ca87e9f1cb26e7b899e28246491f7d
[platform/upstream/dldt.git] / inference-engine / thirdparty / clDNN / kernel_selector / core / actual_kernels / activation / activation_kernel_tutorial.h
1 // Copyright (c) 2016 Intel Corporation
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 //      http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14
15
16 #pragma once
17
18 #include "activation_kernel_base.h"
19
20 // Step 0:
21 //
22 // 1. choose a tutorial mode
23 // 2. modify activation_tutorial.cl as well
24
25 #define ADVANCED_TUTORIAL  // simple runnable example with explanations
26
27 namespace kernel_selector {
28
29 class ActivationKernel_Tutorial : public ActivationKernelBase {
30 public:
31     using Parent = ActivationKernelBase;
32     ActivationKernel_Tutorial() : Parent("activation_tutorial") {}
33     virtual ~ActivationKernel_Tutorial() {}
34
35     KernelsData GetKernelsData(const Params& params, const optional_params& options) const override;
36     ParamsKey GetSupportedKey() const override;
37
38 protected:
39 #ifdef ADVANCED_TUTORIAL
40     DispatchData SetDefault(const activation_params& arg) const override;
41     bool Validate(const Params& p, const optional_params& o) const override;
42     JitConstants GetJitConstants(const activation_params& params, DispatchData) const override;
43 #endif
44 };
45 }  // namespace kernel_selector