ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/libecb/ecb.pod
(Generate patch)

Comparing libecb/ecb.pod (file contents):
Revision 1.60 by sf-exg, Wed Feb 11 19:16:12 2015 UTC vs.
Revision 1.61 by sf-exg, Thu Feb 12 12:37:33 2015 UTC

183Marks a function or a variable as "unused", which simply suppresses a 183Marks a function or a variable as "unused", which simply suppresses a
184warning by GCC when it detects it as unused. This is useful when you e.g. 184warning by GCC when it detects it as unused. This is useful when you e.g.
185declare a variable but do not always use it: 185declare a variable but do not always use it:
186 186
187 { 187 {
188 int var ecb_unused; 188 ecb_unused int var;
189 189
190 #ifdef SOMECONDITION 190 #ifdef SOMECONDITION
191 var = ...; 191 var = ...;
192 return var; 192 return var;
193 #else 193 #else
245 245
246Example: multiply a vector, and allow the compiler to parallelise the 246Example: multiply a vector, and allow the compiler to parallelise the
247loop, because it knows it doesn't overwrite input values. 247loop, because it knows it doesn't overwrite input values.
248 248
249 void 249 void
250 multiply (float *ecb_restrict src, 250 multiply (ecb_restrict float *src,
251 float *ecb_restrict dst, 251 ecb_restrict float *dst,
252 int len, float factor) 252 int len, float factor)
253 { 253 {
254 int i; 254 int i;
255 255
256 for (i = 0; i < len; ++i) 256 for (i = 0; i < len; ++i)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines