/* -*- 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/.
*/
struct OPENCL_DLLPUBLIC GPUEnv
{ //share vb in all modules in hb library
cl_platform_id mpPlatformID;
cl_context mpContext;
cl_device_id mpDevID;
cl_command_queue mpCmdQueue[OPENCL_CMDQUEUE_SIZE]; bool mbCommandQueueInitialized;
cl_program mpArryPrograms[MAX_CLFILE_NUM]; //one program object maps one kernel source file int mnIsUserCreated; // 1: created , 0:no create and needed to create by opencl wrapper int mnCmdQueuePos; bool mnKhrFp64Flag; bool mnAmdFp64Flag; bool mbNeedsTDRAvoidance;
/** * Used to set or switch between OpenCL devices. * * @param aDeviceId the id of the opencl device of type cl_device_id, "" means use software calculation * @param bAutoSelect use the algorithm to select the best OpenCL device * @param rOutSelectedDeviceVersionIDString returns the selected device's version string. * * @return returns true if there is a valid opencl device that has been set up
*/
OPENCL_DLLPUBLIC bool switchOpenCLDevice(std::u16string_view aDevice, bool bAutoSelect, bool bForceEvaluation,
OUString& rOutSelectedDeviceVersionIDString);
/** * Set the current command queue position in case of multiple command queues * for a given device.
*/
OPENCL_DLLPUBLIC void setOpenCLCmdQueuePosition( int nPos );
/** * Return a textual representation of an OpenCL error code. * (Currently the symbolic name sans the CL_ prefix.)
*/
OPENCL_DLLPUBLIC constchar* errorString(cl_int nError);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.