summaryrefslogtreecommitdiff
path: root/examples/chill/unroll.c
diff options
context:
space:
mode:
authorDerick Huth <derickhuth@gmail.com>2014-09-11 18:04:37 -0600
committerDerick Huth <derickhuth@gmail.com>2014-09-11 18:04:37 -0600
commite87b55ad69f0ac6211daae741b32c8ee9dcbe470 (patch)
tree6c52a66b987cebe1dc902158f54896a542bd6cd4 /examples/chill/unroll.c
parent95f50d6f6f08f603441bb2f4e87dadfc81b46f74 (diff)
parent67a98949479fb70fb59dd6a4cdba8e812ffe40cd (diff)
downloadchill-e87b55ad69f0ac6211daae741b32c8ee9dcbe470.tar.gz
chill-e87b55ad69f0ac6211daae741b32c8ee9dcbe470.tar.bz2
chill-e87b55ad69f0ac6211daae741b32c8ee9dcbe470.zip
Merge pull request #1 from markhallutah/master
fixed some chill examples with use of uninitialized variables
Diffstat (limited to 'examples/chill/unroll.c')
-rw-r--r--examples/chill/unroll.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/examples/chill/unroll.c b/examples/chill/unroll.c
index 68f4633..e74dea3 100644
--- a/examples/chill/unroll.c
+++ b/examples/chill/unroll.c
@@ -1,6 +1,8 @@
+
#define N 14
+#define DT 0.314
+
void foo(int n, float* x, float* y, float* z, float* f3, float* f1, float* w) {
- int dt;
int i, j;
@@ -16,7 +18,7 @@ void foo(int n, float* x, float* y, float* z, float* f3, float* f1, float* w) {
for (i = 0; i <= N; i++) {
for (j = i; j <= i + N; j++)
f3[i] = f3[i] + f1[j] * w[j - i];
- f3[i] = f3[i] * dt;
+ f3[i] = f3[i] * DT;
}
return 0;