Modular C
C◼int◼minmax: symbols inserted from C◼snippet◼minmax.
+ Collaboration diagram for C◼int◼minmax: symbols inserted from C◼snippet◼minmax.:
C◼int C◼int◼minv (__size n, C◼int volatile arr[n])
 Compute the minimum value of array arr. More...
 
C◼int C◼int◼maxv (__size n, C◼int volatile arr[n])
 Compute the minimum value of array arr. More...
 
#define C◼int◼min(...)   C◼int◼minv(C◼snippet◼minmax◼ALEN(C◼int, __VA_ARGS__), C◼snippet◼minmax◼ARRAY(C◼int, __VA_ARGS__))
 Compute the minimum of the argument list. More...
 
#define C◼int◼max(...)   C◼int◼maxv(C◼snippet◼minmax◼ALEN(C◼int, __VA_ARGS__), C◼snippet◼minmax◼ARRAY(C◼int, __VA_ARGS__))
 Compute the minimum of the argument list. More...
 

Detailed Description

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

This import does not fill any slots.

Macro Definition Documentation

§ C◼int◼max

#define C◼int◼max (   ...)    C◼int◼maxv(C◼snippet◼minmax◼ALEN(C◼int, __VA_ARGS__), C◼snippet◼minmax◼ARRAY(C◼int, __VA_ARGS__))

Compute the minimum of the argument list.

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

§ C◼int◼min

#define C◼int◼min (   ...)    C◼int◼minv(C◼snippet◼minmax◼ALEN(C◼int, __VA_ARGS__), C◼snippet◼minmax◼ARRAY(C◼int, __VA_ARGS__))

Compute the minimum of the argument list.

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

Function Documentation

§ C◼int◼maxv()

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

Compute the minimum value of array arr.

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

201  {
202 #line 39 "/home/gustedt/build/cmod/C/C-snippet-minmax.X"
203  C◼int ret = arr[0];
204  for (__size i = 1; i < n; ++i) {
205 #line 41 "/home/gustedt/build/cmod/C/C-snippet-minmax.X"
206  C◼int val = arr[i];
207  if (val > ret) ret = val;
208  }
209  return ret;
210 }
int C◼int
Definition: C-int.c:126

§ C◼int◼minv()

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

Compute the minimum value of array arr.

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

181  {
182 #line 21 "/home/gustedt/build/cmod/C/C-snippet-minmax.X"
183  C◼int ret = arr[0];
184  for (__size i = 1; i < n; ++i) {
185 #line 23 "/home/gustedt/build/cmod/C/C-snippet-minmax.X"
186  C◼int val = arr[i];
187  if (val < ret) ret = val;
188  }
189  return ret;
190 }
int C◼int
Definition: C-int.c:126