Tensor Tiling Library
 
Loading...
Searching...
No Matches
TTL_cpp/TTL.h
Go to the documentation of this file.
1/*
2 * TTL.h
3 *
4 * Copyright (c) 2025 Mobileye
5 *
6 * Licensed under the Apache License, Version 2.0 (the License);
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an AS IS BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 */
18
19#pragma once
20
21#define restrict
22
23#include "TTL_macros.h"
24
25/**
26 * @def __TTL_DEBUG
27 *
28 * @brief Turn on printf outputs from TTL, can be very noisy
29 *
30 * 0 = no noise
31 * bigger numbers mean more noise.
32 */
33#ifndef __TTL_DEBUG
34#define __TTL_DEBUG 0
35#endif
36
37/**
38 * @def TTL_TARGET
39 *
40 * @brief Define the target for TTL
41 *
42 * TTL can be built for multible targets - native support is
43 * - opencl - default if TTL_TARGET not predefined.
44 * - c
45 *
46 * Other platforms can be provided.
47 */
48#ifndef TTL_TARGET
49#define TTL_TARGET opencl
50#endif
51
52/**
53 * @def TTL_TYPES_INCLUDE_H
54 *
55 * @brief TTL_types will include this file prior to its definitions
56 *
57 * Values in the base distribution include
58 * - opencl/TTL_types.h
59 * - c/TTL_types.h
60 */
61// clang-format off
62#define TTL_TYPES_INCLUDE_H __TTL_STRINGFY2(TTL_TARGET/TTL_types.h)
63// clang-format on
64
65/**
66 * @def TTL_IMPORT_EXPORT_INCLUDE_H
67 *
68 * @brief Allow override of the standard OpenCL import export rules
69 *
70 * * Values in the base distribution include
71 * - opencl/TTL_import_export.h
72 * - c/TTL_import_export.h
73 */
74// clang-format off
75#define TTL_IMPORT_EXPORT_INCLUDE_H __TTL_STRINGFY2(TTL_TARGET/TTL_import_export.h)
76// clang-format on
77