Further optimizations on SISD
This commit is contained in:
@@ -24,6 +24,7 @@ void tricorn_V2(float complex start, size_t width, ssize_t height, float res, un
|
|||||||
float c_start_imag = cimag(start);
|
float c_start_imag = cimag(start);
|
||||||
|
|
||||||
float c_imag = c_start_imag;
|
float c_imag = c_start_imag;
|
||||||
|
float vertical_step = imag_step * res;
|
||||||
size_t position = 0;
|
size_t position = 0;
|
||||||
|
|
||||||
|
|
||||||
@@ -33,7 +34,6 @@ void tricorn_V2(float complex start, size_t width, ssize_t height, float res, un
|
|||||||
// Calculate imaginary part on each row as it stays the same
|
// Calculate imaginary part on each row as it stays the same
|
||||||
|
|
||||||
float c_real = c_start_real;
|
float c_real = c_start_real;
|
||||||
|
|
||||||
for(size_t x = 0; x < width; x++){
|
for(size_t x = 0; x < width; x++){
|
||||||
unsigned value = converge(c_real,c_imag,n);
|
unsigned value = converge(c_real,c_imag,n);
|
||||||
|
|
||||||
@@ -52,7 +52,7 @@ void tricorn_V2(float complex start, size_t width, ssize_t height, float res, un
|
|||||||
c_real += res;
|
c_real += res;
|
||||||
|
|
||||||
}
|
}
|
||||||
c_imag -= imag_step * res;
|
c_imag -= vertical_step;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user