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

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

Perform cumulative operation on the arguments.

Definition at line 349 of file C-int.c.

§ C◼int◼prod

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

Perform cumulative operation on the arguments.

Definition at line 329 of file C-int.c.

§ C◼int◼sub

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

Perform cumulative operation on the arguments.

Definition at line 309 of file C-int.c.

§ C◼int◼sum

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

Perform cumulative operation on the arguments.

Definition at line 289 of file C-int.c.

Function Documentation

§ C◼int◼divv()

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

Perform cumulative operation on array arr of length n.

Definition at line 338 of file C-int.c.

338  {
339 #line 31 "/home/gustedt/build/cmod/C/C-snippet-sum.X"
340  C◼int ret = arr[0];
341  for (__size i = 1; i < n; ++i)
342  ret C◼snippet◼sum◼divOp arr[i];
343  return ret;
344 }
int C◼int
Definition: C-int.c:126
#define C◼snippet◼sum◼divOp
Definition: C-snippet-sum.c:53

§ C◼int◼minus()

C◼int C◼int◼minus ( C◼int  x)
inline

Return the negation of x.

Definition at line 357 of file C-int.c.

357  {
358 #line 49 "/home/gustedt/build/cmod/C/C-snippet-sum.X"
359  return -x;
360 }

§ C◼int◼prodv()

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

Perform cumulative operation on array arr of length n.

Definition at line 318 of file C-int.c.

318  {
319 #line 31 "/home/gustedt/build/cmod/C/C-snippet-sum.X"
320  C◼int ret = arr[0];
321  for (__size i = 1; i < n; ++i)
322  ret C◼snippet◼sum◼prodOp arr[i];
323  return ret;
324 }
int C◼int
Definition: C-int.c:126
#define C◼snippet◼sum◼prodOp
Definition: C-snippet-sum.c:52

§ C◼int◼recip()

C◼int C◼int◼recip ( C◼int  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 370 of file C-int.c.

370  {
371 #line 61 "/home/gustedt/build/cmod/C/C-snippet-sum.X"
372  return 1.0f/x;
373 }

§ C◼int◼square()

C◼int C◼int◼square ( C◼int  x)
inline

Return the square of x.

Definition at line 379 of file C-int.c.

References C◼int◼_MODULE_CON.

379  {
380 #line 69 "/home/gustedt/build/cmod/C/C-snippet-sum.X"
381  return x*x;
382 }

§ C◼int◼subv()

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

Perform cumulative operation on array arr of length n.

Definition at line 298 of file C-int.c.

298  {
299 #line 31 "/home/gustedt/build/cmod/C/C-snippet-sum.X"
300  C◼int ret = arr[0];
301  for (__size i = 1; i < n; ++i)
302  ret C◼snippet◼sum◼subOp arr[i];
303  return ret;
304 }
int C◼int
Definition: C-int.c:126
#define C◼snippet◼sum◼subOp
Definition: C-snippet-sum.c:51

§ C◼int◼sumv()

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

Perform cumulative operation on array arr of length n.

Definition at line 278 of file C-int.c.

278  {
279 #line 31 "/home/gustedt/build/cmod/C/C-snippet-sum.X"
280  C◼int ret = arr[0];
281  for (__size i = 1; i < n; ++i)
282  ret C◼snippet◼sum◼sumOp arr[i];
283  return ret;
284 }
int C◼int
Definition: C-int.c:126
#define C◼snippet◼sum◼sumOp
Definition: C-snippet-sum.c:50