From ed5640d8b587fbcfed7dd7967f3de04b37a76f26 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 11:06:44 +0200 Subject: Adding upstream version 4:7.4.7. Signed-off-by: Daniel Baumann --- offapi/com/sun/star/sheet/opencl/OpenCLDevice.idl | 37 +++++++ .../com/sun/star/sheet/opencl/OpenCLPlatform.idl | 33 +++++++ .../com/sun/star/sheet/opencl/XOpenCLSelection.idl | 106 +++++++++++++++++++++ 3 files changed, 176 insertions(+) create mode 100644 offapi/com/sun/star/sheet/opencl/OpenCLDevice.idl create mode 100644 offapi/com/sun/star/sheet/opencl/OpenCLPlatform.idl create mode 100644 offapi/com/sun/star/sheet/opencl/XOpenCLSelection.idl (limited to 'offapi/com/sun/star/sheet/opencl') diff --git a/offapi/com/sun/star/sheet/opencl/OpenCLDevice.idl b/offapi/com/sun/star/sheet/opencl/OpenCLDevice.idl new file mode 100644 index 000000000..7cf795f97 --- /dev/null +++ b/offapi/com/sun/star/sheet/opencl/OpenCLDevice.idl @@ -0,0 +1,37 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#ifndef __com_sun_star_sheet_opencl_OpenCLDevice_idl__ +#define __com_sun_star_sheet_opencl_OpenCLDevice_idl__ + +module com { module sun { module star { module sheet { module opencl { + +struct OpenCLDevice +{ + /** + * The name of the device as returned by OpenCL + */ + string Name; + + /** + * The vendor of the device as returned by OpenCL + */ + string Vendor; + + /** + * The driver version as returned by OpenCL + */ + string Driver; +}; + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sheet/opencl/OpenCLPlatform.idl b/offapi/com/sun/star/sheet/opencl/OpenCLPlatform.idl new file mode 100644 index 000000000..bb8a683b8 --- /dev/null +++ b/offapi/com/sun/star/sheet/opencl/OpenCLPlatform.idl @@ -0,0 +1,33 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#ifndef __com_sun_star_sheet_opencl_OpenCLPlatform_idl__ +#define __com_sun_star_sheet_opencl_OpenCLPlatform_idl__ + +#include + +module com { module sun { module star { module sheet { module opencl { + +struct OpenCLPlatform +{ + /** + * The name of the platform as returned by OpenCL + */ + string Name; + + string Vendor; + + sequence< OpenCLDevice > Devices; +}; + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sheet/opencl/XOpenCLSelection.idl b/offapi/com/sun/star/sheet/opencl/XOpenCLSelection.idl new file mode 100644 index 000000000..69374baf8 --- /dev/null +++ b/offapi/com/sun/star/sheet/opencl/XOpenCLSelection.idl @@ -0,0 +1,106 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#include + +module com { module sun { module star { module sheet { module opencl { + +interface XOpenCLSelection : com::sun::star::uno::XInterface +{ + + /** + * Returns true if calculation with OpenCL is enabled (at all). + * The actual use of OpenCL for a formula is also affected by the + * configuration settings specifying whether OpenCL is used for + * all opcodes or just for a subset, and the deny- and allowlists + * of OpenCL implementations that are in use. + */ + boolean isOpenCLEnabled(); + + /** + * Enables or disables use of OpenCL for calculations. When using + * this API to enable OpenCL the configuration parameters are set + * to their built-in default values, not ones read from the + * installation of user-specific configuration. + */ + void enableOpenCL( [in] boolean enable ); + + /** + * Enables automatic OpenCL Device Selection + * @param force forces a new evaluation of the best device + */ + void enableAutomaticDeviceSelection( [in] boolean force ); + + /** + * Disables automatic OpenCL Device Selection + */ + void disableAutomaticDeviceSelection(); + + /** + * Select the OpenCL device with the given platform and device + * number. The platform number corresponds to an index into the + * sequence returned by getOpenCLPlatforms, and the device number + * corresponds to an index into the sequence of devices in that + * platform. + */ + void selectOpenCLDevice( [in] long platform, [in] long device ); + + /** + * returns the index of the platform of the currently selected + * device. This is an index into the sequence that + * getOpenCLPlatforms returns in the current instance of + * LibreOffice (and not some a priori defined identifier for an + * OpenCL platform). + */ + long getPlatformID(); + + /** + * returns the index of the currently selected device. This is an + * index into the sequence of devices in the OpenCLPLatform object + * the device is part of in the current instance of LibreOffice + * (and not some a priori defined identifier for a specific model + * of device accessed through a specific platform). + */ + long getDeviceID(); + + /** + * lists all OpenCL devices and platforms + */ + sequence< OpenCLPlatform > getOpenCLPlatforms(); + + /* + * Sets OpenCL to be considered only for formulas that use only a specific subset of opcodes. + */ + void enableOpcodeSubsetTest(); + + /* + * Sets OpenCL to be considered for formulas regardless of what opcodes they contain. + */ + void disableOpcodeSubsetTest(); + + /* + * Returns whether OpenCL is considered or not depending on the opcodes a formula uses. + */ + boolean isOpcodeSubsetTested(); + + /* + * Sets the lower limit on the size of a formula group for OpenCL to be considered. (Sorry, the name is misleading.) + */ + void setFormulaCellNumberLimit( [in] long number ); + + /* + * Returns the lower limit on the size of a formula group for OpenCL to be considered. + */ + long getFormulaCellNumberLimit(); + +}; + +}; }; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit v1.2.3