From 4e736a8b8ce4d69c5be924b77bb07bd19b1e4d73 Mon Sep 17 00:00:00 2001 From: Markus Mohrhard Date: Sat, 23 Nov 2013 20:02:26 +0100 Subject: add API to retrieve all available OpenCL platforms and devices Change-Id: I2475961ae315ee7193ca2cedd5943b663bfee7a0 --- offapi/UnoApi_offapi.mk | 2 ++ offapi/com/sun/star/sheet/opencl/OpenCLDevice.idl | 37 ++++++++++++++++++++++ .../com/sun/star/sheet/opencl/OpenCLPlatform.idl | 33 +++++++++++++++++++ .../com/sun/star/sheet/opencl/XOpenCLSelection.idl | 7 ++++ 4 files changed, 79 insertions(+) create mode 100644 offapi/com/sun/star/sheet/opencl/OpenCLDevice.idl create mode 100644 offapi/com/sun/star/sheet/opencl/OpenCLPlatform.idl (limited to 'offapi') diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk index e7c52f2e63f2..a1ad8314aa62 100755 --- a/offapi/UnoApi_offapi.mk +++ b/offapi/UnoApi_offapi.mk @@ -3327,6 +3327,8 @@ $(eval $(call gb_UnoApi_add_idlfiles,offapi,com/sun/star/security,\ )) $(eval $(call gb_UnoApi_add_idlfiles,offapi,com/sun/star/sheet/opencl,\ + OpenCLDevice \ + OpenCLPlatform \ XOpenCLSelection \ )) 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 000000000000..7cf795f97d02 --- /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 000000000000..bb8a683b8e71 --- /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 index c6e18cf30e27..26ab32885ac7 100644 --- a/offapi/com/sun/star/sheet/opencl/XOpenCLSelection.idl +++ b/offapi/com/sun/star/sheet/opencl/XOpenCLSelection.idl @@ -7,6 +7,8 @@ * 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 @@ -38,6 +40,11 @@ interface XOpenCLSelection : com::sun::star::uno::XInterface */ long getDeviceID(); + /** + * lists all OpenCL devices and platforms + */ + sequence< OpenCLPlatform > getOpenCLPlatforms(); + }; }; }; }; }; }; -- cgit