fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / sc / source / core / opencl / op_math.hxx
blob6cb1eab34a796f982eb766f293dc1473cac70483
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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/.
8 */
10 #ifndef INCLUDED_SC_SOURCE_CORE_OPENCL_OP_MATH_HXX
11 #define INCLUDED_SC_SOURCE_CORE_OPENCL_OP_MATH_HXX
13 #include "opbase.hxx"
15 namespace sc { namespace opencl {
17 class OpCos: public Normal
19 public:
20 virtual void GenSlidingWindowFunction(std::stringstream &ss,
21 const std::string &sSymName, SubArguments &vSubArguments) SAL_OVERRIDE;
23 virtual std::string BinFuncName() const SAL_OVERRIDE { return "Cos"; }
25 class OpSec: public Normal
27 public:
28 virtual void GenSlidingWindowFunction(std::stringstream &ss,
29 const std::string &sSymName, SubArguments &vSubArguments) SAL_OVERRIDE;
31 virtual std::string BinFuncName() const SAL_OVERRIDE { return "Sec"; }
33 class OpSecH: public Normal
35 public:
36 virtual void GenSlidingWindowFunction(std::stringstream &ss,
37 const std::string &sSymName, SubArguments &vSubArguments) SAL_OVERRIDE;
39 virtual std::string BinFuncName() const SAL_OVERRIDE { return "SecH"; }
41 class OpMROUND: public Normal
43 public:
44 virtual void GenSlidingWindowFunction(std::stringstream &ss,
45 const std::string &sSymName, SubArguments &vSubArguments) SAL_OVERRIDE;
47 virtual std::string BinFuncName() const SAL_OVERRIDE { return "MROUND"; }
50 class OpCsc: public Normal
52 public:
53 virtual void GenSlidingWindowFunction(std::stringstream &ss,
54 const std::string &sSymName, SubArguments &vSubArguments) SAL_OVERRIDE;
55 virtual std::string BinFuncName() const SAL_OVERRIDE { return "Csc"; }
57 class OpSumIfs: public CheckVariables
59 public:
60 OpSumIfs(): CheckVariables(), mNeedReductionKernel(false) {}
61 virtual void GenSlidingWindowFunction(std::stringstream &ss,
62 const std::string &sSymName, SubArguments &vSubArguments) SAL_OVERRIDE;
63 virtual std::string BinFuncName() const SAL_OVERRIDE { return "SumIfs"; }
64 bool NeedReductionKernel() const { return mNeedReductionKernel; }
65 protected:
66 bool mNeedReductionKernel;
68 class OpCosh: public Normal
70 public:
71 virtual void GenSlidingWindowFunction(std::stringstream &ss,
72 const std::string &sSymName, SubArguments &vSubArguments) SAL_OVERRIDE;
73 virtual void BinInlineFun(std::set<std::string>& ,std::set<std::string>& ) SAL_OVERRIDE;
74 virtual std::string BinFuncName() const SAL_OVERRIDE { return "Cosh"; }
76 class OpSinh: public Normal
78 public:
79 virtual void GenSlidingWindowFunction(std::stringstream &ss,
80 const std::string &sSymName, SubArguments &vSubArguments) SAL_OVERRIDE;
81 virtual std::string BinFuncName() const SAL_OVERRIDE { return "Sinh"; }
83 class OpSin: public Normal
85 public:
86 virtual void GenSlidingWindowFunction(std::stringstream &ss,
87 const std::string &sSymName, SubArguments &vSubArguments) SAL_OVERRIDE;
88 virtual std::string BinFuncName() const SAL_OVERRIDE { return "Sin"; }
90 class OpAbs:public Normal{
91 public:
92 virtual void GenSlidingWindowFunction(std::stringstream &ss,
93 const std::string &sSymName, SubArguments &vSubArguments) SAL_OVERRIDE;
94 virtual std::string GetBottom() SAL_OVERRIDE { return "0.0"; }
95 virtual std::string BinFuncName() const SAL_OVERRIDE { return "ScAbs"; }
97 class OpArcCos:public Normal{
98 public:
99 virtual void GenSlidingWindowFunction(std::stringstream &ss,
100 const std::string &sSymName, SubArguments &vSubArguments) SAL_OVERRIDE;
101 virtual std::string GetBottom() SAL_OVERRIDE { return "0.0"; }
102 virtual std::string BinFuncName() const SAL_OVERRIDE { return "ScACos"; }
103 virtual void BinInlineFun(std::set<std::string>& ,std::set<std::string>&) SAL_OVERRIDE;
105 class OpArcCosHyp:public Normal{
106 public:
107 virtual void GenSlidingWindowFunction(std::stringstream &ss,
108 const std::string &sSymName, SubArguments &vSubArguments) SAL_OVERRIDE;
109 virtual std::string GetBottom() SAL_OVERRIDE { return "1.0"; }
110 virtual std::string BinFuncName() const SAL_OVERRIDE { return "ScACosH"; }
112 class OpTan: public Normal
114 public:
115 virtual void GenSlidingWindowFunction(std::stringstream &ss,
116 const std::string &sSymName, SubArguments &vSubArguments) SAL_OVERRIDE;
118 virtual std::string BinFuncName() const SAL_OVERRIDE { return "Tan"; }
120 class OpTanH: public Normal
122 public:
123 virtual void GenSlidingWindowFunction(std::stringstream &ss,
124 const std::string &sSymName, SubArguments &vSubArguments) SAL_OVERRIDE;
126 virtual std::string BinFuncName() const SAL_OVERRIDE { return "TanH"; }
128 class OpSqrt: public Normal
130 public:
131 virtual void GenSlidingWindowFunction(std::stringstream &ss,
132 const std::string &sSymName, SubArguments &vSubArguments) SAL_OVERRIDE;
134 virtual std::string BinFuncName() const SAL_OVERRIDE { return "Sqrt"; }
136 class OpArcCot:public Normal{
137 public:
138 virtual void GenSlidingWindowFunction(std::stringstream &ss,
139 const std::string &sSymName, SubArguments &vSubArguments) SAL_OVERRIDE;
140 virtual std::string GetBottom() SAL_OVERRIDE { return "0.0"; }
141 virtual std::string BinFuncName() const SAL_OVERRIDE { return "ScACot"; }
143 class OpArcCotHyp:public Normal{
144 public:
145 virtual void GenSlidingWindowFunction(std::stringstream &ss,
146 const std::string &sSymName, SubArguments &vSubArguments) SAL_OVERRIDE;
147 virtual std::string GetBottom() SAL_OVERRIDE { return "2.0"; }
148 virtual std::string BinFuncName() const SAL_OVERRIDE { return "ScACotH"; }
150 class OpArcSin:public Normal{
151 public:
152 virtual void GenSlidingWindowFunction(std::stringstream &ss,
153 const std::string &sSymName, SubArguments &vSubArguments) SAL_OVERRIDE;
154 virtual std::string GetBottom() SAL_OVERRIDE { return "0.0"; }
155 virtual std::string BinFuncName() const SAL_OVERRIDE { return "ScASin"; }
156 virtual void BinInlineFun(std::set<std::string>& ,std::set<std::string>&) SAL_OVERRIDE;
158 class OpArcSinHyp:public Normal{
159 public:
160 virtual void GenSlidingWindowFunction(std::stringstream &ss,
161 const std::string &sSymName, SubArguments &vSubArguments) SAL_OVERRIDE;
162 virtual std::string GetBottom() SAL_OVERRIDE { return "0.0"; }
163 virtual std::string BinFuncName() const SAL_OVERRIDE { return "ScASinH"; }
165 class OpTrunc: public Normal
167 public:
168 virtual void GenSlidingWindowFunction(std::stringstream &ss,
169 const std::string &sSymName, SubArguments &vSubArguments) SAL_OVERRIDE;
171 virtual std::string BinFuncName() const SAL_OVERRIDE { return "Trunc"; }
173 class OpArcTan2:public Normal{
174 public:
175 virtual void GenSlidingWindowFunction(std::stringstream &ss,
176 const std::string &sSymName, SubArguments &vSubArguments) SAL_OVERRIDE;
177 virtual std::string GetBottom() SAL_OVERRIDE { return "0.0"; }
178 virtual std::string BinFuncName() const SAL_OVERRIDE { return "ScATan2"; }
179 virtual void BinInlineFun(std::set<std::string>& ,std::set<std::string>&) SAL_OVERRIDE;
181 class OpArcTan:public Normal{
182 public:
183 virtual void GenSlidingWindowFunction(std::stringstream &ss,
184 const std::string &sSymName, SubArguments &vSubArguments) SAL_OVERRIDE;
185 virtual std::string GetBottom() SAL_OVERRIDE { return "0.0"; }
186 virtual std::string BinFuncName() const SAL_OVERRIDE { return "ScATan"; }
188 class OpArcTanH:public Normal{
189 public:
190 virtual void GenSlidingWindowFunction(std::stringstream &ss,
191 const std::string &sSymName, SubArguments &vSubArguments) SAL_OVERRIDE;
192 virtual std::string GetBottom() SAL_OVERRIDE { return "0.0"; }
193 virtual std::string BinFuncName() const SAL_OVERRIDE { return "ScATanH"; }
195 class OpBitAnd:public Normal{
196 public:
197 virtual void GenSlidingWindowFunction(std::stringstream &ss,
198 const std::string &sSymName, SubArguments &vSubArguments) SAL_OVERRIDE;
199 virtual std::string GetBottom() SAL_OVERRIDE { return "0.0"; }
200 virtual std::string BinFuncName() const SAL_OVERRIDE { return "ScBitAnd"; }
202 class OpBitOr:public Normal{
203 public:
204 virtual void GenSlidingWindowFunction(std::stringstream &ss,
205 const std::string &sSymName, SubArguments &vSubArguments) SAL_OVERRIDE;
206 virtual std::string GetBottom() SAL_OVERRIDE { return "0.0"; }
207 virtual std::string BinFuncName() const SAL_OVERRIDE { return "ScBitOr"; }
209 class OpBitXor:public Normal{
210 public:
211 virtual void GenSlidingWindowFunction(std::stringstream &ss,
212 const std::string &sSymName, SubArguments &vSubArguments) SAL_OVERRIDE;
213 virtual std::string GetBottom() SAL_OVERRIDE { return "0.0"; }
214 virtual std::string BinFuncName() const SAL_OVERRIDE { return "ScBitXor"; }
216 class OpBitLshift:public Normal{
217 public:
218 virtual void GenSlidingWindowFunction(std::stringstream &ss,
219 const std::string &sSymName, SubArguments &vSubArguments) SAL_OVERRIDE;
220 virtual std::string GetBottom() SAL_OVERRIDE { return "0.0"; }
221 virtual std::string BinFuncName() const SAL_OVERRIDE { return "ScBitLshift"; }
223 class OpBitRshift:public Normal{
224 public:
225 virtual void GenSlidingWindowFunction(std::stringstream &ss,
226 const std::string &sSymName, SubArguments &vSubArguments) SAL_OVERRIDE;
227 virtual std::string GetBottom() SAL_OVERRIDE { return "0.0"; }
228 virtual std::string BinFuncName() const SAL_OVERRIDE { return "ScBitRshift"; }
230 class OpLn: public CheckVariables
232 public:
233 virtual void GenSlidingWindowFunction(std::stringstream &ss,
234 const std::string &sSymName, SubArguments &vSubArguments) SAL_OVERRIDE;
235 virtual std::string BinFuncName() const SAL_OVERRIDE { return "Ln"; }
237 class OpRound: public CheckVariables
239 public:
240 virtual void GenSlidingWindowFunction(std::stringstream &ss,
241 const std::string &sSymName, SubArguments &vSubArguments) SAL_OVERRIDE;
242 virtual std::string BinFuncName() const SAL_OVERRIDE { return "Round"; }
244 class OpRoundUp: public CheckVariables
246 public:
247 virtual void GenSlidingWindowFunction(std::stringstream &ss,
248 const std::string &sSymName, SubArguments &vSubArguments) SAL_OVERRIDE;
249 virtual std::string BinFuncName() const SAL_OVERRIDE { return "RoundUp"; }
251 class OpRoundDown: public CheckVariables
253 public:
254 virtual void GenSlidingWindowFunction(std::stringstream &ss,
255 const std::string &sSymName, SubArguments &vSubArguments) SAL_OVERRIDE;
256 virtual std::string BinFuncName() const SAL_OVERRIDE { return "RoundDown"; }
258 class OpInt: public CheckVariables
260 public:
261 virtual void GenSlidingWindowFunction(std::stringstream &ss,
262 const std::string &sSymName, SubArguments &vSubArguments) SAL_OVERRIDE;
263 virtual std::string BinFuncName() const SAL_OVERRIDE { return "Int"; }
265 class OpRadians: public CheckVariables
267 public:
268 virtual void GenSlidingWindowFunction(std::stringstream &ss,
269 const std::string &sSymName, SubArguments &vSubArguments) SAL_OVERRIDE;
270 virtual std::string BinFuncName() const SAL_OVERRIDE { return "Radians"; }
272 class OpIsEven: public CheckVariables
274 public:
275 virtual void GenSlidingWindowFunction(std::stringstream &ss,
276 const std::string &sSymName, SubArguments &vSubArguments) SAL_OVERRIDE;
277 virtual std::string BinFuncName() const SAL_OVERRIDE { return "IsEven"; }
279 class OpIsOdd: public CheckVariables
281 public:
282 virtual void GenSlidingWindowFunction(std::stringstream &ss,
283 const std::string &sSymName, SubArguments &vSubArguments) SAL_OVERRIDE;
284 virtual std::string BinFuncName() const SAL_OVERRIDE { return "IsOdd"; }
286 class OpCot: public Normal
288 public:
289 virtual void GenSlidingWindowFunction(std::stringstream &ss,
290 const std::string &sSymName, SubArguments &vSubArguments) SAL_OVERRIDE;
292 virtual std::string BinFuncName() const SAL_OVERRIDE { return "Cot"; }
294 class OpSumSQ: public Normal
296 public:
297 virtual void GenSlidingWindowFunction(std::stringstream &ss,
298 const std::string &sSymName, SubArguments &vSubArguments) SAL_OVERRIDE;
300 virtual std::string BinFuncName() const SAL_OVERRIDE { return "SumSQ"; }
302 class OpCoth: public Normal
304 public:
305 virtual void GenSlidingWindowFunction(std::stringstream &ss,
306 const std::string &sSymName, SubArguments &vSubArguments) SAL_OVERRIDE;
307 virtual void BinInlineFun(std::set<std::string>& ,
308 std::set<std::string>& ) SAL_OVERRIDE;
309 virtual std::string BinFuncName() const SAL_OVERRIDE { return "Coth"; }
311 class OpPower: public Normal
313 public:
314 virtual void GenSlidingWindowFunction(std::stringstream &ss,
315 const std::string &sSymName, SubArguments &vSubArguments) SAL_OVERRIDE;
316 virtual std::string BinFuncName() const SAL_OVERRIDE { return "Power"; }
318 class OpOdd: public Normal
320 public:
321 virtual void GenSlidingWindowFunction(std::stringstream &ss,
322 const std::string &sSymName, SubArguments &vSubArguments) SAL_OVERRIDE;
323 virtual std::string BinFuncName() const SAL_OVERRIDE { return "Odd"; }
325 class OpFloor: public Normal
327 public:
328 virtual void GenSlidingWindowFunction(std::stringstream &ss,
329 const std::string &sSymName, SubArguments &vSubArguments) SAL_OVERRIDE;
330 virtual std::string BinFuncName() const SAL_OVERRIDE { return "Floor"; }
332 class OpCscH: public Normal
334 public:
335 virtual void GenSlidingWindowFunction(std::stringstream &ss,
336 const std::string &sSymName, SubArguments &vSubArguments) SAL_OVERRIDE;
337 virtual std::string BinFuncName() const SAL_OVERRIDE { return "CscH"; }
339 class OpCeil:public Normal{
340 public:
341 virtual void GenSlidingWindowFunction(std::stringstream &ss,
342 const std::string &sSymName, SubArguments &vSubArguments) SAL_OVERRIDE;
343 virtual std::string GetBottom() SAL_OVERRIDE { return "0.0"; }
344 virtual std::string BinFuncName() const SAL_OVERRIDE { return "ScCeil"; }
346 class OpExp: public Normal
348 public:
349 virtual void GenSlidingWindowFunction(std::stringstream &ss,
350 const std::string &sSymName, SubArguments &vSubArguments) SAL_OVERRIDE;
351 virtual std::string BinFuncName() const SAL_OVERRIDE { return "Exp"; }
353 class OpLog10: public Normal
355 public:
356 virtual void GenSlidingWindowFunction(std::stringstream &ss,
357 const std::string &sSymName, SubArguments &vSubArguments) SAL_OVERRIDE;
358 virtual std::string BinFuncName() const SAL_OVERRIDE { return "Log10"; }
360 class OpConvert: public Normal
362 public:
363 virtual void GenSlidingWindowFunction(std::stringstream &ss,
364 const std::string &sSymName, SubArguments &vSubArguments) SAL_OVERRIDE;
365 virtual std::string BinFuncName() const SAL_OVERRIDE { return "Convert"; }
366 virtual bool takeString() const SAL_OVERRIDE { return true; }
369 class OpEven: public Normal
371 public:
372 virtual void GenSlidingWindowFunction(std::stringstream &ss,
373 const std::string &sSymName, SubArguments &vSubArguments) SAL_OVERRIDE;
375 virtual std::string BinFuncName() const SAL_OVERRIDE { return "Even"; }
377 class OpAverageIfs: public CheckVariables
379 public:
380 virtual void GenSlidingWindowFunction(std::stringstream &ss,
381 const std::string &sSymName, SubArguments &vSubArguments) SAL_OVERRIDE;
382 virtual std::string BinFuncName() const SAL_OVERRIDE { return "AverageIfs"; }
384 class OpCountIfs: public CheckVariables
386 public:
387 virtual void GenSlidingWindowFunction(std::stringstream &ss,
388 const std::string &sSymName, SubArguments &vSubArguments) SAL_OVERRIDE;
389 virtual std::string BinFuncName() const SAL_OVERRIDE { return "CountIfs"; }
391 class OpMod: public Normal
393 public:
394 virtual void GenSlidingWindowFunction(std::stringstream &ss,
395 const std::string &sSymName, SubArguments &vSubArguments) SAL_OVERRIDE;
397 virtual std::string BinFuncName() const SAL_OVERRIDE { return "Mod"; }
399 class OpProduct: public Normal
401 public:
402 virtual void GenSlidingWindowFunction(std::stringstream &ss,
403 const std::string &sSymName, SubArguments &vSubArguments) SAL_OVERRIDE;
404 virtual std::string BinFuncName() const SAL_OVERRIDE { return "Product"; }
406 class OpSqrtPi: public Normal
408 public:
409 virtual void GenSlidingWindowFunction(std::stringstream &ss,
410 const std::string &sSymName, SubArguments &vSubArguments) SAL_OVERRIDE;
412 virtual std::string BinFuncName() const SAL_OVERRIDE { return "SqrtPi"; }
415 class OpCombinA: public Normal
417 public:
418 virtual void GenSlidingWindowFunction(std::stringstream &ss,
419 const std::string &sSymName, SubArguments &vSubArguments) SAL_OVERRIDE;
421 virtual std::string BinFuncName() const SAL_OVERRIDE { return "Combina"; }
422 virtual void BinInlineFun(std::set<std::string>& ,std::set<std::string>& ) SAL_OVERRIDE;
424 class OpLog: public Normal
426 public:
427 virtual void GenSlidingWindowFunction(std::stringstream &ss,
428 const std::string &sSymName, SubArguments &vSubArguments) SAL_OVERRIDE;
430 virtual std::string BinFuncName() const SAL_OVERRIDE { return "Log"; }
432 class OpCombin: public Normal{
433 public:
434 virtual void GenSlidingWindowFunction(std::stringstream &ss,
435 const std::string &sSymName, SubArguments &vSubArguments) SAL_OVERRIDE;
436 virtual std::string GetBottom() SAL_OVERRIDE { return "0.0"; }
437 virtual std::string BinFuncName() const SAL_OVERRIDE { return "ScCombin"; }
439 class OpAverageIf: public CheckVariables
441 public:
442 virtual void GenSlidingWindowFunction(std::stringstream &ss,
443 const std::string &sSymName, SubArguments &vSubArguments) SAL_OVERRIDE;
445 virtual std::string BinFuncName() const SAL_OVERRIDE { return "AverageIf"; }
447 class OpDeg: public Normal
449 public:
450 virtual void GenSlidingWindowFunction(std::stringstream &ss,
451 const std::string &sSymName, SubArguments &vSubArguments) SAL_OVERRIDE;
452 virtual std::string BinFuncName() const SAL_OVERRIDE { return "Degrees"; }
454 class OpCountIf: public Normal
456 public:
457 virtual void GenSlidingWindowFunction(std::stringstream &ss,
458 const std::string &sSymName, SubArguments &vSubArguments) SAL_OVERRIDE;
459 virtual std::string BinFuncName() const SAL_OVERRIDE { return "Countif"; }
461 class OpFact: public Normal{
462 public:
463 virtual void GenSlidingWindowFunction(std::stringstream& ss,
464 const std::string &sSymName, SubArguments& vSubArguments) SAL_OVERRIDE;
465 virtual std::string GetBottom() SAL_OVERRIDE { return "0.0"; }
466 virtual std::string BinFuncName() const SAL_OVERRIDE { return "Fact"; }
468 class OpSeriesSum: public Normal
470 public:
471 virtual void GenSlidingWindowFunction(std::stringstream &ss,
472 const std::string &sSymName, SubArguments &vSubArguments) SAL_OVERRIDE;
473 virtual std::string BinFuncName() const SAL_OVERRIDE { return "SeriesSum"; }
475 class OpSumIf: public Normal
477 public:
478 virtual void GenSlidingWindowFunction(std::stringstream &ss,
479 const std::string &sSymName, SubArguments &vSubArguments) SAL_OVERRIDE;
480 virtual std::string BinFuncName() const SAL_OVERRIDE { return "SumIf"; }
482 class OpQuotient: public Normal
484 public:
485 virtual void GenSlidingWindowFunction(std::stringstream &ss,
486 const std::string &sSymName, SubArguments &vSubArguments) SAL_OVERRIDE;
487 virtual std::string BinFuncName() const SAL_OVERRIDE { return "Quotient"; }
489 class OpNegSub: public CheckVariables
491 public:
492 virtual void GenSlidingWindowFunction(std::stringstream &ss,
493 const std::string &sSymName, SubArguments &vSubArguments) SAL_OVERRIDE;
494 virtual std::string BinFuncName() const SAL_OVERRIDE { return "NegSub"; }
499 #endif
501 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */