Skip to content

Commit b356d24

Browse files
committed
.
2 parents 3aee386 + 606c66b commit b356d24

3 files changed

Lines changed: 72 additions & 38 deletions

File tree

CImg.h

Lines changed: 70 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -20491,8 +20491,11 @@ namespace cimg_library {
2049120491
arg1 = compile(ss6,se1,depth1,0,block_flags);
2049220492
_cimg_mp_check_type(arg1,0,3,2);
2049320493
pos = vector(2);
20494-
if (is_scalar(arg1)) CImg<ulongT>::vector((ulongT)mp_complex_conj,pos,arg1,0).move_to(code);
20495-
else CImg<ulongT>::vector((ulongT)mp_complex_conj,pos,arg1 + 1,arg1 + 2).move_to(code);
20494+
if (is_scalar(arg1)) {
20495+
CImg<ulongT>::vector((ulongT)mp_vector_init,pos,2,2,0,arg1,0,0).move_to(code);
20496+
arg1 = pos;
20497+
}
20498+
CImg<ulongT>::vector((ulongT)mp_complex_conj,pos,2,arg1).move_to(code);
2049620499
return_comp = true;
2049720500
_cimg_mp_return(pos);
2049820501
}
@@ -20502,8 +20505,11 @@ namespace cimg_library {
2050220505
arg1 = compile(ss5,se1,depth1,0,block_flags);
2050320506
_cimg_mp_check_type(arg1,0,3,2);
2050420507
pos = vector(2);
20505-
if (is_scalar(arg1)) CImg<ulongT>::vector((ulongT)mp_complex_cos,pos,arg1,0).move_to(code);
20506-
else CImg<ulongT>::vector((ulongT)mp_complex_cos,pos,arg1 + 1,arg1 + 2).move_to(code);
20508+
if (is_scalar(arg1)) {
20509+
CImg<ulongT>::vector((ulongT)mp_vector_init,pos,2,2,0,arg1,0,0).move_to(code);
20510+
arg1 = pos;
20511+
}
20512+
CImg<ulongT>::vector((ulongT)mp_complex_cos,pos,2,arg1).move_to(code);
2050720513
return_comp = true;
2050820514
_cimg_mp_return(pos);
2050920515
}
@@ -20513,8 +20519,11 @@ namespace cimg_library {
2051320519
arg1 = compile(ss6,se1,depth1,0,block_flags);
2051420520
_cimg_mp_check_type(arg1,0,3,2);
2051520521
pos = vector(2);
20516-
if (is_scalar(arg1)) CImg<ulongT>::vector((ulongT)mp_complex_cosh,pos,arg1,0).move_to(code);
20517-
else CImg<ulongT>::vector((ulongT)mp_complex_cosh,pos,arg1 + 1,arg1 + 2).move_to(code);
20522+
if (is_scalar(arg1)) {
20523+
CImg<ulongT>::vector((ulongT)mp_vector_init,pos,2,2,0,arg1,0,0).move_to(code);
20524+
arg1 = pos;
20525+
}
20526+
CImg<ulongT>::vector((ulongT)mp_complex_cosh,pos,2,arg1).move_to(code);
2051820527
return_comp = true;
2051920528
_cimg_mp_return(pos);
2052020529
}
@@ -20532,8 +20541,11 @@ namespace cimg_library {
2053220541
arg1 = compile(ss5,se1,depth1,0,block_flags);
2053320542
_cimg_mp_check_type(arg1,0,3,2);
2053420543
pos = vector(2);
20535-
if (is_scalar(arg1)) CImg<ulongT>::vector((ulongT)mp_complex_exp,pos,arg1,0).move_to(code);
20536-
else CImg<ulongT>::vector((ulongT)mp_complex_exp,pos,arg1 + 1,arg1 + 2).move_to(code);
20544+
if (is_scalar(arg1)) {
20545+
CImg<ulongT>::vector((ulongT)mp_vector_init,pos,2,2,0,arg1,0,0).move_to(code);
20546+
arg1 = pos;
20547+
}
20548+
CImg<ulongT>::vector((ulongT)mp_complex_exp,pos,2,arg1).move_to(code);
2053720549
return_comp = true;
2053820550
_cimg_mp_return(pos);
2053920551
}
@@ -20543,8 +20555,11 @@ namespace cimg_library {
2054320555
arg1 = compile(ss5,se1,depth1,0,block_flags);
2054420556
_cimg_mp_check_type(arg1,0,3,2);
2054520557
pos = vector(2);
20546-
if (is_scalar(arg1)) CImg<ulongT>::vector((ulongT)mp_complex_log,pos,arg1,0).move_to(code);
20547-
else CImg<ulongT>::vector((ulongT)mp_complex_log,pos,arg1 + 1,arg1 + 2).move_to(code);
20558+
if (is_scalar(arg1)) {
20559+
CImg<ulongT>::vector((ulongT)mp_vector_init,pos,2,2,0,arg1,0,0).move_to(code);
20560+
arg1 = pos;
20561+
}
20562+
CImg<ulongT>::vector((ulongT)mp_complex_log,pos,2,arg1).move_to(code);
2054820563
return_comp = true;
2054920564
_cimg_mp_return(pos);
2055020565
}
@@ -21020,8 +21035,11 @@ namespace cimg_library {
2102021035
arg1 = compile(ss5,se1,depth1,0,block_flags);
2102121036
_cimg_mp_check_type(arg1,0,3,2);
2102221037
pos = vector(2);
21023-
if (is_scalar(arg1)) CImg<ulongT>::vector((ulongT)mp_complex_sin,pos,arg1,0).move_to(code);
21024-
else CImg<ulongT>::vector((ulongT)mp_complex_sin,pos,arg1 + 1,arg1 + 2).move_to(code);
21038+
if (is_scalar(arg1)) {
21039+
CImg<ulongT>::vector((ulongT)mp_vector_init,pos,2,2,0,arg1,0,0).move_to(code);
21040+
arg1 = pos;
21041+
}
21042+
CImg<ulongT>::vector((ulongT)mp_complex_sin,pos,2,arg1).move_to(code);
2102521043
return_comp = true;
2102621044
_cimg_mp_return(pos);
2102721045
}
@@ -21031,8 +21049,11 @@ namespace cimg_library {
2103121049
arg1 = compile(ss6,se1,depth1,0,block_flags);
2103221050
_cimg_mp_check_type(arg1,0,3,2);
2103321051
pos = vector(2);
21034-
if (is_scalar(arg1)) CImg<ulongT>::vector((ulongT)mp_complex_sinh,pos,arg1,0).move_to(code);
21035-
else CImg<ulongT>::vector((ulongT)mp_complex_sinh,pos,arg1 + 1,arg1 + 2).move_to(code);
21052+
if (is_scalar(arg1)) {
21053+
CImg<ulongT>::vector((ulongT)mp_vector_init,pos,2,2,0,arg1,0,0).move_to(code);
21054+
arg1 = pos;
21055+
}
21056+
CImg<ulongT>::vector((ulongT)mp_complex_sinh,pos,2,arg1).move_to(code);
2103621057
return_comp = true;
2103721058
_cimg_mp_return(pos);
2103821059
}
@@ -21042,8 +21063,11 @@ namespace cimg_library {
2104221063
arg1 = compile(ss5,se1,depth1,0,block_flags);
2104321064
_cimg_mp_check_type(arg1,0,3,2);
2104421065
pos = vector(2);
21045-
if (is_scalar(arg1)) CImg<ulongT>::vector((ulongT)mp_complex_sqr,pos,arg1,0).move_to(code);
21046-
else CImg<ulongT>::vector((ulongT)mp_complex_sqr,pos,arg1 + 1,arg1 + 2).move_to(code);
21066+
if (is_scalar(arg1)) {
21067+
CImg<ulongT>::vector((ulongT)mp_vector_init,pos,2,2,0,arg1,0,0).move_to(code);
21068+
arg1 = pos;
21069+
}
21070+
CImg<ulongT>::vector((ulongT)mp_complex_sqr,pos,2,arg1).move_to(code);
2104721071
return_comp = true;
2104821072
_cimg_mp_return(pos);
2104921073
}
@@ -21053,8 +21077,11 @@ namespace cimg_library {
2105321077
arg1 = compile(ss6,se1,depth1,0,block_flags);
2105421078
_cimg_mp_check_type(arg1,0,3,2);
2105521079
pos = vector(2);
21056-
if (is_scalar(arg1)) CImg<ulongT>::vector((ulongT)mp_complex_sqrt,pos,arg1,0).move_to(code);
21057-
else CImg<ulongT>::vector((ulongT)mp_complex_sqrt,pos,arg1 + 1,arg1 + 2).move_to(code);
21080+
if (is_scalar(arg1)) {
21081+
CImg<ulongT>::vector((ulongT)mp_vector_init,pos,2,2,0,arg1,0,0).move_to(code);
21082+
arg1 = pos;
21083+
}
21084+
CImg<ulongT>::vector((ulongT)mp_complex_sqrt,pos,2,arg1).move_to(code);
2105821085
return_comp = true;
2105921086
_cimg_mp_return(pos);
2106021087
}
@@ -21064,8 +21091,11 @@ namespace cimg_library {
2106421091
arg1 = compile(ss5,se1,depth1,0,block_flags);
2106521092
_cimg_mp_check_type(arg1,0,3,2);
2106621093
pos = vector(2);
21067-
if (is_scalar(arg1)) CImg<ulongT>::vector((ulongT)mp_complex_tan,pos,arg1,0).move_to(code);
21068-
else CImg<ulongT>::vector((ulongT)mp_complex_tan,pos,arg1 + 1,arg1 + 2).move_to(code);
21094+
if (is_scalar(arg1)) {
21095+
CImg<ulongT>::vector((ulongT)mp_vector_init,pos,2,2,0,arg1,0,0).move_to(code);
21096+
arg1 = pos;
21097+
}
21098+
CImg<ulongT>::vector((ulongT)mp_complex_tan,pos,2,arg1).move_to(code);
2106921099
return_comp = true;
2107021100
_cimg_mp_return(pos);
2107121101
}
@@ -21075,8 +21105,11 @@ namespace cimg_library {
2107521105
arg1 = compile(ss6,se1,depth1,0,block_flags);
2107621106
_cimg_mp_check_type(arg1,0,3,2);
2107721107
pos = vector(2);
21078-
if (is_scalar(arg1)) CImg<ulongT>::vector((ulongT)mp_complex_tanh,pos,arg1,0).move_to(code);
21079-
else CImg<ulongT>::vector((ulongT)mp_complex_tanh,pos,arg1 + 1,arg1 + 2).move_to(code);
21108+
if (is_scalar(arg1)) {
21109+
CImg<ulongT>::vector((ulongT)mp_vector_init,pos,2,2,0,arg1,0,0).move_to(code);
21110+
arg1 = pos;
21111+
}
21112+
CImg<ulongT>::vector((ulongT)mp_complex_tanh,pos,2,arg1).move_to(code);
2108021113
return_comp = true;
2108121114
_cimg_mp_return(pos);
2108221115
}
@@ -26505,24 +26538,24 @@ namespace cimg_library {
2650526538
}
2650626539

