updated readme file due to moving CMake scripts to the root folder
[platform/upstream/dldt.git] / inference-engine / thirdparty / mkl-dnn / src / cpu / jit_uni_batch_normalization_s8.hpp
1 /*******************************************************************************
2 * Copyright 2019 Intel Corporation
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 JIT_UNI_BATCH_NORMALIZATION_S8_HPP
18 #define JIT_UNI_BATCH_NORMALIZATION_S8_HPP
19
20 #include <assert.h>
21
22 #include "c_types_map.hpp"
23 #include "type_helpers.hpp"
24 #include "utils.hpp"
25
26 #include "cpu_batch_normalization_pd.hpp"
27 #include "cpu_isa_traits.hpp"
28 #include "cpu_primitive.hpp"
29
30 namespace mkldnn {
31 namespace impl {
32 namespace cpu {
33
34 namespace { template <cpu_isa_t isa> struct uni_bnorm_driver_t; }
35
36 template <cpu_isa_t isa>
37 struct jit_uni_batch_normalization_s8_fwd_t: public cpu_primitive_t {
38     struct pd_t: public cpu_batch_normalization_fwd_pd_t {
39         pd_t(engine_t *engine, const batch_normalization_desc_t *adesc,
40                 const primitive_attr_t *attr,
41                 const batch_normalization_fwd_pd_t *hint_fwd_pd)
42             : cpu_batch_normalization_fwd_pd_t(engine, adesc, attr, hint_fwd_pd)
43         {}
44
45         DECLARE_COMMON_PD_T(
46                 JIT_IMPL_NAME_HELPER("jit:", isa, ""),
47                 jit_uni_batch_normalization_s8_fwd_t<isa>);
48
49         virtual status_t init() override;
50     };
51
52     typedef int8_t data_t;
53
54     jit_uni_batch_normalization_s8_fwd_t(const pd_t *apd,
55             const input_vector &inputs, const output_vector &outputs);
56     ~jit_uni_batch_normalization_s8_fwd_t();
57
58     virtual void execute(event_t *e) const;
59
60 private:
61     const pd_t *pd() const { return (const pd_t *)primitive_t::pd(); }
62
63     uni_bnorm_driver_t<isa> *bnorm_driver_;
64 };
65
66 }
67 }
68 }
69
70 #endif
71
72 // vim: et ts=4 sw=4 cindent cino^=l0,\:0,N-s