diff options
| author | David Phillips <dbphillipsnz@gmail.com> | 2015-07-27 16:40:31 +1200 | 
|---|---|---|
| committer | David Phillips <dbphillipsnz@gmail.com> | 2015-07-27 19:38:29 +1200 | 
| commit | 6287ffad1db78798eb67f0b73194ba465118bafd (patch) | |
| tree | 9b4963c974fce308b5339e09a49a27cc74fdb74e | |
| parent | c7a880b18c7880daa461e655cf5c7085a49451b4 (diff) | |
| download | fractal-gen-6287ffad1db78798eb67f0b73194ba465118bafd.tar.xz | |
Reverted to max threads when clustering
| -rw-r--r-- | fractal-gen.c | 10 | 
1 files changed, 5 insertions, 5 deletions
diff --git a/fractal-gen.c b/fractal-gen.c index e8ff501..dc30e8d 100644 --- a/fractal-gen.c +++ b/fractal-gen.c @@ -62,10 +62,10 @@ int main(int argc, char **argv)  		return EXIT_FAILURE;  	} -	if (argc != 4 && argc != 5 && argc != 7) +	if (argc < 4 || argc > 6)  	{  		fprintf(stderr, "%s size iterat power [threads]\n" -		                "%s size iterat power threads cluster-id] cluster-total\n", argv[0], argv[0]); +		                "%s size iterat power cluster-id cluster-total\n", argv[0], argv[0]);  		return EXIT_FAILURE;  	} @@ -78,9 +78,9 @@ int main(int argc, char **argv)  	 * - our ID in cluster  	 * - total members in cluster  	 */ -	cores = (argc == 5 || argc == 7)? atoi(argv[4]) : sysconf(_SC_NPROCESSORS_ONLN); 	// Screw maintainability ;) -	clust_id = argc == 7? atoi(argv[5]) : 0; -	clust_total = argc == 7? atoi(argv[6]) : 1; +	cores = (argc == 5)? atoi(argv[4]) : sysconf(_SC_NPROCESSORS_ONLN); 	// Screw maintainability ;) +	clust_id = argc == 6? atoi(argv[4]) : 0; +	clust_total = argc == 6? atoi(argv[5]) : 1;  	// Interlacing is column-based, can't have more workers than columns  	if (cores > size)  | 
