diff options
| author | dhuth <derickhuth@gmail.com> | 2014-08-27 09:52:06 -0600 | 
|---|---|---|
| committer | dhuth <derickhuth@gmail.com> | 2014-08-27 09:52:06 -0600 | 
| commit | bff810cc371a38f493d688c54f71013f5a7d53bf (patch) | |
| tree | fbe86954bb3c01deb21da9e41ebff5baa2889a45 /examples/chill/jacobi1.c | |
| download | chill-bff810cc371a38f493d688c54f71013f5a7d53bf.tar.gz chill-bff810cc371a38f493d688c54f71013f5a7d53bf.tar.bz2 chill-bff810cc371a38f493d688c54f71013f5a7d53bf.zip  | |
Initial commit
Diffstat (limited to 'examples/chill/jacobi1.c')
| -rw-r--r-- | examples/chill/jacobi1.c | 13 | 
1 files changed, 13 insertions, 0 deletions
diff --git a/examples/chill/jacobi1.c b/examples/chill/jacobi1.c new file mode 100644 index 0000000..0fcaee4 --- /dev/null +++ b/examples/chill/jacobi1.c @@ -0,0 +1,13 @@ +#define N 512 + +int main() { +	int i, t; + +	float a[N][N]; + +	for (t = 2; t <= 100; t++) +		for (i = 2; i <= N - 1; i++) +			a[t][i] = a[t - 1][i - 1] + a[t - 1][i] + a[t - 1][i + 1]; + +	return 0; +}  | 
