diff options
author | Zhigang Gong <gongzg@freedesktop.org> | 2014-12-04 23:32:02 -0800 |
---|---|---|
committer | Zhigang Gong <gongzg@freedesktop.org> | 2014-12-04 23:32:02 -0800 |
commit | fcea346f73d717b25a8e7fe5a5fed605a9b4e8e0 (patch) | |
tree | 47a692d459466e403538e3416b5798ca57c34607 /Software/Beignet/optimization-guide.mdwn | |
parent | 06c353eb5a2c433a0cedc9fd553de4b1aefeab57 (diff) |
format change.
Diffstat (limited to 'Software/Beignet/optimization-guide.mdwn')
-rw-r--r-- | Software/Beignet/optimization-guide.mdwn | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/Software/Beignet/optimization-guide.mdwn b/Software/Beignet/optimization-guide.mdwn index 15f07438..ae32ddbf 100644 --- a/Software/Beignet/optimization-guide.mdwn +++ b/Software/Beignet/optimization-guide.mdwn @@ -34,8 +34,8 @@ size. We have the following rules: If use SLM, here are a table: -| Amount of SLM | 0 | 4K | 8K | 16K | 32K | -| WorkGroup size| 16 | 64 | 128 | 256 | 512 | + | Amount of SLM | 0 | 4K | 8K | 16K | 32K | + | WorkGroup size| 16 | 64 | 128 | 256 | 512 | If use both barrier and table, need to follow the larger one. @@ -61,7 +61,7 @@ Memory Access Optimizations A bad example: -``` +``` ... uint private_buffer[32]; for (i = 0; i < xid; i++) { @@ -69,18 +69,18 @@ Memory Access Optimizations private_buffer[dynamic_idx % 10] = src1[xid]; ... } -``` +``` The following example is Ok for most cases: -``` +``` ... uint private_buffer[32]; for (i = 0; i < xid; i++) { private_buffer[xid % 32] = src1[xid]; ... } -``` +``` * Use SLM to reduce the memory bandwidth requirement if possible. @@ -137,3 +137,4 @@ Miscellaneous * Try to eliminate branching as much as possible. For example using min, max, clamp or select built-ins instead of if/else if possible. + |