forked from oneapi-src/level-zero
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathldrddi.h.mako
More file actions
35 lines (32 loc) · 828 Bytes
/
ldrddi.h.mako
File metadata and controls
35 lines (32 loc) · 828 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<%!
import re
from templates import helper as th
%><%
n=namespace
N=n.upper()
x=tags['$x']
X=x.upper()
%>/*
*
* Copyright (C) 2019-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
* @file ${name}.h
*
*/
#pragma once
namespace loader
{
///////////////////////////////////////////////////////////////////////////////
%for obj in th.extract_objs(specs, r"handle"):
%if 'class' in obj:
<%
_handle_t = th.subt(n, tags, obj['name'])
_object_t = re.sub(r"(\w+)_handle_t", r"\1_object_t", _handle_t)
_factory_t = re.sub(r"(\w+)_handle_t", r"\1_factory_t", _handle_t)
%>using ${th.append_ws(_object_t, 35)} = object_t < ${_handle_t} >;
using ${th.append_ws(_factory_t, 35)} = singleton_factory_t < ${_object_t}, ${_handle_t} >;
%endif
%endfor
}