LibreOffice Module sc (master) 1
op_logical.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 */
9
10#pragma once
11
12#include "opbase.hxx"
13#include "utils.hxx"
14
15namespace sc::opencl {
16
19{
21 const std::string &sSymName, SubArguments &vSubArguments) override;
22 virtual bool canHandleMultiVector() const override { return true; }
24 virtual const char* openclOperator() const = 0;
25};
26
28{
29public:
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 "&&"; };
34};
35
37{
38public:
39 virtual std::string BinFuncName() const override { return "Or"; }
40 virtual const char* openclOperator() const override { return "||"; };
41};
42
43class OpNot: public Normal
44{
45public:
47 const std::string &sSymName, SubArguments &vSubArguments) override;
48 virtual std::string BinFuncName() const override { return "Not"; }
49};
50
52{
53public:
54 virtual std::string BinFuncName() const override { return "Xor"; }
55 virtual const char* openclOperator() const override { return "^"; };
56};
57
58class OpIf:public Normal
59{
60public:
62 const std::string &sSymName, SubArguments &vSubArguments) override;
63 virtual std::string BinFuncName() const override { return "IF"; }
64};
65
66}
67
68/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual void GenSlidingWindowFunction(outputstream &ss, const std::string &sSymName, SubArguments &vSubArguments) override
Definition: op_logical.cxx:36
virtual const char * openclOperator() const override
The C operator implementing the function.
Definition: op_logical.hxx:33
virtual std::string BinFuncName() const override
Definition: op_logical.hxx:32
virtual void GenSlidingWindowFunction(outputstream &ss, const std::string &sSymName, SubArguments &vSubArguments) override
Definition: op_logical.cxx:68
virtual std::string BinFuncName() const override
Definition: op_logical.hxx:63
Implements OpAnd, OpOr, OpXor.
Definition: op_logical.hxx:19
virtual const char * openclOperator() const =0
The C operator implementing the function.
virtual void GenSlidingWindowFunction(outputstream &ss, const std::string &sSymName, SubArguments &vSubArguments) override
Definition: op_logical.cxx:19
virtual bool canHandleMultiVector() const override
Definition: op_logical.hxx:22
virtual std::string BinFuncName() const override
Definition: op_logical.hxx:48
virtual void GenSlidingWindowFunction(outputstream &ss, const std::string &sSymName, SubArguments &vSubArguments) override
Definition: op_logical.cxx:56
virtual const char * openclOperator() const override
The C operator implementing the function.
Definition: op_logical.hxx:40
virtual std::string BinFuncName() const override
Definition: op_logical.hxx:39
virtual const char * openclOperator() const override
The C operator implementing the function.
Definition: op_logical.hxx:55
virtual std::string BinFuncName() const override
Definition: op_logical.hxx:54
std::vector< DynamicKernelArgumentRef > SubArguments
Definition: opbase.hxx:347