- added the det() function to the transform2() engine.
[imager.git] / lib / Imager / Regops.pm
CommitLineData
84324192
AMH
1# AUTOMATICALLY GENERATED BY regops.perl
2package Imager::Regops;
3use strict;
4require Exporter;
5use vars qw(@ISA @EXPORT @EXPORT_OK %Attr $MaxOperands $PackCode);
6@ISA = qw(Exporter);
7@EXPORT_OK = qw(%Attr $MaxOperands $PackCode);
8
9use constant RBC_ADD => 0;
10use constant RBC_SUBTRACT => 1;
11use constant RBC_MULT => 2;
12use constant RBC_DIV => 3;
13use constant RBC_MOD => 4;
14use constant RBC_POW => 5;
15use constant RBC_UMINUS => 6;
16use constant RBC_MULTP => 7;
17use constant RBC_ADDP => 8;
18use constant RBC_SUBTRACTP => 9;
19use constant RBC_SIN => 10;
20use constant RBC_COS => 11;
21use constant RBC_ATAN2 => 12;
22use constant RBC_SQRT => 13;
23use constant RBC_DISTANCE => 14;
24use constant RBC_GETP1 => 15;
25use constant RBC_GETP2 => 16;
26use constant RBC_GETP3 => 17;
27use constant RBC_VALUE => 18;
28use constant RBC_HUE => 19;
29use constant RBC_SAT => 20;
30use constant RBC_HSV => 21;
31use constant RBC_RED => 22;
32use constant RBC_GREEN => 23;
33use constant RBC_BLUE => 24;
34use constant RBC_RGB => 25;
35use constant RBC_INT => 26;
36use constant RBC_IF => 27;
37use constant RBC_IFP => 28;
38use constant RBC_LE => 29;
39use constant RBC_LT => 30;
40use constant RBC_GE => 31;
41use constant RBC_GT => 32;
42use constant RBC_EQ => 33;
43use constant RBC_NE => 34;
44use constant RBC_AND => 35;
45use constant RBC_OR => 36;
46use constant RBC_NOT => 37;
47use constant RBC_ABS => 38;
48use constant RBC_RET => 39;
49use constant RBC_JUMP => 40;
50use constant RBC_JUMPZ => 41;
51use constant RBC_JUMPNZ => 42;
52use constant RBC_SET => 43;
53use constant RBC_SETP => 44;
54use constant RBC_PRINT => 45;
e5744e01
TC
55use constant RBC_RGBA => 46;
56use constant RBC_HSVA => 47;
57use constant RBC_ALPHA => 48;
aed9d070
TC
58use constant RBC_LOG => 49;
59use constant RBC_EXP => 50;
3309187a
TC
60use constant RBC_DET => 51;
61use constant RBC_OP_COUNT => 52;
84324192 62
3309187a 63@EXPORT = qw(RBC_ADD RBC_SUBTRACT RBC_MULT RBC_DIV RBC_MOD RBC_POW RBC_UMINUS RBC_MULTP RBC_ADDP RBC_SUBTRACTP RBC_SIN RBC_COS RBC_ATAN2 RBC_SQRT RBC_DISTANCE RBC_GETP1 RBC_GETP2 RBC_GETP3 RBC_VALUE RBC_HUE RBC_SAT RBC_HSV RBC_RED RBC_GREEN RBC_BLUE RBC_RGB RBC_INT RBC_IF RBC_IFP RBC_LE RBC_LT RBC_GE RBC_GT RBC_EQ RBC_NE RBC_AND RBC_OR RBC_NOT RBC_ABS RBC_RET RBC_JUMP RBC_JUMPZ RBC_JUMPNZ RBC_SET RBC_SETP RBC_PRINT RBC_RGBA RBC_HSVA RBC_ALPHA RBC_LOG RBC_EXP RBC_DET RBC_OP_COUNT);
84324192 64
61c9a3b2
TC
65%Attr =
66 (
67 'abs' =>
68 {
69 'func' => 1,
70 'opcode' => 38,
71 'parms' => 1,
72 'result' => 'r',
73 'types' => 'r',
74 },
75 'add' =>
76 {
77 'func' => 0,
78 'opcode' => 0,
79 'parms' => 2,
80 'result' => 'r',
81 'types' => 'rr',
82 },
83 'addp' =>
84 {
85 'func' => 0,
86 'opcode' => 8,
87 'parms' => 2,
88 'result' => 'p',
89 'types' => 'pp',
90 },
91 'alpha' =>
92 {
93 'func' => 1,
94 'opcode' => 48,
95 'parms' => 1,
96 'result' => 'r',
97 'types' => 'p',
98 },
99 'and' =>
100 {
101 'func' => 0,
102 'opcode' => 35,
103 'parms' => 2,
104 'result' => 'r',
105 'types' => 'rr',
106 },
107 'atan2' =>
108 {
109 'func' => 1,
110 'opcode' => 12,
111 'parms' => 2,
112 'result' => 'r',
113 'types' => 'rr',
114 },
115 'blue' =>
116 {
117 'func' => 1,
118 'opcode' => 24,
119 'parms' => 1,
120 'result' => 'r',
121 'types' => 'p',
122 },
123 'cos' =>
124 {
125 'func' => 1,
126 'opcode' => 11,
127 'parms' => 1,
128 'result' => 'r',
129 'types' => 'r',
130 },
3309187a
TC
131 'det' =>
132 {
133 'func' => 1,
134 'opcode' => 51,
135 'parms' => 4,
136 'result' => 'r',
137 'types' => 'rrrr',
138 },
61c9a3b2
TC
139 'distance' =>
140 {
141 'func' => 1,
142 'opcode' => 14,
143 'parms' => 4,
144 'result' => 'r',
145 'types' => 'rrrr',
146 },
147 'div' =>
148 {
149 'func' => 0,
150 'opcode' => 3,
151 'parms' => 2,
152 'result' => 'r',
153 'types' => 'rr',
154 },
155 'eq' =>
156 {
157 'func' => 0,
158 'opcode' => 33,
159 'parms' => 2,
160 'result' => 'r',
161 'types' => 'rr',
162 },
163 'exp' =>
164 {
165 'func' => 1,
166 'opcode' => 50,
167 'parms' => 1,
168 'result' => 'r',
169 'types' => 'r',
170 },
171 'ge' =>
172 {
173 'func' => 0,
174 'opcode' => 31,
175 'parms' => 2,
176 'result' => 'r',
177 'types' => 'rr',
178 },
179 'getp1' =>
180 {
181 'func' => 1,
182 'opcode' => 15,
183 'parms' => 2,
184 'result' => 'p',
185 'types' => 'rr',
186 },
187 'getp2' =>
188 {
189 'func' => 1,
190 'opcode' => 16,
191 'parms' => 2,
192 'result' => 'p',
193 'types' => 'rr',
194 },
195 'getp3' =>
196 {
197 'func' => 1,
198 'opcode' => 17,
199 'parms' => 2,
200 'result' => 'p',
201 'types' => 'rr',
202 },
203 'green' =>
204 {
205 'func' => 1,
206 'opcode' => 23,
207 'parms' => 1,
208 'result' => 'r',
209 'types' => 'p',
210 },
211 'gt' =>
212 {
213 'func' => 0,
214 'opcode' => 32,
215 'parms' => 2,
216 'result' => 'r',
217 'types' => 'rr',
218 },
219 'hsv' =>
220 {
221 'func' => 1,
222 'opcode' => 21,
223 'parms' => 3,
224 'result' => 'p',
225 'types' => 'rrr',
226 },
227 'hsva' =>
228 {
229 'func' => 1,
230 'opcode' => 47,
231 'parms' => 4,
232 'result' => 'p',
233 'types' => 'rrrr',
234 },
235 'hue' =>
236 {
237 'func' => 1,
238 'opcode' => 19,
239 'parms' => 1,
240 'result' => 'r',
241 'types' => 'p',
242 },
243 'if' =>
244 {
245 'func' => 1,
246 'opcode' => 27,
247 'parms' => 3,
248 'result' => 'r',
249 'types' => 'rrr',
250 },
251 'ifp' =>
252 {
253 'func' => 1,
254 'opcode' => 28,
255 'parms' => 3,
256 'result' => 'p',
257 'types' => 'rpp',
258 },
259 'int' =>
260 {
261 'func' => 1,
262 'opcode' => 26,
263 'parms' => 1,
264 'result' => 'r',
265 'types' => 'r',
266 },
267 'jump' =>
268 {
269 'func' => 0,
270 'opcode' => 40,
271 'parms' => 0,
272 'result' => undef,
273 'types' => '',
274 },
275 'jumpnz' =>
276 {
277 'func' => 0,
278 'opcode' => 42,
279 'parms' => 1,
280 'result' => undef,
281 'types' => 'r',
282 },
283 'jumpz' =>
284 {
285 'func' => 0,
286 'opcode' => 41,
287 'parms' => 1,
288 'result' => undef,
289 'types' => 'r',
290 },
291 'le' =>
292 {
293 'func' => 0,
294 'opcode' => 29,
295 'parms' => 2,
296 'result' => 'r',
297 'types' => 'rr',
298 },
299 'log' =>
300 {
301 'func' => 1,
302 'opcode' => 49,
303 'parms' => 1,
304 'result' => 'r',
305 'types' => 'r',
306 },
307 'lt' =>
308 {
309 'func' => 0,
310 'opcode' => 30,
311 'parms' => 2,
312 'result' => 'r',
313 'types' => 'rr',
314 },
315 'mod' =>
316 {
317 'func' => 0,
318 'opcode' => 4,
319 'parms' => 2,
320 'result' => 'r',
321 'types' => 'rr',
322 },
323 'mult' =>
324 {
325 'func' => 0,
326 'opcode' => 2,
327 'parms' => 2,
328 'result' => 'r',
329 'types' => 'rr',
330 },
331 'multp' =>
332 {
333 'func' => 0,
334 'opcode' => 7,
335 'parms' => 2,
336 'result' => 'p',
337 'types' => 'pr',
338 },
339 'ne' =>
340 {
341 'func' => 0,
342 'opcode' => 34,
343 'parms' => 2,
344 'result' => 'r',
345 'types' => 'rr',
346 },
347 'not' =>
348 {
349 'func' => 0,
350 'opcode' => 37,
351 'parms' => 1,
352 'result' => 'r',
353 'types' => 'r',
354 },
355 'op_count' =>
356 {
357 'func' => 0,
3309187a 358 'opcode' => 52,
61c9a3b2
TC
359 'parms' => 0,
360 'result' => undef,
361 'types' => '',
362 },
363 'or' =>
364 {
365 'func' => 0,
366 'opcode' => 36,
367 'parms' => 2,
368 'result' => 'r',
369 'types' => 'rr',
370 },
371 'pow' =>
372 {
373 'func' => 0,
374 'opcode' => 5,
375 'parms' => 2,
376 'result' => 'r',
377 'types' => 'rr',
378 },
379 'print' =>
380 {
3309187a 381 'func' => 1,
61c9a3b2
TC
382 'opcode' => 45,
383 'parms' => 1,
3309187a 384 'result' => 'r',
61c9a3b2
TC
385 'types' => 'r',
386 },
387 'red' =>
388 {
389 'func' => 1,
390 'opcode' => 22,
391 'parms' => 1,
392 'result' => 'r',
393 'types' => 'p',
394 },
395 'ret' =>
396 {
397 'func' => 0,
398 'opcode' => 39,
399 'parms' => 1,
400 'result' => undef,
401 'types' => 'p',
402 },
403 'rgb' =>
404 {
405 'func' => 1,
406 'opcode' => 25,
407 'parms' => 3,
408 'result' => 'p',
409 'types' => 'rrr',
410 },
411 'rgba' =>
412 {
413 'func' => 1,
414 'opcode' => 46,
415 'parms' => 4,
416 'result' => 'p',
417 'types' => 'rrrr',
418 },
419 'sat' =>
420 {
421 'func' => 1,
422 'opcode' => 20,
423 'parms' => 1,
424 'result' => 'r',
425 'types' => 'p',
426 },
427 'set' =>
428 {
429 'func' => 0,
430 'opcode' => 43,
431 'parms' => 1,
432 'result' => 'r',
433 'types' => 'r',
434 },
435 'setp' =>
436 {
437 'func' => 0,
438 'opcode' => 44,
439 'parms' => 1,
440 'result' => 'p',
441 'types' => 'p',
442 },
443 'sin' =>
444 {
445 'func' => 1,
446 'opcode' => 10,
447 'parms' => 1,
448 'result' => 'r',
449 'types' => 'r',
450 },
451 'sqrt' =>
452 {
453 'func' => 1,
454 'opcode' => 13,
455 'parms' => 1,
456 'result' => 'r',
457 'types' => 'r',
458 },
459 'subtract' =>
460 {
461 'func' => 0,
462 'opcode' => 1,
463 'parms' => 2,
464 'result' => 'r',
465 'types' => 'rr',
466 },
467 'subtractp' =>
468 {
469 'func' => 0,
470 'opcode' => 9,
471 'parms' => 2,
472 'result' => 'p',
473 'types' => 'pp',
474 },
475 'uminus' =>
476 {
477 'func' => 0,
478 'opcode' => 6,
479 'parms' => 1,
480 'result' => 'r',
481 'types' => 'r',
482 },
483 'value' =>
484 {
485 'func' => 1,
486 'opcode' => 18,
487 'parms' => 1,
488 'result' => 'r',
489 'types' => 'p',
490 },
491 );
84324192
AMH
492$MaxOperands = 4;
493$PackCode = "i";
4941;
495
496__END__
497
498=head1 NAME
499
500Imager::Regops - generated information about the register based VM
501
502=head1 SYNOPSIS
503
504 use Imager::Regops;
505 $Imager::Regops::Attr{$opname}->{opcode} # opcode for given operator
506 $Imager::Regops::Attr{$opname}->{parms} # number of parameters
507 $Imager::Regops::Attr{$opname}->{types} # types of parameters
508 $Imager::Regops::Attr{$opname}->{func} # operator is a function
509 $Imager::Regops::Attr{$opname}->{result} # r for numeric, p for pixel result
510 $Imager::Regops::MaxOperands; # maximum number of operands
511
512=head1 DESCRIPTION
513
514This module is generated automatically from regmach.h so we don't need to
515maintain the same information in at least one extra place.
516
517At least that's the idea.
518
519=head1 AUTHOR
520
521Tony Cook, tony@develop-help.com
522
523=head1 SEE ALSO
524
8f22b8d8 525perl(1), Imager(3), http://imager.perl.org/
84324192
AMH
526
527=cut
528