LibreOffice Module opencl (master)
1
include
opencl
openclconfig.hxx
Go to the documentation of this file.
1
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
/*
3
* This file is part of the LibreOffice project.
4
*
5
* This Source Code Form is subject to the terms of the Mozilla Public
6
* License, v. 2.0. If a copy of the MPL was not distributed with this
7
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
8
*/
9
10
#ifndef INCLUDED_OPENCL_OPENCLCONFIG_HXX
11
#define INCLUDED_OPENCL_OPENCLCONFIG_HXX
12
13
#include <ostream>
14
#include <set>
15
16
#include <
opencl/opencldllapi.h
>
17
#include <rtl/ustring.hxx>
18
#include <utility>
19
20
struct
OpenCLDeviceInfo
;
21
struct
OpenCLPlatformInfo
;
22
23
struct
OPENCL_DLLPUBLIC
OpenCLConfig
24
{
25
struct
ImplMatcher
26
{
27
OUString
maOS
;
28
OUString
maOSVersion
;
29
OUString
maPlatformVendor
;
30
OUString
maDevice
;
31
OUString
maDriverVersion
;
32
33
ImplMatcher
()
34
{
35
}
36
37
ImplMatcher
(OUString aOS,
38
OUString aOSVersion,
39
OUString aPlatformVendor,
40
OUString aDevice,
41
OUString aDriverVersion)
42
: maOS(
std
::move(aOS)),
43
maOSVersion(
std
::move(aOSVersion)),
44
maPlatformVendor(
std
::move(aPlatformVendor)),
45
maDevice(
std
::move(aDevice)),
46
maDriverVersion(
std
::move(aDriverVersion))
47
{
48
}
49
50
bool
operator==
(
const
ImplMatcher
& r)
const
51
{
52
return
maOS == r.
maOS
&&
53
maOSVersion == r.
maOSVersion
&&
54
maPlatformVendor == r.
maPlatformVendor
&&
55
maDevice == r.
maDevice
&&
56
maDriverVersion == r.
maDriverVersion
;
57
}
58
bool
operator!=
(
const
ImplMatcher
& r)
const
59
{
60
return
!
operator==
(r);
61
}
62
bool
operator<
(
const
ImplMatcher
& r)
const
63
{
64
return
(maOS < r.
maOS
||
65
(maOS == r.
maOS
&&
66
(maOSVersion < r.
maOSVersion
||
67
(maOSVersion == r.
maOSVersion
&&
68
(maPlatformVendor < r.
maPlatformVendor
||
69
(maPlatformVendor == r.
maPlatformVendor
&&
70
(maDevice < r.
maDevice
||
71
(maDevice == r.
maDevice
&&
72
(maDriverVersion < r.
maDriverVersion
)))))))));
73
}
74
};
75
76
bool
mbUseOpenCL
;
77
78
typedef
std::set<ImplMatcher>
ImplMatcherSet
;
79
80
ImplMatcherSet
maDenyList
;
81
ImplMatcherSet
maAllowList
;
82
83
OpenCLConfig
();
84
85
bool
operator== (
const
OpenCLConfig
& r)
const
;
86
bool
operator!= (
const
OpenCLConfig
& r)
const
;
87
88
static
OpenCLConfig
get
();
89
90
void
set
();
91
92
bool
checkImplementation(
const
OpenCLPlatformInfo
& rPlatform,
const
OpenCLDeviceInfo
& rDevice)
const
;
93
};
94
95
OPENCL_DLLPUBLIC
std::ostream&
operator<<
(std::ostream& rStream,
const
OpenCLConfig
& rConfig);
96
OPENCL_DLLPUBLIC
std::ostream&
operator<<
(std::ostream& rStream,
const
OpenCLConfig::ImplMatcher
& rImpl);
97
OPENCL_DLLPUBLIC
std::ostream&
operator<<
(std::ostream& rStream,
const
OpenCLConfig::ImplMatcherSet
& rSet);
98
99
#endif
100
101
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
set
void set(css::uno::UnoInterfaceReference const &value)
std
get
css::uno::Reference< css::linguistic2::XProofreadingIterator > get(css::uno::Reference< css::uno::XComponentContext > const &context)
operator<<
OPENCL_DLLPUBLIC std::ostream & operator<<(std::ostream &rStream, const OpenCLConfig &rConfig)
Definition:
openclconfig.cxx:219
opencldllapi.h
OPENCL_DLLPUBLIC
#define OPENCL_DLLPUBLIC
Definition:
opencldllapi.h:28
OpenCLConfig::ImplMatcher
Definition:
openclconfig.hxx:26
OpenCLConfig::ImplMatcher::maDriverVersion
OUString maDriverVersion
Definition:
openclconfig.hxx:31
OpenCLConfig::ImplMatcher::ImplMatcher
ImplMatcher(OUString aOS, OUString aOSVersion, OUString aPlatformVendor, OUString aDevice, OUString aDriverVersion)
Definition:
openclconfig.hxx:37
OpenCLConfig::ImplMatcher::maDevice
OUString maDevice
Definition:
openclconfig.hxx:30
OpenCLConfig::ImplMatcher::operator!=
bool operator!=(const ImplMatcher &r) const
Definition:
openclconfig.hxx:58
OpenCLConfig::ImplMatcher::maOS
OUString maOS
Definition:
openclconfig.hxx:27
OpenCLConfig::ImplMatcher::maOSVersion
OUString maOSVersion
Definition:
openclconfig.hxx:28
OpenCLConfig::ImplMatcher::ImplMatcher
ImplMatcher()
Definition:
openclconfig.hxx:33
OpenCLConfig::ImplMatcher::operator==
bool operator==(const ImplMatcher &r) const
Definition:
openclconfig.hxx:50
OpenCLConfig::ImplMatcher::operator<
bool operator<(const ImplMatcher &r) const
Definition:
openclconfig.hxx:62
OpenCLConfig::ImplMatcher::maPlatformVendor
OUString maPlatformVendor
Definition:
openclconfig.hxx:29
OpenCLConfig
Definition:
openclconfig.hxx:24
OpenCLConfig::ImplMatcherSet
std::set< ImplMatcher > ImplMatcherSet
Definition:
openclconfig.hxx:78
OpenCLConfig::mbUseOpenCL
bool mbUseOpenCL
Definition:
openclconfig.hxx:76
OpenCLConfig::maDenyList
ImplMatcherSet maDenyList
Definition:
openclconfig.hxx:80
OpenCLConfig::maAllowList
ImplMatcherSet maAllowList
Definition:
openclconfig.hxx:81
OpenCLDeviceInfo
Definition:
platforminfo.hxx:24
OpenCLPlatformInfo
Definition:
platforminfo.hxx:39
operator==
bool operator==(const XclFontData &rLeft, const XclFontData &rRight)
Generated on Sun Jul 30 2023 04:26:59 for LibreOffice Module opencl (master) by
1.9.3