-
Notifications
You must be signed in to change notification settings - Fork 83
/
Copy pathprintcontrols.h
63 lines (54 loc) · 2.02 KB
/
printcontrols.h
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
/*
// Copyright (c) 2018-2025 Intel Corporation
//
// SPDX-License-Identifier: MIT
*/
#pragma once
#include <vector>
#include <stdio.h>
struct cliControl
{
bool IsSeparator;
const char* Name;
const char* Type;
const char* Description;
};
#define CLI_CONTROL( _type, _name, _init, _desc ) \
{ \
false, \
#_name, \
#_type, \
_desc, \
},
#define CLI_CONTROL_SEPARATOR( _name ) \
{ \
true, \
#_name, \
"", \
"", \
},
static const std::vector<cliControl> controls =
{
{ true, "Startup Controls:", "", ""},
{ false, "BreakOnLoad", "bool", "If set to a nonzero value, the Intercept Layer for OpenCL Applications will break into the debugger when the DLL is loaded." },
{ false, "std::string", "OpenCLFileName", "Used to control the DLL or Shared Library that the Intercept Layer for OpenCL Applications loads to make real OpenCL calls. If present, only this file name is loaded. If omitted, the Intercept Layer for OpenCL Applications will search a default set of real OpenCL file names." },
#include "src/controls.h"
};
#undef CLI_CONTROL
#undef CLI_CONTROL_SEPARATOR
static void printControls()
{
for (const auto& control : controls )
{
if (control.IsSeparator)
{
printf("%s\n", control.Name);
printf("========================================\n\n");
}
else
{
printf("%s (%s):\n", control.Name, control.Type);
printf("%s\n\n", control.Description);
}
}
}