1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
15 namespace sc::opencl
{
17 /// Implements OpAnd, OpOr, OpXor.
18 class OpLogicalBinaryOperator
: public Normal
20 virtual void GenSlidingWindowFunction(outputstream
&ss
,
21 const std::string
&sSymName
, SubArguments
&vSubArguments
) override
;
22 virtual bool canHandleMultiVector() const override
{ return true; }
23 /// The C operator implementing the function.
24 virtual const char* openclOperator() const = 0;
27 class OpAnd
: public OpLogicalBinaryOperator
30 virtual void GenSlidingWindowFunction(outputstream
&ss
,
31 const std::string
&sSymName
, SubArguments
&vSubArguments
) override
;
32 virtual std::string
BinFuncName() const override
{ return "And"; }
33 virtual const char* openclOperator() const override
{ return "&&"; };
36 class OpOr
: public OpLogicalBinaryOperator
39 virtual std::string
BinFuncName() const override
{ return "Or"; }
40 virtual const char* openclOperator() const override
{ return "||"; };
43 class OpNot
: public Normal
46 virtual void GenSlidingWindowFunction(outputstream
&ss
,
47 const std::string
&sSymName
, SubArguments
&vSubArguments
) override
;
48 virtual std::string
BinFuncName() const override
{ return "Not"; }
51 class OpXor
: public OpLogicalBinaryOperator
54 virtual std::string
BinFuncName() const override
{ return "Xor"; }
55 virtual const char* openclOperator() const override
{ return "^"; };
58 class OpIf
:public Normal
61 virtual void GenSlidingWindowFunction(outputstream
&ss
,
62 const std::string
&sSymName
, SubArguments
&vSubArguments
) override
;
63 virtual std::string
BinFuncName() const override
{ return "IF"; }
68 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */