diff options
Diffstat (limited to 'algorithms')
| -rw-r--r-- | algorithms/burning-ship-lattice.c | 12 | ||||
| -rw-r--r-- | algorithms/burning-ship.c | 12 | ||||
| -rw-r--r-- | algorithms/mandelbrot.c | 12 | 
3 files changed, 18 insertions, 18 deletions
diff --git a/algorithms/burning-ship-lattice.c b/algorithms/burning-ship-lattice.c index 60851cc..cb3e268 100644 --- a/algorithms/burning-ship-lattice.c +++ b/algorithms/burning-ship-lattice.c @@ -42,12 +42,12 @@ void *generate_burning_ship_lattice_section(void *section)  	double left = -1.8f;  	/* FIXME document this */ -	b = (d->core*(size_units/size)+top); +	b = clust_id*(size_units/size)+top; /* FIXME document this */ -	for (y = d->core; y < size; y += cores) +	for (y = clust_id; y < size; y+=clust_total)  	{ -		a = clust_id*(size_units/size)+left; /* FIXME document this */ -		for (x = clust_id; x < size; x+=clust_total) +		a = d->core*(size_units/size)+left; +		for (x = d->core; x < size; x += cores)  		{  			z = 0;  			c = a+I*b; @@ -59,9 +59,9 @@ void *generate_burning_ship_lattice_section(void *section)  				z = cpow( fabs(creal(z)) + I*fabs(cimag(z)) , power) + c;  			}  			d->data[d->idx++] = (255*i)/iterat; -			a += (clust_total*size_units)/size; +			a += cores*(size_units/size);  		} -		b += (cores*size_units)/size; +		b += clust_total*(size_units/size);  	}  	return NULL;  } diff --git a/algorithms/burning-ship.c b/algorithms/burning-ship.c index 5f14c1d..6aea927 100644 --- a/algorithms/burning-ship.c +++ b/algorithms/burning-ship.c @@ -38,12 +38,12 @@ void *generate_burning_ship_section(void *section)  	double left = -2.2f;  	/* FIXME document this */ -	b = (d->core*(size_units/size)+top); +	b = clust_id*(size_units/size)+top; /* FIXME document this */ -	for (y = d->core; y < size; y += cores) +	for (y = clust_id; y < size; y += clust_total)  	{ -		a = clust_id*(size_units/size)+left; /* FIXME document this */ -		for (x = clust_id; x < size; x+=clust_total) +		a = d->core*(size_units/size)+left; +		for (x = d->core; x < size; x += cores)  		{  			z = 0;  			c = a+I*b; @@ -55,9 +55,9 @@ void *generate_burning_ship_section(void *section)  				z = cpow( fabs(creal(z)) + I*fabs(cimag(z)) , power) + c;  			}  			d->data[d->idx++] = (255*i)/iterat; -			a += (clust_total*size_units)/size; +			a += cores*(size_units/size);  		} -		b += (cores*size_units)/size; +		b += clust_total*(size_units/size);  	}  	return NULL;  } diff --git a/algorithms/mandelbrot.c b/algorithms/mandelbrot.c index 1f95843..2d0a2b4 100644 --- a/algorithms/mandelbrot.c +++ b/algorithms/mandelbrot.c @@ -39,12 +39,12 @@ void *generate_mandelbrot_section(void *section)  	/* FIXME document this */ -	b = (d->core*(size_units/size)+top); +	b = clust_id*(size_units/size)+top; /* FIXME document this */ -	for (y = d->core; y < size; y += cores) +	for (y = clust_id; y < size; y += clust_total)  	{ -		a = clust_id*(size_units/size)+left; /* FIXME document this */ -		for (x = clust_id; x < size; x+=clust_total) +		a = d->core*(size_units/size)+left; +		for (x = d->core; x < size; x += cores)  		{  			z = 0;  			c = a + I*b; @@ -56,9 +56,9 @@ void *generate_mandelbrot_section(void *section)  				z = cpow(z , power) + c;  			}  			d->data[d->idx++] = (255*i)/iterat; -			a += (clust_total*size_units)/size; +			a += cores*(size_units/size);  		} -		b += (cores*size_units)/size; +		b += clust_total*(size_units/size);  	}  	return NULL;  }  | 
