Kaydet (Commit) 4ecf5039 authored tarafından Kohei Yoshida's avatar Kohei Yoshida Kaydeden (comit) Markus Mohrhard

First step toward splitting the opencl code into own shared library.

Change-Id: I44fa3ded8d48b2972af17b78ab6c0af03e024f36
üst f22e509c
......@@ -157,6 +157,7 @@ $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,calc, \
scfilt \
scui \
solver \
$(if $(ENABLE_OPENCL),scopencl) \
$(if $(DISABLE_SCRIPTING),,vbaobj) \
$(if $(ENABLE_TELEPATHY),tubes) \
))
......
......@@ -246,7 +246,7 @@ endef
# the default goal is all (see Module.mk)
ifeq (,$(filter-out all,$(MAKECMDGOALS)))
$(eval $(call repositorymodule_serialize,\
scfilt \
scfilt scopencl \
$(if $(filter SCRIPTING,$(BUILD_TYPE)),vbaobj) \
sc msword swui sw sd \
$(if $(filter DBCONNECTIVITY,$(BUILD_TYPE)),dbu) \
......
......@@ -54,15 +54,6 @@ $(eval $(call gb_Library_add_exception_objects,sc,\
))
endif
ifeq ($(ENABLE_OPENCL),TRUE)
$(eval $(call gb_Library_use_externals,sc,opencl))
$(eval $(call gb_Library_add_exception_objects,sc,\
sc/source/core/opencl/formulagroupcl \
sc/source/core/opencl/openclwrapper \
))
endif
$(eval $(call gb_Library_use_libraries,sc,\
avmedia \
basegfx \
......
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
#
# 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/.
#
$(eval $(call gb_Library_Library,scopencl))
$(eval $(call gb_Library_set_include,scopencl,\
-I$(SRCDIR)/sc/source/core/inc \
-I$(SRCDIR)/sc/inc \
$$(INCLUDE) \
))
$(eval $(call gb_Library_set_precompiled_header,scopencl,$(SRCDIR)/sc/inc/pch/precompiled_scopencl))
$(eval $(call gb_Library_use_sdk_api,scopencl))
$(eval $(call gb_Library_use_libraries,scopencl,\
for \
forui \
sal \
sc \
$(gb_UWINAPI) \
))
$(eval $(call gb_Library_use_externals,scopencl,opencl))
$(eval $(call gb_Library_add_exception_objects,scopencl,\
sc/source/core/opencl/formulagroupcl \
sc/source/core/opencl/openclwrapper \
))
# vim: set noet sw=4 ts=4:
......@@ -19,6 +19,12 @@ $(eval $(call gb_Module_add_targets,sc,\
UIConfig_scalc \
))
ifeq ($(ENABLE_OPENCL),TRUE)
$(eval $(call gb_Module_add_targets,sc,\
Library_scopencl \
))
endif
ifneq (,$(filter DESKTOP,$(BUILD_TYPE)))
$(eval $(call gb_Module_add_targets,sc,\
Library_scqahelper \
......
......@@ -1745,7 +1745,7 @@ public:
* @param pResults array of numeric results.
* @param nLen length of numeric results.
*/
void SetFormulaResults( const ScAddress& rTopPos, const double* pResults, size_t nLen );
void SC_DLLPUBLIC SetFormulaResults( const ScAddress& rTopPos, const double* pResults, size_t nLen );
private:
ScDocument(const ScDocument& r); // disabled with no definition
......
......@@ -10,7 +10,6 @@
#include "openclwrapper.hxx"
#include "sal/config.h"
#include "random.hxx"
#include "oclkernels.hxx"
#include <stdio.h>
......
......@@ -128,6 +128,15 @@ void fillMatrix( ScMatrix& rMat, size_t nCol, rtl_uString** pStrs, size_t nLen )
}
class FormulaGroupInterpreterOpenCLMissing : public FormulaGroupInterpreter
{
public:
FormulaGroupInterpreterOpenCLMissing() : FormulaGroupInterpreter() {}
virtual ~FormulaGroupInterpreterOpenCLMissing() {}
virtual ScMatrixRef inverseMatrix(const ScMatrix&) { return ScMatrixRef(); }
virtual bool interpret(ScDocument&, const ScAddress&, const ScFormulaCellGroupRef&, ScTokenArray&) { return false; }
};
ScMatrixRef FormulaGroupInterpreterSoftware::inverseMatrix(const ScMatrix& /*rMat*/)
{
return ScMatrixRef();
......@@ -340,7 +349,14 @@ FormulaGroupInterpreter *FormulaGroupInterpreter::getStatic()
{
#if HAVE_FEATURE_OPENCL
if ( ScInterpreter::GetGlobalConfig().mbOpenCLEnabled )
{
#ifdef DISABLE_DYNLOADING
msInstance = sc::opencl::createFormulaGroupInterpreter();
#else
// TODO : Dynamically load scopencl shared object, and instantiate the opencl interpreter.
msInstance = new sc::FormulaGroupInterpreterOpenCLMissing();
#endif
}
#endif
if ( !msInstance ) // software fallback
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment