Stop leaking all ScPostIt instances.
[LibreOffice.git] / sc / source / core / opencl / op_math.hxx
blob29214bc4223ea69623a78828d5d0e11547c53e8f
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 SC_OPENCL_OP_MATH_HXX
11 #define SC_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);
23 virtual std::string BinFuncName(void) const { return "Cos"; }
25 class OpSec: public Normal
27 public:
28 virtual void GenSlidingWindowFunction(std::stringstream &ss,
29 const std::string sSymName, SubArguments &vSubArguments);
31 virtual std::string BinFuncName(void) const { return "Sec"; }
33 class OpSecH: public Normal
35 public:
36 virtual void GenSlidingWindowFunction(std::stringstream &ss,
37 const std::string sSymName, SubArguments &vSubArguments);
39 virtual std::string BinFuncName(void) const { return "SecH"; }
41 class OpMROUND: public Normal
43 public:
44 virtual void GenSlidingWindowFunction(std::stringstream &ss,
45 const std::string sSymName, SubArguments &vSubArguments);
47 virtual std::string BinFuncName(void) const { return "MROUND"; }
51 class OpCsc: public Normal
53 public:
54 virtual void GenSlidingWindowFunction(std::stringstream &ss,
55 const std::string sSymName, SubArguments &vSubArguments);
56 virtual std::string BinFuncName(void) const { return "Csc"; }
58 class OpSumIfs: public CheckVariables
60 public:
61 OpSumIfs(void): CheckVariables(), mNeedReductionKernel(false) {}
62 virtual void GenSlidingWindowFunction(std::stringstream &ss,
63 const std::string sSymName, SubArguments &vSubArguments);
64 virtual std::string BinFuncName(void) const { return "SumIfs"; }
65 bool NeedReductionKernel(void) const { return mNeedReductionKernel; }
66 protected:
67 bool mNeedReductionKernel;
69 class OpCosh: public Normal
71 public:
72 virtual void GenSlidingWindowFunction(std::stringstream &ss,
73 const std::string sSymName, SubArguments &vSubArguments);
74 virtual void BinInlineFun(std::set<std::string>& ,std::set<std::string>& );
75 virtual std::string BinFuncName(void) const { return "Cosh"; }
77 class OpSinh: public Normal
79 public:
80 virtual void GenSlidingWindowFunction(std::stringstream &ss,
81 const std::string sSymName, SubArguments &vSubArguments);
82 virtual std::string BinFuncName(void) const { return "Sinh"; }
84 class OpSin: public Normal
86 public:
87 virtual void GenSlidingWindowFunction(std::stringstream &ss,
88 const std::string sSymName, SubArguments &vSubArguments);
89 virtual std::string BinFuncName(void) const { return "Sin"; }
91 class OpAbs:public Normal{
92 public:
93 virtual void GenSlidingWindowFunction(std::stringstream &ss,
94 const std::string sSymName, SubArguments &vSubArguments);
95 virtual std::string GetBottom(void) { return "0.0"; }
96 virtual std::string BinFuncName(void) const { return "ScAbs"; }
98 class OpArcCos:public Normal{
99 public:
100 virtual void GenSlidingWindowFunction(std::stringstream &ss,
101 const std::string sSymName, SubArguments &vSubArguments);
102 virtual std::string GetBottom(void) { return "0.0"; }
103 virtual std::string BinFuncName(void) const { return "ScACos"; }
104 virtual void BinInlineFun(std::set<std::string>& ,std::set<std::string>&);
106 class OpArcCosHyp:public Normal{
107 public:
108 virtual void GenSlidingWindowFunction(std::stringstream &ss,
109 const std::string sSymName, SubArguments &vSubArguments);
110 virtual std::string GetBottom(void) { return "1.0"; }
111 virtual std::string BinFuncName(void) const { return "ScACosH"; }
113 class OpTan: public Normal
115 public:
116 virtual void GenSlidingWindowFunction(std::stringstream &ss,
117 const std::string sSymName, SubArguments &vSubArguments);
119 virtual std::string BinFuncName(void) const { return "Tan"; }
121 class OpTanH: public Normal
123 public:
124 virtual void GenSlidingWindowFunction(std::stringstream &ss,
125 const std::string sSymName, SubArguments &vSubArguments);
127 virtual std::string BinFuncName(void) const { return "TanH"; }
129 class OpSqrt: public Normal
131 public:
132 virtual void GenSlidingWindowFunction(std::stringstream &ss,
133 const std::string sSymName, SubArguments &vSubArguments);
135 virtual std::string BinFuncName(void) const { return "Sqrt"; }
137 class OpArcCot:public Normal{
138 public:
139 virtual void GenSlidingWindowFunction(std::stringstream &ss,
140 const std::string sSymName, SubArguments &vSubArguments);
141 virtual std::string GetBottom(void) { return "0.0"; }
142 virtual std::string BinFuncName(void) const { return "ScACot"; }
144 class OpArcCotHyp:public Normal{
145 public:
146 virtual void GenSlidingWindowFunction(std::stringstream &ss,
147 const std::string sSymName, SubArguments &vSubArguments);
148 virtual std::string GetBottom(void) { return "2.0"; }
149 virtual std::string BinFuncName(void) const { return "ScACotH"; }
151 class OpArcSin:public Normal{
152 public:
153 virtual void GenSlidingWindowFunction(std::stringstream &ss,
154 const std::string sSymName, SubArguments &vSubArguments);
155 virtual std::string GetBottom(void) { return "0.0"; }
156 virtual std::string BinFuncName(void) const { return "ScASin"; }
157 virtual void BinInlineFun(std::set<std::string>& ,std::set<std::string>&);
159 class OpArcSinHyp:public Normal{
160 public:
161 virtual void GenSlidingWindowFunction(std::stringstream &ss,
162 const std::string sSymName, SubArguments &vSubArguments);
163 virtual std::string GetBottom(void) { return "0.0"; }
164 virtual std::string BinFuncName(void) const { return "ScASinH"; }
166 class OpTrunc: public Normal
168 public:
169 virtual void GenSlidingWindowFunction(std::stringstream &ss,
170 const std::string sSymName, SubArguments &vSubArguments);
172 virtual std::string BinFuncName(void) const { return "Trunc"; }
174 class OpArcTan2:public Normal{
175 public:
176 virtual void GenSlidingWindowFunction(std::stringstream &ss,
177 const std::string sSymName, SubArguments &vSubArguments);
178 virtual std::string GetBottom(void) { return "0.0"; }
179 virtual std::string BinFuncName(void) const { return "ScATan2"; }
180 virtual void BinInlineFun(std::set<std::string>& ,std::set<std::string>&);
182 class OpArcTan:public Normal{
183 public:
184 virtual void GenSlidingWindowFunction(std::stringstream &ss,
185 const std::string sSymName, SubArguments &vSubArguments);
186 virtual std::string GetBottom(void) { return "0.0"; }
187 virtual std::string BinFuncName(void) const { return "ScATan"; }
189 class OpArcTanH:public Normal{
190 public:
191 virtual void GenSlidingWindowFunction(std::stringstream &ss,
192 const std::string sSymName, SubArguments &vSubArguments);
193 virtual std::string GetBottom(void) { return "0.0"; }
194 virtual std::string BinFuncName(void) const { return "ScATanH"; }
196 class OpBitAnd:public Normal{
197 public:
198 virtual void GenSlidingWindowFunction(std::stringstream &ss,
199 const std::string sSymName, SubArguments &vSubArguments);
200 virtual std::string GetBottom(void) { return "0.0"; }
201 virtual std::string BinFuncName(void) const { return "ScBitAnd"; }
203 class OpBitOr:public Normal{
204 public:
205 virtual void GenSlidingWindowFunction(std::stringstream &ss,
206 const std::string sSymName, SubArguments &vSubArguments);
207 virtual std::string GetBottom(void) { return "0.0"; }
208 virtual std::string BinFuncName(void) const { return "ScBitOr"; }
210 class OpBitXor:public Normal{
211 public:
212 virtual void GenSlidingWindowFunction(std::stringstream &ss,
213 const std::string sSymName, SubArguments &vSubArguments);
214 virtual std::string GetBottom(void) { return "0.0"; }
215 virtual std::string BinFuncName(void) const { return "ScBitXor"; }
217 class OpBitLshift:public Normal{
218 public:
219 virtual void GenSlidingWindowFunction(std::stringstream &ss,
220 const std::string sSymName, SubArguments &vSubArguments);
221 virtual std::string GetBottom(void) { return "0.0"; }
222 virtual std::string BinFuncName(void) const { return "ScBitLshift"; }
224 class OpBitRshift:public Normal{
225 public:
226 virtual void GenSlidingWindowFunction(std::stringstream &ss,
227 const std::string sSymName, SubArguments &vSubArguments);
228 virtual std::string GetBottom(void) { return "0.0"; }
229 virtual std::string BinFuncName(void) const { return "ScBitRshift"; }
231 class OpLn: public CheckVariables
233 public:
234 virtual void GenSlidingWindowFunction(std::stringstream &ss,
235 const std::string sSymName, SubArguments &vSubArguments);
236 virtual std::string BinFuncName(void) const { return "Ln"; }
238 class OpRound: public CheckVariables
240 public:
241 virtual void GenSlidingWindowFunction(std::stringstream &ss,
242 const std::string sSymName, SubArguments &vSubArguments);
243 virtual std::string BinFuncName(void) const { return "Round"; }
245 class OpRoundUp: public CheckVariables
247 public:
248 virtual void GenSlidingWindowFunction(std::stringstream &ss,
249 const std::string sSymName, SubArguments &vSubArguments);
250 virtual std::string BinFuncName(void) const { return "RoundUp"; }
252 class OpRoundDown: public CheckVariables
254 public:
255 virtual void GenSlidingWindowFunction(std::stringstream &ss,
256 const std::string sSymName, SubArguments &vSubArguments);
257 virtual std::string BinFuncName(void) const { return "RoundDown"; }
259 class OpInt: public CheckVariables
261 public:
262 virtual void GenSlidingWindowFunction(std::stringstream &ss,
263 const std::string sSymName, SubArguments &vSubArguments);
264 virtual std::string BinFuncName(void) const { return "Int"; }
266 class OpRadians: public CheckVariables
268 public:
269 virtual void GenSlidingWindowFunction(std::stringstream &ss,
270 const std::string sSymName, SubArguments &vSubArguments);
271 virtual std::string BinFuncName(void) const { return "Radians"; }
273 class OpIsEven: public CheckVariables
275 public:
276 virtual void GenSlidingWindowFunction(std::stringstream &ss,
277 const std::string sSymName, SubArguments &vSubArguments);
278 virtual std::string BinFuncName(void) const { return "IsEven"; }
280 class OpIsOdd: public CheckVariables
282 public:
283 virtual void GenSlidingWindowFunction(std::stringstream &ss,
284 const std::string sSymName, SubArguments &vSubArguments);
285 virtual std::string BinFuncName(void) const { return "IsOdd"; }
287 class OpCot: public Normal
289 public:
290 virtual void GenSlidingWindowFunction(std::stringstream &ss,
291 const std::string sSymName, SubArguments &vSubArguments);
293 virtual std::string BinFuncName(void) const { return "Cot"; }
295 class OpSumSQ: public Normal
297 public:
298 virtual void GenSlidingWindowFunction(std::stringstream &ss,
299 const std::string sSymName, SubArguments &vSubArguments);
301 virtual std::string BinFuncName(void) const { return "SumSQ"; }
303 class OpCoth: public Normal
305 public:
306 virtual void GenSlidingWindowFunction(std::stringstream &ss,
307 const std::string sSymName, SubArguments &vSubArguments);
308 virtual void BinInlineFun(std::set<std::string>& ,
309 std::set<std::string>& );
310 virtual std::string BinFuncName(void) const { return "Coth"; }
312 class OpPower: public Normal
314 public:
315 virtual void GenSlidingWindowFunction(std::stringstream &ss,
316 const std::string sSymName, SubArguments &vSubArguments);
317 virtual std::string BinFuncName(void) const { return "Power"; }
319 class OpOdd: public Normal
321 public:
322 virtual void GenSlidingWindowFunction(std::stringstream &ss,
323 const std::string sSymName, SubArguments &vSubArguments);
324 virtual std::string BinFuncName(void) const { return "Odd"; }
326 class OpFloor: public Normal
328 public:
329 virtual void GenSlidingWindowFunction(std::stringstream &ss,
330 const std::string sSymName, SubArguments &vSubArguments);
331 virtual std::string BinFuncName(void) const { return "Floor"; }
333 class OpCscH: public Normal
335 public:
336 virtual void GenSlidingWindowFunction(std::stringstream &ss,
337 const std::string sSymName, SubArguments &vSubArguments);
338 virtual std::string BinFuncName(void) const { return "CscH"; }
340 class OpCeil:public Normal{
341 public:
342 virtual void GenSlidingWindowFunction(std::stringstream &ss,
343 const std::string sSymName, SubArguments &vSubArguments);
344 virtual std::string GetBottom(void) { return "0.0"; }
345 virtual std::string BinFuncName(void) const { return "ScCeil"; }
347 class OpExp: public Normal
349 public:
350 virtual void GenSlidingWindowFunction(std::stringstream &ss,
351 const std::string sSymName, SubArguments &vSubArguments);
352 virtual std::string BinFuncName(void) const { return "Exp"; }
354 class OpLog10: public Normal
356 public:
357 virtual void GenSlidingWindowFunction(std::stringstream &ss,
358 const std::string sSymName, SubArguments &vSubArguments);
359 virtual std::string BinFuncName(void) const { return "Log10"; }
361 class OpConvert: public Normal
363 public:
364 virtual void GenSlidingWindowFunction(std::stringstream &ss,
365 const std::string sSymName, SubArguments &vSubArguments);
366 virtual std::string BinFuncName(void) const { return "Convert"; }
367 virtual bool takeString() const { return true; }
370 class OpEven: public Normal
372 public:
373 virtual void GenSlidingWindowFunction(std::stringstream &ss,
374 const std::string sSymName, SubArguments &vSubArguments);
376 virtual std::string BinFuncName(void) const { return "Even"; }
378 class OpAverageIfs: public CheckVariables
380 public:
381 virtual void GenSlidingWindowFunction(std::stringstream &ss,
382 const std::string sSymName, SubArguments &vSubArguments);
383 virtual std::string BinFuncName(void) const { return "AverageIfs"; }
385 class OpCountIfs: public CheckVariables
387 public:
388 virtual void GenSlidingWindowFunction(std::stringstream &ss,
389 const std::string sSymName, SubArguments &vSubArguments);
390 virtual std::string BinFuncName(void) const { return "CountIfs"; }
392 class OpMod: public Normal
394 public:
395 virtual void GenSlidingWindowFunction(std::stringstream &ss,
396 const std::string sSymName, SubArguments &vSubArguments);
398 virtual std::string BinFuncName(void) const { return "Mod"; }
400 class OpProduct: public Normal
402 public:
403 virtual void GenSlidingWindowFunction(std::stringstream &ss,
404 const std::string sSymName, SubArguments &vSubArguments);
405 virtual std::string BinFuncName(void) const { return "Product"; }
407 class OpSqrtPi: public Normal
409 public:
410 virtual void GenSlidingWindowFunction(std::stringstream &ss,
411 const std::string sSymName, SubArguments &vSubArguments);
413 virtual std::string BinFuncName(void) const { return "SqrtPi"; }
416 class OpCombina: public Normal
418 public:
419 virtual void GenSlidingWindowFunction(std::stringstream &ss,
420 const std::string sSymName, SubArguments &vSubArguments);
422 virtual std::string BinFuncName(void) const { return "Combina"; }
423 virtual void BinInlineFun(std::set<std::string>& ,std::set<std::string>& );
425 class OpLog: public Normal
427 public:
428 virtual void GenSlidingWindowFunction(std::stringstream &ss,
429 const std::string sSymName, SubArguments &vSubArguments);
431 virtual std::string BinFuncName(void) const { return "Log"; }
433 class OpKombin: public Normal{
434 public:
435 virtual void GenSlidingWindowFunction(std::stringstream &ss,
436 const std::string sSymName, SubArguments &vSubArguments);
437 virtual std::string GetBottom(void) { return "0.0"; }
438 virtual std::string BinFuncName(void) const { return "ScKombin"; }
440 class OpAverageIf: public CheckVariables
442 public:
443 virtual void GenSlidingWindowFunction(std::stringstream &ss,
444 const std::string sSymName, SubArguments &vSubArguments);
446 virtual std::string BinFuncName(void) const { return "AverageIf"; }
448 class OpDeg: public Normal
450 public:
451 virtual void GenSlidingWindowFunction(std::stringstream &ss,
452 const std::string sSymName, SubArguments &vSubArguments);
453 virtual std::string BinFuncName(void) const { return "Degrees"; }
455 class OpCountIf: public Normal
457 public:
458 virtual void GenSlidingWindowFunction(std::stringstream &ss,
459 const std::string sSymName, SubArguments &vSubArguments);
460 virtual std::string BinFuncName(void) const { return "Countif"; }
462 class OpFact: public Normal{
463 public:
464 virtual void GenSlidingWindowFunction(std::stringstream& ss,
465 const std::string sSymName, SubArguments& vSubArguments);
466 virtual std::string GetBottom(void) { return "0.0"; }
467 virtual std::string BinFuncName(void) const { return "Fact"; }
469 class OpSeriesSum: public Normal
471 public:
472 virtual void GenSlidingWindowFunction(std::stringstream &ss,
473 const std::string sSymName, SubArguments &vSubArguments);
474 virtual std::string BinFuncName(void) const { return "SeriesSum"; }
476 class OpSumIf: public Normal
478 public:
479 virtual void GenSlidingWindowFunction(std::stringstream &ss,
480 const std::string sSymName, SubArguments &vSubArguments);
481 virtual std::string BinFuncName(void) const { return "SumIf"; }
483 class OpQuotient: public Normal
485 public:
486 virtual void GenSlidingWindowFunction(std::stringstream &ss,
487 const std::string sSymName, SubArguments &vSubArguments);
488 virtual std::string BinFuncName(void) const { return "Quotient"; }
490 class OpNegSub: public CheckVariables
492 public:
493 virtual void GenSlidingWindowFunction(std::stringstream &ss,
494 const std::string sSymName, SubArguments &vSubArguments);
495 virtual std::string BinFuncName(void) const { return "NegSub"; }
500 #endif
502 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */