• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2016 The Gemmlowp Authors. All rights reserved.
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"""Generates the arm32 headers used by the gemm/gemv lib."""
15
16import cc_emitter
17import common
18import neon_emitter_64
19import transform_kernels_common
20
21
22def Main():
23  """."""
24  cc = cc_emitter.CCEmitter()
25  common.GenerateHeader(cc, 'gemmlowp_meta_transform_kernels_arm_64',
26                        'GEMMLOWP_NEON_64')
27
28  cc.EmitNamespaceBegin('gemmlowp')
29  cc.EmitNamespaceBegin('meta')
30  cc.EmitNewline()
31
32  transform_kernels_common.GenerateKernels(cc,
33                                           neon_emitter_64.NeonEmitter64(),
34                                           [(16, x) for x in range(16)])
35
36  cc.EmitNamespaceEnd()
37  cc.EmitNamespaceEnd()
38  cc.EmitNewline()
39
40  common.GenerateFooter(cc, 'Meta gemm for arm64 requires: GEMMLOWP_NEON_64!')
41
42
43if __name__ == '__main__':
44  Main()
45