2650726540
static double mp_complex_conj(_cimg_math_parser& mp) {
26508-
const double real = _mp_arg(2), imag = _mp_arg(3);
2650926541
double *ptrd = &_mp_arg(1) + 1;
26542+
const double *const ptrs = &_mp_arg(3) + 1, real = ptrs[0], imag = ptrs[1];
2651026543
ptrd[0] = real;
2651126544
ptrd[1] = -imag;
2651226545
return cimg::type<double>::nan();
2651326546
}
2651426547

2651526548
static double mp_complex_cos(_cimg_math_parser& mp) {
26516-
const double real = _mp_arg(2), imag = _mp_arg(3);
2651726549
double *ptrd = &_mp_arg(1) + 1;
26550+
const double *const ptrs = &_mp_arg(3) + 1, real = ptrs[0], imag = ptrs[1];
2651826551
ptrd[0] = std::cos(real)*std::cosh(imag);
2651926552
ptrd[1] = -std::sin(real)*std::sinh(imag);
2652026553
return cimg::type<double>::nan();
2652126554
}
2652226555

2652326556
static double mp_complex_cosh(_cimg_math_parser& mp) {
26524-
const double real = _mp_arg(2), imag = _mp_arg(3);
2652526557
double *ptrd = &_mp_arg(1) + 1;
26558+
const double *const ptrs = &_mp_arg(3) + 1, real = ptrs[0], imag = ptrs[1];
2652626559
ptrd[0] = std::cosh(real)*std::cos(imag);
2652726560
ptrd[1] = std::sinh(real)*std::sin(imag);
2652826561
return cimg::type<double>::nan();
@@ -26553,16 +26586,17 @@ namespace cimg_library {
2655326586
}
2655426587

2655526588
static double mp_complex_exp(_cimg_math_parser& mp) {
26556-
const double real = _mp_arg(2), imag = _mp_arg(3), exp_real = std::exp(real);
2655726589
double *ptrd = &_mp_arg(1) + 1;
26590+
const double *const ptrs = &_mp_arg(3) + 1, real = ptrs[0], imag = ptrs[1],
26591+
exp_real = std::exp(real);
2655826592
ptrd[0] = exp_real*std::cos(imag);
2655926593
ptrd[1] = exp_real*std::sin(imag);
2656026594
return cimg::type<double>::nan();
2656126595
}
2656226596

2656326597
static double mp_complex_log(_cimg_math_parser& mp) {
26564-
const double real = _mp_arg(2), imag = _mp_arg(3);
2656526598
double *ptrd = &_mp_arg(1) + 1;
26599+
const double *const ptrs = &_mp_arg(3) + 1, real = ptrs[0], imag = ptrs[1];
2656626600
ptrd[0] = 0.5*std::log(real*real + imag*imag);
2656726601
ptrd[1] = std::atan2(imag,real);
2656826602
return cimg::type<double>::nan();
@@ -26646,51 +26680,51 @@ namespace cimg_library {
2664626680
}
2664726681

2664826682
static double mp_complex_sin(_cimg_math_parser& mp) {
26649-
const double real = _mp_arg(2), imag = _mp_arg(3);
2665026683
double *ptrd = &_mp_arg(1) + 1;
26684+
const double *const ptrs = &_mp_arg(3) + 1, real = ptrs[0], imag = ptrs[1];
2665126685
ptrd[0] = std::sin(real)*std::cosh(imag);
2665226686
ptrd[1] = std::cos(real)*std::sinh(imag);
2665326687
return cimg::type<double>::nan();
2665426688
}
2665526689

2665626690
static double mp_complex_sinh(_cimg_math_parser& mp) {
26657-
const double real = _mp_arg(2), imag = _mp_arg(3);
2665826691
double *ptrd = &_mp_arg(1) + 1;
26692+
const double *const ptrs = &_mp_arg(3) + 1, real = ptrs[0], imag = ptrs[1];
2665926693
ptrd[0] = std::sinh(real)*std::cos(imag);
2666026694
ptrd[1] = std::cosh(real)*std::sin(imag);
2666126695
return cimg::type<double>::nan();
2666226696
}
2666326697

2666426698
static double mp_complex_sqr(_cimg_math_parser& mp) {
26665-
const double real = _mp_arg(2), imag = _mp_arg(3);
2666626699
double *ptrd = &_mp_arg(1) + 1;
26700+
const double *const ptrs = &_mp_arg(3) + 1, real = ptrs[0], imag = ptrs[1];
2666726701
ptrd[0] = cimg::sqr(real) - cimg::sqr(imag);
2666826702
ptrd[1] = 2*real*imag;
2666926703
return cimg::type<double>::nan();
2667026704
}
2667126705

2667226706
static double mp_complex_sqrt(_cimg_math_parser& mp) {
26673-
const double
26674-
real = _mp_arg(2), imag = _mp_arg(3),
26675-
r = std::sqrt(cimg::hypot(real,imag)),
26676-
theta = std::atan2(imag,real)/2;
2667726707
double *ptrd = &_mp_arg(1) + 1;
26708+
const double *const ptrs = &_mp_arg(3) + 1, real = ptrs[0], imag = ptrs[1],
26709+
r = std::sqrt(cimg::hypot(real,imag)), theta = std::atan2(imag,real)/2;
2667826710
ptrd[0] = r*std::cos(theta);
2667926711
ptrd[1] = r*std::sin(theta);
2668026712
return cimg::type<double>::nan();
2668126713
}
2668226714

2668326715
static double mp_complex_tan(_cimg_math_parser& mp) {
26684-
const double real = _mp_arg(2), imag = _mp_arg(3), denom = std::cos(2*real) + std::cosh(2*imag);
2668526716
double *ptrd = &_mp_arg(1) + 1;
26717+
const double *const ptrs = &_mp_arg(3) + 1, real = ptrs[0], imag = ptrs[1],
26718+
denom = std::cos(2*real) + std::cosh(2*imag);
2668626719
ptrd[0] = std::sin(2*real)/denom;
2668726720
ptrd[1] = std::sinh(2*imag)/denom;
2668826721
return cimg::type<double>::nan();
2668926722
}
2669026723

2669126724
static double mp_complex_tanh(_cimg_math_parser& mp) {
26692-
const double real = _mp_arg(2), imag = _mp_arg(3), denom = std::cosh(2*real) + std::cos(2*imag);
2669326725
double *ptrd = &_mp_arg(1) + 1;
26726+
const double *const ptrs = &_mp_arg(3) + 1, real = ptrs[0], imag = ptrs[1],
26727+
denom = std::cosh(2*real) + std::cos(2*imag);
2669426728
ptrd[0] = std::sinh(2*real)/denom;
2669526729
ptrd[1] = std::sin(2*imag)/denom;
2669626730
return cimg::type<double>::nan();

html/header.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<div class="header">
1717
<a href="index.html"><img alt="Logo" src="img/logo_header.jpg" class="center_image" style="margin-top:1em;"/></a>
1818
<h2 style="padding-bottom: 1em">
19-
Latest stable version: <b><a href="http://cimg.eu/files/CImg_3.7.5.zip">3.7.5</a></b> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Current pre-release: <b><a href="http://cimg.eu/files/CImg_latest.zip">3.7.6</a></b> (2026/05/11)
19+
Latest stable version: <b><a href="http://cimg.eu/files/CImg_3.7.5.zip">3.7.5</a></b> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Current pre-release: <b><a href="http://cimg.eu/files/CImg_latest.zip">3.7.6</a></b> (2026/05/12)
2020
</h2>
2121

2222
<hr/>

html/header_doxygen.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
<div class="header">
2727
<a href="../index.html"><img alt="Logo" src="../img/logo_header.jpg" class="center_image" style="margin-top:1em;"/></a>
2828
<h2 style="padding-bottom: 1em">
29-
Latest stable version: <b><a href="http://cimg.eu/files/CImg_3.7.5.zip">3.7.5</a></b> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Current pre-release: <b><a href="http://cimg.eu/files/CImg_latest.zip">3.7.6</a></b> (2026/05/11)
29+
Latest stable version: <b><a href="http://cimg.eu/files/CImg_3.7.5.zip">3.7.5</a></b> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Current pre-release: <b><a href="http://cimg.eu/files/CImg_latest.zip">3.7.6</a></b> (2026/05/12)
3030
</h2>
3131

3232
<hr/>

0 commit comments

Comments
 (0)