-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Start implement new versions of life
- Loading branch information
Showing
7 changed files
with
90 additions
and
0 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
__kernel void life_ocl (__global unsigned *in, __global unsigned *out) | ||
{ | ||
|
||
} | ||
|
||
// DO NOT MODIFY: this kernel updates the OpenGL texture buffer | ||
// This is a life-specific version (generic version is defined in common.cl) | ||
__kernel void life_update_texture (__global unsigned *cur, __write_only image2d_t tex) | ||
{ | ||
int y = get_global_id (1); | ||
int x = get_global_id (0); | ||
|
||
// write_imagef (tex, (int2)(x, y), color_scatter (cur [y * DIM + x] * 0xFFFF00FF)); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/usr/bin/env bash | ||
|
||
if [ -z $1 ] | ||
then | ||
exit 1 | ||
fi | ||
|
||
ITERATIONS="500 1000 5000" | ||
SIZE=2176 | ||
VERSION="octa_off" | ||
LIFE_CONFIG=$1 | ||
|
||
for iter in $ITERATIONS | ||
do | ||
./run -k life -v $LIFE_CONFIG -s $SIZE -a $VERSION -du -n -i $iter | ||
|
||
TRUTH="dumps/dump-life-seq-dim-$SIZE-iter-$iter.png" | ||
GENERATED="dump-life-$LIFE_CONFIG-dim-$SIZE-iter-$iter.png" | ||
|
||
diff $GENERATED $TRUTH | ||
equal=$? | ||
|
||
rm $GENERATED | ||
|
||
if [ $equal -ne 0 ] | ||
then | ||
exit 1 | ||
fi | ||
done | ||
|
||
exit 0 |