Modular C
C◼short◼sumprod: symbols inserted from C◼snippet◼sum.
+ Collaboration diagram for C◼short◼sumprod: symbols inserted from C◼snippet◼sum.:
C◼short C◼short◼sumv (__size n, C◼short volatile arr[n])
 Perform cumulative operation on array arr of length n. More...
 
C◼short C◼short◼subv (__size n, C◼short volatile arr[n])
 Perform cumulative operation on array arr of length n. More...
 
C◼short C◼short◼prodv (__size n, C◼short volatile arr[n])
 Perform cumulative operation on array arr of length n. More...
 
C◼short C◼short◼divv (__size n, C◼short volatile arr[n])
 Perform cumulative operation on array arr of length n. More...
 
C◼short C◼short◼minus (C◼short x)
 Return the negation of x. More...
 
C◼short C◼short◼recip (C◼short x)
 Return the inverse of x. More...
 
C◼short C◼short◼square (C◼short x)
 Return the square of x. More...
 
#define C◼short◼sum(...)   C◼short◼sumv(C◼snippet◼sum◼ALEN(C◼short, __VA_ARGS__), C◼snippet◼sum◼ARRAY(C◼short, __VA_ARGS__))
 Perform cumulative operation on the arguments. More...
 
#define C◼short◼sub(...)   C◼short◼subv(C◼snippet◼sum◼ALEN(C◼short, __VA_ARGS__), C◼snippet◼sum◼ARRAY(C◼short, __VA_ARGS__))
 Perform cumulative operation on the arguments. More...
 
#define C◼short◼prod(...)   C◼short◼prodv(C◼snippet◼sum◼ALEN(C◼short, __VA_ARGS__), C◼snippet◼sum◼ARRAY(C◼short, __VA_ARGS__))
 Perform cumulative operation on the arguments. More...
 
#define C◼short◼div(...)   C◼short◼divv(C◼snippet◼sum◼ALEN(C◼short, __VA_ARGS__), C◼snippet◼sum◼ARRAY(C◼short, __VA_ARGS__))
 Perform cumulative operation on the arguments. More...
 

Detailed Description

See also
C◼snippet◼sum snippet: identifiers inserted directly to an importer for details

This import does not fill any slots.

Macro Definition Documentation

§ C◼short◼div

#define C◼short◼div (   ...)    C◼short◼divv(C◼snippet◼sum◼ALEN(C◼short, __VA_ARGS__), C◼snippet◼sum◼ARRAY(C◼short, __VA_ARGS__))

Perform cumulative operation on the arguments.

Definition at line 343 of file C-short.c.

§ C◼short◼prod

#define C◼short◼prod (   ...)    C◼short◼prodv(C◼snippet◼sum◼ALEN(C◼short, __VA_ARGS__), C◼snippet◼sum◼ARRAY(C◼short, __VA_ARGS__))

Perform cumulative operation on the arguments.

Definition at line 323 of file C-short.c.

§ C◼short◼sub

#define C◼short◼sub (   ...)    C◼short◼subv(C◼snippet◼sum◼ALEN(C◼short, __VA_ARGS__), C◼snippet◼sum◼ARRAY(C◼short, __VA_ARGS__))

Perform cumulative operation on the arguments.

Definition at line 303 of file C-short.c.

§ C◼short◼sum

#define C◼short◼sum (   ...)    C◼short◼sumv(C◼snippet◼sum◼ALEN(C◼short, __VA_ARGS__), C◼snippet◼sum◼ARRAY(C◼short, __VA_ARGS__))

Perform cumulative operation on the arguments.

Definition at line 283 of file C-short.c.

Function Documentation

§ C◼short◼divv()

C◼short C◼short◼divv ( __size  n,
C◼short volatile  arr[n] 
)
inline

Perform cumulative operation on array arr of length n.

Definition at line 332 of file C-short.c.

332  {
333 #line 31 "/home/gustedt/build/cmod/C/C-snippet-sum.X"
334  C◼short ret = arr[0];
335  for (__size i = 1; i < n; ++i)
336  ret C◼snippet◼sum◼divOp arr[i];
337  return ret;
338 }
short C◼short
Definition: C-short.c:124
#define C◼snippet◼sum◼divOp
Definition: C-snippet-sum.c:53

§ C◼short◼minus()

C◼short C◼short◼minus ( C◼short  x)
inline

Return the negation of x.

Definition at line 351 of file C-short.c.

351  {
352 #line 49 "/home/gustedt/build/cmod/C/C-snippet-sum.X"
353  return -x;
354 }

§ C◼short◼prodv()

C◼short C◼short◼prodv ( __size  n,
C◼short volatile  arr[n] 
)
inline

Perform cumulative operation on array arr of length n.

Definition at line 312 of file C-short.c.

312  {
313 #line 31 "/home/gustedt/build/cmod/C/C-snippet-sum.X"
314  C◼short ret = arr[0];
315  for (__size i = 1; i < n; ++i)
316  ret C◼snippet◼sum◼prodOp arr[i];
317  return ret;
318 }
short C◼short
Definition: C-short.c:124
#define C◼snippet◼sum◼prodOp
Definition: C-snippet-sum.c:52

§ C◼short◼recip()

C◼short C◼short◼recip ( C◼short  x)
inline

Return the inverse of x.

This computes floating point inverse of x, but then returns a value of type T. This makes only sense for floating point types, at the moment.

Definition at line 364 of file C-short.c.

364  {
365 #line 61 "/home/gustedt/build/cmod/C/C-snippet-sum.X"
366  return 1.0f/x;
367 }

§ C◼short◼square()

C◼short C◼short◼square ( C◼short  x)
inline

Return the square of x.

Definition at line 373 of file C-short.c.

References C◼short◼_MODULE_CON.

373  {
374 #line 69 "/home/gustedt/build/cmod/C/C-snippet-sum.X"
375  return x*x;
376 }

§ C◼short◼subv()

C◼short C◼short◼subv ( __size  n,
C◼short volatile  arr[n] 
)
inline

Perform cumulative operation on array arr of length n.

Definition at line 292 of file C-short.c.

292  {
293 #line 31 "/home/gustedt/build/cmod/C/C-snippet-sum.X"
294  C◼short ret = arr[0];
295  for (__size i = 1; i < n; ++i)
296  ret C◼snippet◼sum◼subOp arr[i];
297  return ret;
298 }
short C◼short
Definition: C-short.c:124
#define C◼snippet◼sum◼subOp
Definition: C-snippet-sum.c:51

§ C◼short◼sumv()

C◼short C◼short◼sumv ( __size  n,
C◼short volatile  arr[n] 
)
inline

Perform cumulative operation on array arr of length n.

Definition at line 272 of file C-short.c.

272  {
273 #line 31 "/home/gustedt/build/cmod/C/C-snippet-sum.X"
274  C◼short ret = arr[0];
275  for (__size i = 1; i < n; ++i)
276  ret C◼snippet◼sum◼sumOp arr[i];
277  return ret;
278 }
short C◼short
Definition: C-short.c:124
#define C◼snippet◼sum◼sumOp
Definition: C-snippet-sum.c:50