-
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.
Updated VectorizedComputeBenchmark and ComputeLib
Fixed loadProgram() function to actually work for loading opencl code. Added res/clprograms/benchmarks.cl to include all opencl benchmark kernels instead of Strings. Removed all remaining context sharing code.
- Loading branch information
1 parent
c0aa7db
commit 51b33c6
Showing
3 changed files
with
26 additions
and
52 deletions.
There are no files selected for viewing
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
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,20 @@ | ||
kernel void loopsmmult(global float *c) { | ||
unsigned int xid = get_global_id(0); | ||
float id = (float)xid; | ||
float loopsum = 0.0f; | ||
for (int y=0;y<72;y++) { | ||
for (int x=0;x<128;x++) { | ||
loopsum += (id+x)*y; | ||
} | ||
} | ||
c[xid] = loopsum; | ||
} | ||
|
||
kernel void loopsfill(global float *img) { | ||
unsigned int xid = get_global_id(0); | ||
img[xid*5+0] = 0.0f; | ||
img[xid*5+1] = 0.0f; | ||
img[xid*5+2] = 0.0f; | ||
img[xid*5+3] = 0.0f; | ||
img[xid*5+4] = INFINITY; | ||
} |