Changeset 1cdfa82 for doc/papers/general/Paper.tex
- Timestamp:
- Apr 25, 2018, 4:55:53 PM (7 years ago)
- Branches:
- new-env, with_gc
- Children:
- 42107b4
- Parents:
- 2efe4b8 (diff), 9d5fb67 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/papers/general/Paper.tex
r2efe4b8 r1cdfa82 8 8 9 9 \raggedbottom 10 11 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 12 13 % Latex packages used in the document. 10 14 11 15 \usepackage{epic,eepic} … … 14 18 \usepackage{upquote} % switch curled `'" to straight 15 19 \usepackage{listings} % format program code 20 \captionsetup{justification=raggedright,singlelinecheck=false} 16 21 %\usepackage{enumitem} 17 22 %\setlist[itemize]{topsep=3pt,itemsep=2pt,parsep=0pt}% global 18 23 %\usepackage{rotating} 24 25 \hypersetup{breaklinks=true} 19 26 \definecolor{ForestGreen}{cmyk}{1, 0, 0.99995, 0} 20 \hypersetup{breaklinks=true}21 27 22 28 \usepackage[pagewise]{lineno} 23 29 \renewcommand{\linenumberfont}{\scriptsize\sffamily} 24 30 25 \lefthyphenmin=4 % hyphen only after 4 characters 26 \righthyphenmin=4 31 \lefthyphenmin=3 % hyphen only after 4 characters 32 \righthyphenmin=3 33 34 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 27 35 28 36 % Names used in the document. … … 79 87 % Latin abbreviation 80 88 \newcommand{\abbrevFont}{\textit} % set empty for no italics 81 \newcommand{\EG}{\abbrevFont{e}.\abbrevFont{g}.} 89 \@ifundefined{eg}{ 90 \newcommand{\EG}{\abbrevFont{e}\abbrevFont{g}} 82 91 \newcommand*{\eg}{% 83 92 \@ifnextchar{,}{\EG}% 84 93 {\@ifnextchar{:}{\EG}% 85 94 {\EG,\xspace}}% 86 }% 87 \newcommand{\IE}{\abbrevFont{i}.\abbrevFont{e}.} 95 }}{}% 96 \@ifundefined{ie}{ 97 \newcommand{\IE}{\abbrevFont{i}\abbrevFont{e}} 88 98 \newcommand*{\ie}{% 89 99 \@ifnextchar{,}{\IE}% 90 100 {\@ifnextchar{:}{\IE}% 91 101 {\IE,\xspace}}% 92 }% 102 }}{}% 103 \@ifundefined{etc}{ 93 104 \newcommand{\ETC}{\abbrevFont{etc}} 94 105 \newcommand*{\etc}{% 95 106 \@ifnextchar{.}{\ETC}% 96 107 {\ETC.\xspace}% 97 }% 98 %\newcommand{\ETAL}{\abbrevFont{et}~\abbrevFont{al}} 99 %\newcommand*{\etal}{% 100 % \@ifnextchar{.}{\protect\ETAL}% 101 % {\protect\ETAL.\xspace}% 102 %}% 108 }}{}% 109 \@ifundefined{etal}{ 110 \newcommand{\ETAL}{\abbrevFont{et}~\abbrevFont{al}} 111 \newcommand*{\etal}{% 112 \@ifnextchar{.}{\protect\ETAL}% 113 {\protect\ETAL.\xspace}% 114 }}{}% 115 \@ifundefined{viz}{ 103 116 \newcommand{\VIZ}{\abbrevFont{viz}} 104 117 \newcommand*{\viz}{% 105 118 \@ifnextchar{.}{\VIZ}% 106 119 {\VIZ.\xspace}% 107 } %120 }}{}% 108 121 \makeatother 109 122 … … 118 131 \lstdefinelanguage{CFA}[ANSI]{C}{ 119 132 morekeywords={ 120 _Alignas, _Alignof, __alignof, __alignof__, asm, __asm, __asm__, _At, __attribute, 121 __attribute__, auto, _Bool, catch, catchResume, choose, _Complex, __complex, __complex__, 122 __const, __const__, disable, dtype, enable, exception, __extension__, fallthrough, fallthru, 123 finally, forall, ftype, _Generic, _Imaginary, inline, __label__, lvalue, _Noreturn, one_t, 124 otype, restrict, _Static_assert, throw, throwResume, trait, try, ttype, typeof, __typeof, 125 __typeof__, virtual, with, zero_t}, 126 morekeywords=[2]{ 127 _Atomic, coroutine, is_coroutine, is_monitor, is_thread, monitor, mutex, nomutex, or, 128 resume, suspend, thread, _Thread_local, waitfor, when, yield}, 133 _Alignas, _Alignof, __alignof, __alignof__, asm, __asm, __asm__, __attribute, __attribute__, 134 auto, _Bool, catch, catchResume, choose, _Complex, __complex, __complex__, __const, __const__, 135 coroutine, disable, dtype, enable, exception, __extension__, fallthrough, fallthru, finally, 136 __float80, float80, __float128, float128, forall, ftype, _Generic, _Imaginary, __imag, __imag__, 137 inline, __inline, __inline__, __int128, int128, __label__, monitor, mutex, _Noreturn, one_t, or, 138 otype, restrict, __restrict, __restrict__, __signed, __signed__, _Static_assert, thread, 139 _Thread_local, throw, throwResume, timeout, trait, try, ttype, typeof, __typeof, __typeof__, 140 virtual, __volatile, __volatile__, waitfor, when, with, zero_t}, 129 141 moredirectives={defined,include_next}% 130 142 } … … 147 159 literate={-}{\makebox[1ex][c]{\raisebox{0.4ex}{\rule{0.8ex}{0.1ex}}}}1 {^}{\raisebox{0.6ex}{$\scriptstyle\land\,$}}1 148 160 {~}{\raisebox{0.3ex}{$\scriptstyle\sim\,$}}1 % {`}{\ttfamily\upshape\hspace*{-0.1ex}`}1 149 {<-}{$\leftarrow$}2 {=>}{$\Rightarrow$}2 {->}{\makebox[1ex][c]{\raisebox{0. 5ex}{\rule{0.8ex}{0.075ex}}}\kern-0.2ex{\textgreater}}2,161 {<-}{$\leftarrow$}2 {=>}{$\Rightarrow$}2 {->}{\makebox[1ex][c]{\raisebox{0.4ex}{\rule{0.8ex}{0.075ex}}}\kern-0.2ex{\textgreater}}2, 150 162 moredelim=**[is][\color{red}]{`}{`}, 151 163 }% lstset … … 158 170 {} 159 171 160 161 \ begin{document}162 \linenumbers % comment out to turn off line numbering 172 % inline code @...@ 173 \lstMakeShortInline@% 174 163 175 164 176 \title{\texorpdfstring{\protect\CFA : Adding Modern Programming Language Features to C}{Cforall : Adding Modern Programming Language Features to C}} … … 167 179 \author[1]{Robert Schluntz} 168 180 \author[1]{Peter A. Buhr*} 169 170 \address[1]{\orgdiv{David R. Cheriton School of Computer Science}, \orgname{University of Waterloo}, \orgaddress{\state{Ontario}, \country{Canada}}} 171 172 %\corres{*Aaron Moss, \email{a3moss@uwaterloo.ca}} 173 \corres{*Peter A. Buhr, \email{pabuhr@uwaterloo.ca}} 174 \presentaddress{David R. Cheriton School of Computer Science, University of Waterloo, Waterloo, ON, N2L 3G1, Canada} 175 176 % inline code @...@ 177 \lstMakeShortInline@% 178 181 \authormark{MOSS \textsc{et al}} 182 183 \address[1]{\orgdiv{Cheriton School of Computer Science}, \orgname{University of Waterloo}, \orgaddress{\state{Waterloo, ON}, \country{Canada}}} 184 185 \corres{*Peter A. Buhr, Cheriton School of Computer Science, University of Waterloo, 200 University Avenue West, Waterloo, ON, N2L 3G1, Canada. \email{pabuhr{\char`\@}uwaterloo.ca}} 186 187 \fundingInfo{Natural Sciences and Engineering Research Council of Canada} 179 188 180 189 \abstract[Summary]{ … … 191 200 192 201 \keywords{generic types, tuple types, variadic types, polymorphic functions, C, Cforall} 202 203 204 \begin{document} 205 \linenumbers % comment out to turn off line numbering 193 206 194 207 \maketitle … … 214 227 Love it or hate it, C is extremely popular, highly used, and one of the few systems languages. 215 228 In many cases, \CC is often used solely as a better C. 216 N onetheless, C, first standardized over thirty years ago, lacks many features that make programming in more modern languages safer and more productive.217 218 \CFA (pronounced ``C-for-all'', and written \CFA or Cforall) is an evolutionary extension of the C programming language that aims to add modern language features to C while maintaining both source compatibility with C and a familiar programming model for programmers.229 Nevertheless, C, first standardized over thirty years ago, lacks many features that make programming in more modern languages safer and more productive. 230 231 \CFA (pronounced ``C-for-all'', and written \CFA or Cforall) is an evolutionary extension of the C programming language that aims to add modern language features to C, while maintaining both source and runtime compatibility with C and a familiar programming model for programmers. 219 232 The four key design goals for \CFA~\cite{Bilson03} are: 220 233 (1) The behaviour of standard C code must remain the same when translated by a \CFA compiler as when translated by a C compiler; … … 316 329 A simple example is leveraging the existing type-unsafe (@void *@) C @bsearch@ to binary search a sorted float array: 317 330 \begin{cfa} 318 void * bsearch( const void * key, const void * base, size_t nmemb, size_t size, 319 int (* compar)( const void *, const void * )); 331 void * bsearch( const void * key, const void * base, size_t nmemb, size_t size, int (* compar)( const void *, const void * )); 320 332 int comp( const void * t1, const void * t2 ) { 321 333 return *(double *)t1 < *(double *)t2 ? -1 : *(double *)t2 < *(double *)t1 ? 1 : 0; … … 324 336 double * val = (double *)bsearch( &key, vals, 10, sizeof(vals[0]), comp ); $\C{// search sorted array}$ 325 337 \end{cfa} 326 which can be augmented simply with ageneralized, type-safe, \CFA-overloaded wrappers:338 which can be augmented simply with generalized, type-safe, \CFA-overloaded wrappers: 327 339 \begin{cfa} 328 340 forall( otype T | { int ?<?( T, T ); } ) T * bsearch( T key, const T * arr, size_t size ) { … … 386 398 T ?++( T * ); 387 399 }; 388 forall( otype T `| summable( T )` ) T sum( T a[$\,$], size_t size ) { // use trait400 forall( otype T `| summable( T )` ) T sum( T a[$\,$], size_t size ) {$\C{// use trait}$ 389 401 `T` total = { `0` }; $\C{// instantiate T from 0 by calling its constructor}$ 390 402 for ( unsigned int i = 0; i < size; i += 1 ) total `+=` a[i]; $\C{// select appropriate +}$ … … 564 576 return (scalar(U)){ a.value + b.value }; 565 577 } 566 scalar(metres) half_marathon = { 21 093 };567 scalar(litres) swimming_pool = { 2 500000 };578 scalar(metres) half_marathon = { 21_093 }; 579 scalar(litres) swimming_pool = { 2_500_000 }; 568 580 scalar(metres) marathon = half_marathon + half_marathon; 569 581 scalar(litres) two_pools = swimming_pool + swimming_pool; … … 663 675 \begin{cfa} 664 676 int f( int, int ); 665 intg( [int, int] );666 inth( int, [int, int] );677 [int] g( [int, int] ); 678 [int] h( int, [int, int] ); 667 679 [int, int] x; 668 680 int y; … … 698 710 This example shows mass, multiple, and cascading assignment used in one expression: 699 711 \begin{cfa} 700 voidf( [int, int] );712 [void] f( [int, int] ); 701 713 f( [x, y] = z = 1.5 ); $\C{// assignments in parameter list}$ 702 714 \end{cfa} … … 712 724 \end{cfa} 713 725 Here, the mass assignment sets all members of @s@ to zero. 714 Since tuple-index expressions are a form of member-access expression, it is possible to use tuple-index expressions in conjunction with member 726 Since tuple-index expressions are a form of member-access expression, it is possible to use tuple-index expressions in conjunction with member-tuple expressions to manually restructure a tuple (\eg rearrange, drop, and duplicate components). 715 727 \begin{cfa} 716 728 [int, int, long, double] x; … … 806 818 Flattening and restructuring conversions are also applied to tuple types in polymorphic type assertions. 807 819 \begin{cfa} 808 intf( [int, double], double );820 [int] f( [int, double], double ); 809 821 forall( otype T, otype U | { T f( T, U, U ); } ) void g( T, U ); 810 822 g( 5, 10.21 ); … … 1021 1033 \lstMakeShortInline@% 1022 1034 \end{cquote} 1023 for a contiguous list:\footnote{gcc has the same mechanism but awkward syntax, \lstinline@2 ...42@, because a space is required after a number, otherwise theperiod is a decimal point.}1035 for a contiguous list:\footnote{gcc has the same mechanism but awkward syntax, \lstinline@2 ...42@, as a space is required after a number, otherwise the first period is a decimal point.} 1024 1036 \begin{cquote} 1025 1037 \lstDeleteShortInline@% … … 1118 1130 1119 1131 Finally, Figure~\ref{f:FallthroughStatement} shows @fallthrough@ may appear in contexts other than terminating a @case@ clause, and have an explicit transfer label allowing separate cases but common final-code for a set of cases. 1120 The target label must be below the @fallthrough@ , \ie @fallthrough@ cannot form a loop, and the label may not be nested in a control structure, \ie it must be at the same level as the @case@ clauses;1121 the target label may be case @default@ .1132 The target label must be below the @fallthrough@ and may not be nested in a control structure, \ie @fallthrough@ cannot form a loop, and the target label must be at the same or higher level as the containing @case@ clause and located at the same level as a @case@ clause; 1133 the target label may be case @default@, but only associated with the current @switch@/@choose@ statement. 1122 1134 1123 1135 \begin{figure} … … 1144 1156 case 4: 1145 1157 ... `fallthrough common;` 1146 common: // below fallthrough at same level as case clauses1158 `common`: // below fallthrough at same level as case clauses 1147 1159 ... // common code for cases 3 and 4 1148 1160 // implicit break … … 1154 1166 \label{f:FallthroughStatement} 1155 1167 \end{figure} 1156 1157 Collectively, these control-structure enhancements reduce programmer burden and increase readability and safety.1158 1168 1159 1169 … … 1526 1536 \end{cfa} 1527 1537 1538 Collectively, these control-structure enhancements reduce programmer burden and increase readability and safety. 1539 1528 1540 1529 1541 \section{Declarations} … … 1849 1861 \begin{cfa} 1850 1862 struct S { double x, y; }; 1851 int i, j;1863 int x, y; 1852 1864 void f( int & i, int & j, S & s, int v[] ); 1853 f( 3, i + j, (S){ 1.0, 7.0 }, (int [3]){ 1, 2, 3 } );$\C{// pass rvalue to lvalue \(\Rightarrow\) implicit temporary}$1865 f( 3, x + y, (S){ 1.0, 7.0 }, (int [3]){ 1, 2, 3 } ); $\C{// pass rvalue to lvalue \(\Rightarrow\) implicit temporary}$ 1854 1866 \end{cfa} 1855 1867 This allows complex values to be succinctly and efficiently passed to functions, without the syntactic overhead of explicit definition of a temporary variable or the runtime cost of pass-by-value. … … 1867 1879 \lstDeleteShortInline@% 1868 1880 \begin{tabular}{@{}l@{\hspace{3em}}l|l@{}} 1869 \multicolumn{1}{c@{\hspace{3em}}}{\textbf{C Type Nesting}} & \multicolumn{1}{c }{\textbf{C Implicit Hoisting}} & \multicolumn{1}{|c}{\textbf{\CFA}} \\1881 \multicolumn{1}{c@{\hspace{3em}}}{\textbf{C Type Nesting}} & \multicolumn{1}{c|}{\textbf{C Implicit Hoisting}} & \multicolumn{1}{c}{\textbf{\CFA}} \\ 1870 1882 \hline 1871 1883 \begin{cfa} … … 1938 1950 1939 1951 One of the strengths (and weaknesses) of C is memory-management control, allowing resource release to be precisely specified versus unknown release with garbage-collected memory-management. 1940 However, this manual approach is oftenverbose, and it is useful to manage resources other than memory (\eg file handles) using the same mechanism as memory.1952 However, this manual approach is verbose, and it is useful to manage resources other than memory (\eg file handles) using the same mechanism as memory. 1941 1953 \CC addresses these issues using Resource Aquisition Is Initialization (RAII), implemented by means of \newterm{constructor} and \newterm{destructor} functions; 1942 1954 \CFA adopts constructors and destructors (and @finally@) to facilitate RAII. … … 1990 2002 { 1991 2003 VLA x, y = { 20, 0x01 }, z = y; $\C{// z points to y}$ 1992 // ?{}( x ); ?{}( y, 20, 0x01 );?{}( z, y );2004 // ?{}( x ); ?{}( y, 20, 0x01 ); ?{}( z, y ); 1993 2005 ^x{}; $\C{// deallocate x}$ 1994 2006 x{}; $\C{// reallocate x}$ … … 2015 2027 These semantics closely mirror the rule for implicit declaration of constructors in \CC\cite[p.~186]{ANSI98:C++}. 2016 2028 2017 In some circumstance programmers may not wish to have constructor and destructor calls. 2018 In these cases, \CFA provides the initialization syntax \lstinline|S x @= {}|, and the object becomes unmanaged, so implicit constructor and destructor calls are not generated. 2019 Any C initializer can be the right-hand side of an \lstinline|@=| initializer, \eg \lstinline|VLA a @= { 0, 0x0 }|, with the usual C initialization semantics. 2029 In some circumstance programmers may not wish to have implicit constructor and destructor generation and calls. 2030 In these cases, \CFA provides the initialization syntax \lstinline|S x `@=` {}|, and the object becomes unmanaged, so implicit constructor and destructor calls are not generated. 2031 Any C initializer can be the right-hand side of an \lstinline|@=| initializer, \eg \lstinline|VLA a @= { 0, 0x0 }|, with the usual C initialization semantics. 2032 The same syntax can be used in a compound literal, \eg \lstinline|a = VLA`@`{ 0, 0x0 }|, to create a C-style literal. 2020 2033 The point of \lstinline|@=| is to provide a migration path from legacy C code to \CFA, by providing a mechanism to incrementally convert to implicit initialization. 2021 2034 … … 2035 2048 \subsection{Integral Suffixes} 2036 2049 2037 Additional integral suffixes are added to cover all the integral types and lengths. 2050 New integral suffixes @hh@ (half of half of @int@) for @char@, @h@ (half of @int@) for @short@, and @z@ for @size_t@, and length suffixes for 8, 16, 32, 64, and 128 bit integers. 2051 %Additional integral suffixes are added to cover all the integral types and lengths. 2038 2052 \begin{cquote} 2039 2053 \lstDeleteShortInline@% … … 2041 2055 \begin{cfa} 2042 2056 20_`hh` // signed char 2043 21_`hh u`// unsigned char2057 21_`hh`u // unsigned char 2044 2058 22_`h` // signed short int 2045 23_ `uh` // unsigned short int2046 24 _`z`// size_t2059 23_u`h` // unsigned short int 2060 24`z` // size_t 2047 2061 \end{cfa} 2048 2062 & 2049 2063 \begin{cfa} 2050 2064 20_`L8` // int8_t 2051 21_ `ul8` // uint8_t2065 21_u`l8` // uint8_t 2052 2066 22_`l16` // int16_t 2053 23_ `ul16` // uint16_t2067 23_u`l16` // uint16_t 2054 2068 24_`l32` // int32_t 2055 2069 \end{cfa} 2056 2070 & 2057 2071 \begin{cfa} 2058 25_ `ul32` // uint32_t2072 25_u`l32` // uint32_t 2059 2073 26_`l64` // int64_t 2060 27_`l64 u`// uint64_t2074 27_`l64`u // uint64_t 2061 2075 26_`L128` // int128 2062 27_`L128 u`// unsigned int1282076 27_`L128`u // unsigned int128 2063 2077 \end{cfa} 2064 2078 \end{tabular} … … 2075 2089 To provide this precision, \CFA introduces a new type @zero_t@ as the type of literal @0@ (somewhat analagous to @nullptr_t@ and @nullptr@ in \CCeleven); 2076 2090 @zero_t@ can only take the value @0@, but has implicit conversions to the integer and pointer types so that C code involving @0@ continues to work. 2077 With this addition, \CFA rewrites @if (x)@ and similar expressions to @if ( (x) != 0)@ or the appropriate analogue, and any type @T@ is ``truthy'' by defining an operator overload @int ?!=?(T, zero_t)@.2091 With this addition, \CFA rewrites @if (x)@ and similar expressions to @if ( (x) != 0 )@ or the appropriate analogue, and any type @T@ is ``truthy'' by defining an operator overload @int ?!=?( T, zero_t )@. 2078 2092 \CC makes types truthy by adding a conversion to @bool@; 2079 2093 prior to the addition of explicit cast operators in \CCeleven, this approach had the pitfall of making truthy types transitively convertable to any numeric type; … … 2091 2105 2092 2106 For readability, it is useful to associate units to scale literals, \eg weight (stone, pound, kilogram) or time (seconds, minutes, hours). 2093 The left of Figure~\ref{f:UserLiteral} shows the \CFA alternative call-syntax ( literal argument before function name), using the backquote, to convert basic literals into user literals.2107 The left of Figure~\ref{f:UserLiteral} shows the \CFA alternative call-syntax (postfix: literal argument before function name), using the backquote, to convert basic literals into user literals. 2094 2108 The backquote is a small character, making the unit (function name) predominate. 2095 2109 For examples, the multi-precision integer-type in Section~\ref{s:MultiPrecisionIntegers} has user literals: … … 2099 2113 y = "12345678901234567890123456789"|`mp| + "12345678901234567890123456789"|`mp|; 2100 2114 \end{cfa} 2101 Because \CFA uses a standard function, all types and literals are applicable, as well as overloading and conversions .2115 Because \CFA uses a standard function, all types and literals are applicable, as well as overloading and conversions, where @?`@ denotes a postfix-function name and @`@ denotes a postfix-function call. 2102 2116 }% 2117 \begin{cquote} 2118 \lstset{language=CFA,moredelim=**[is][\color{red}]{|}{|},deletedelim=**[is][]{`}{`}} 2119 \lstDeleteShortInline@% 2120 \begin{tabular}{@{}l@{\hspace{2\parindentlnth}}l@{\hspace{2\parindentlnth}}l@{\hspace{2\parindentlnth}}l@{}} 2121 \multicolumn{1}{c@{\hspace{2\parindentlnth}}}{\textbf{postfix function}} & \multicolumn{1}{c@{\hspace{2\parindentlnth}}}{\textbf{constant}} & \multicolumn{1}{c@{\hspace{2\parindentlnth}}}{\textbf{variable/expression}} & \multicolumn{1}{c}{\textbf{postfix pointer}} \\ 2122 \begin{cfa} 2123 int |?`h|( int s ); 2124 int |?`h|( double s ); 2125 int |?`m|( char c ); 2126 int |?`m|( const char * s ); 2127 int |?`t|( int a, int b, int c ); 2128 \end{cfa} 2129 & 2130 \begin{cfa} 2131 0 |`h|; 2132 3.5|`h|; 2133 '1'|`m|; 2134 "123" "456"|`m|; 2135 [1,2,3]|`t|; 2136 \end{cfa} 2137 & 2138 \begin{cfa} 2139 int i = 7; 2140 i|`h|; 2141 (i + 3)|`h|; 2142 (i + 3.5)|`h|; 2143 2144 \end{cfa} 2145 & 2146 \begin{cfa} 2147 int (* |?`p|)( int i ); 2148 |?`p| = |?`h|; 2149 3|`p|; 2150 i|`p|; 2151 (i + 3)|`p|; 2152 \end{cfa} 2153 \end{tabular} 2154 \lstMakeShortInline@% 2155 \end{cquote} 2103 2156 2104 2157 The right of Figure~\ref{f:UserLiteral} shows the equivalent \CC version using the underscore for the call-syntax. … … 2111 2164 \lstset{language=CFA,moredelim=**[is][\color{red}]{|}{|},deletedelim=**[is][]{`}{`}} 2112 2165 \lstDeleteShortInline@% 2113 \begin{tabular}{@{}l@{\hspace{ \parindentlnth}}l@{}}2114 \multicolumn{1}{c@{\hspace{ \parindentlnth}}}{\textbf{\CFA}} & \multicolumn{1}{c}{\textbf{\CC}} \\2166 \begin{tabular}{@{}l@{\hspace{2\parindentlnth}}l@{}} 2167 \multicolumn{1}{c@{\hspace{2\parindentlnth}}}{\textbf{\CFA}} & \multicolumn{1}{c}{\textbf{\CC}} \\ 2115 2168 \begin{cfa} 2116 2169 struct W { … … 2208 2261 \begin{cfa} 2209 2262 MIN 2210 2211 2263 MAX 2212 2213 2264 PI 2214 2265 E … … 2216 2267 & 2217 2268 \begin{cfa} 2218 SCHAR_MIN, CHAR_MIN, SHRT_MIN, INT_MIN, LONG_MIN, LLONG_MIN, 2219 FLT_MIN, DBL_MIN, LDBL_MIN 2220 SCHAR_MAX, UCHAR_MAX, SHRT_MAX, INT_MAX, LONG_MAX, LLONG_MAX, 2221 FLT_MAX, DBL_MAX, LDBL_MAX 2269 SCHAR_MIN, CHAR_MIN, SHRT_MIN, INT_MIN, LONG_MIN, LLONG_MIN, FLT_MIN, DBL_MIN, LDBL_MIN 2270 SCHAR_MAX, UCHAR_MAX, SHRT_MAX, INT_MAX, LONG_MAX, LLONG_MAX, FLT_MAX, DBL_MAX, LDBL_MAX 2222 2271 M_PI, M_PIl 2223 2272 M_E, M_El … … 2392 2441 ip = (int *)malloc( sizeof( int ) ); memset( ip, fill, dim * sizeof( int ) ); 2393 2442 ip = (int *)realloc( ip, 2 * dim * sizeof( int ) ); 2394 ip = (int *)realloc( ip, 4 * dim * sizeof( int ) ); 2395 memset( ip, fill, 4 * dim * sizeof( int ) ); 2443 ip = (int *)realloc( ip, 4 * dim * sizeof( int ) ); memset( ip, fill, 4 * dim * sizeof( int ) ); 2444 2396 2445 ip = memalign( 16, sizeof( int ) ); 2397 2446 ip = memalign( 16, sizeof( int ) ); memset( ip, fill, sizeof( int ) );
Note:
See TracChangeset
for help on using the changeset viewer.