Changeset c8ad5d9


Ignore:
Timestamp:
Apr 22, 2018, 9:49:50 AM (6 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, with_gc
Children:
22bdc34, da7fe39
Parents:
58caf150
Message:

updates

Location:
doc/papers
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • doc/papers/concurrency/Paper.tex

    r58caf150 rc8ad5d9  
    1919\usepackage{listings}                                           % format program code
    2020\usepackage[labelformat=simple,aboveskip=0pt,farskip=0pt]{subfig}
    21 \renewcommand{\thesubfigure}{(\alph{subfigure})}
     21\renewcommand{\thesubfigure}{(\Alph{subfigure})}
     22\captionsetup{justification=raggedright,singlelinecheck=false}
    2223\usepackage{siunitx}
    2324\sisetup{ binary-units=true }
     
    9899\newcommand{\abbrevFont}{\textit}                       % set empty for no italics
    99100\@ifundefined{eg}{
    100 \newcommand{\EG}{\abbrevFont{e}.\abbrevFont{g}.}
     101\newcommand{\EG}{\abbrevFont{e}\abbrevFont{g}}
    101102\newcommand*{\eg}{%
    102103        \@ifnextchar{,}{\EG}%
     
    105106}}{}%
    106107\@ifundefined{ie}{
    107 \newcommand{\IE}{\abbrevFont{i}.\abbrevFont{e}.}
     108\newcommand{\IE}{\abbrevFont{i}\abbrevFont{e}}
    108109\newcommand*{\ie}{%
    109110        \@ifnextchar{,}{\IE}%
     
    143144                _Alignas, _Alignof, __alignof, __alignof__, asm, __asm, __asm__, __attribute, __attribute__,
    144145                auto, _Bool, catch, catchResume, choose, _Complex, __complex, __complex__, __const, __const__,
    145                 coroutine, disable, dtype, enable, __extension__, exception, fallthrough, fallthru, finally,
     146                coroutine, disable, dtype, enable, exception, __extension__, fallthrough, fallthru, finally,
    146147                __float80, float80, __float128, float128, forall, ftype, _Generic, _Imaginary, __imag, __imag__,
    147148                inline, __inline, __inline__, __int128, int128, __label__, monitor, mutex, _Noreturn, one_t, or,
     
    169170literate={-}{\makebox[1ex][c]{\raisebox{0.4ex}{\rule{0.8ex}{0.1ex}}}}1 {^}{\raisebox{0.6ex}{$\scriptstyle\land\,$}}1
    170171        {~}{\raisebox{0.3ex}{$\scriptstyle\sim\,$}}1 % {`}{\ttfamily\upshape\hspace*{-0.1ex}`}1
    171         {<-}{$\leftarrow$}2 {=>}{$\Rightarrow$}2 {->}{\makebox[1ex][c]{\raisebox{0.5ex}{\rule{0.8ex}{0.075ex}}}\kern-0.2ex{\textgreater}}2,
     172        {<-}{$\leftarrow$}2 {=>}{$\Rightarrow$}2 {->}{\makebox[1ex][c]{\raisebox{0.4ex}{\rule{0.8ex}{0.075ex}}}\kern-0.2ex{\textgreater}}2,
    172173moredelim=**[is][\color{red}]{`}{`},
    173174}% lstset
     
    216217\author[1]{Thierry Delisle}
    217218\author[1]{Peter A. Buhr*}
    218 \authormark{Thierry Delisle \textsc{et al}}
    219 
    220 \address[1]{\orgdiv{Cheriton School of Computer Science}, \orgname{University of Waterloo}, \orgaddress{\state{Ontario}, \country{Canada}}}
    221 
    222 \corres{*Peter A. Buhr, \email{pabuhr{\char`\@}uwaterloo.ca}}
    223 \presentaddress{Cheriton School of Computer Science, University of Waterloo, Waterloo, ON, N2L 3G1, Canada}
    224 
     219\authormark{DELISLE \textsc{et al.}}
     220
     221\address[1]{\orgdiv{Cheriton School of Computer Science}, \orgname{University of Waterloo}, \orgaddress{\state{Waterloo, ON}, \country{Canada}}}
     222
     223\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}}
     224
     225\fundingInfo{Natural Sciences and Engineering Research Council of Canada}
    225226
    226227\abstract[Summary]{
    227228\CFA is a modern, polymorphic, \emph{non-object-oriented} extension of the C programming language.
    228229This paper discusses the design of the concurrency and parallelism features in \CFA, and the concurrent runtime-system.
    229 These features are created from scratch as ISO C lacks concurrency, relying largely on pthreads.
     230These features are created from scratch as ISO C lacks concurrency, relying largely on pthreads library.
    230231Coroutines and lightweight (user) threads are introduced into the language.
    231232In addition, monitors are added as a high-level mechanism for mutual exclusion and synchronization.
     
    255256Examples of high-level approaches are task based~\cite{TBB}, message passing~\cite{Erlang,MPI}, and implicit threading~\cite{OpenMP}.
    256257
    257 This paper used the following terminology.
     258This paper uses the following terminology.
    258259A \newterm{thread} is a fundamental unit of execution that runs a sequence of code and requires a stack to maintain state.
    259 Multiple simultaneous threads gives rise to \newterm{concurrency}, which requires locking to ensure safe communication and access to shared data.
     260Multiple simultaneous threads give rise to \newterm{concurrency}, which requires locking to ensure safe communication and access to shared data.
    260261% Correspondingly, concurrency is defined as the concepts and challenges that occur when multiple independent (sharing memory, timing dependencies, \etc) concurrent threads are introduced.
    261262\newterm{Locking}, and by extension locks, are defined as a mechanism to prevent progress of threads to provide safety.
    262263\newterm{Parallelism} is running multiple threads simultaneously.
    263264Parallelism implies \emph{actual} simultaneous execution, where concurrency only requires \emph{apparent} simultaneous execution.
    264 As such, parallelism is only observable in differences in performance, which is observed through differences in timing.
     265As such, parallelism only affects performance, which is observed through differences in space and/or time.
    265266
    266267Hence, there are two problems to be solved in the design of concurrency for a programming language: concurrency and parallelism.
    267 While these two concepts are often combined, they are in fact distinct, requiring different tools~\cite[\S~2]{Buhr05a}.
     268While these two concepts are often combined, they are distinct, requiring different tools~\cite[\S~2]{Buhr05a}.
    268269Concurrency tools handle synchronization and mutual exclusion, while parallelism tools handle performance, cost and resource utilization.
    269270
     
    278279
    279280The following is a quick introduction to the \CFA language, specifically tailored to the features needed to support concurrency.
    280 
    281 \CFA is an extension of ISO-C and therefore supports all of the same paradigms as C.
    282 It is a non-object-oriented system-language, meaning most of the major abstractions have either no runtime overhead or can be opted out easily.
     281Most of the following code examples can be found on the \CFA website~\cite{Cforall}.
     282
     283\CFA is an extension of ISO-C, and therefore, supports all of the same paradigms as C.
     284%It is a non-object-oriented system-language, meaning most of the major abstractions have either no runtime overhead or can be opted out easily.
    283285Like C, the basics of \CFA revolve around structures and routines, which are thin abstractions over machine code.
    284286The vast majority of the code produced by the \CFA translator respects memory layouts and calling conventions laid out by C.
    285 Interestingly, while \CFA is not an object-oriented language, lacking the concept of a receiver (\eg {\tt this}), it does have some notion of objects\footnote{C defines the term objects as : ``region of data storage in the execution environment, the contents of which can represent
     287Interestingly, while \CFA is not an object-oriented language, lacking the concept of a receiver (\eg @this@) and inheritance, it does have some notion of objects\footnote{C defines the term objects as : ``region of data storage in the execution environment, the contents of which can represent
    286288values''~\cite[3.15]{C11}}, most importantly construction and destruction of objects.
    287 Most of the following code examples can be found on the \CFA website~\cite{Cforall}.
    288289
    289290
     
    293294In regards to concurrency, the semantic difference between pointers and references are not particularly relevant, but since this document uses mostly references, here is a quick overview of the semantics:
    294295\begin{cfa}
    295 int x, *p1 = &x, **p2 = &p1, ***p3 = &p2,
    296         &r1 = x,    &&r2 = r1,   &&&r3 = r2;
    297 ***p3 = 3;                                                      $\C{// change x}$
    298 r3    = 3;                                                      $\C{// change x, ***r3}$
    299 **p3  = ...;                                            $\C{// change p1}$
    300 *p3   = ...;                                            $\C{// change p2}$
    301 int y, z, & ar[3] = {x, y, z};          $\C{// initialize array of references}$
    302 typeof( ar[1]) p;                                       $\C{// is int, referenced object type}$
    303 typeof(&ar[1]) q;                                       $\C{// is int \&, reference type}$
    304 sizeof( ar[1]) == sizeof(int);          $\C{// is true, referenced object size}$
    305 sizeof(&ar[1]) == sizeof(int *);        $\C{// is true, reference size}$
     296int x, y, z;
     297int * p1 = &x, ** p2 = &p1, *** p3 = &p2,       $\C{// pointers to x}$
     298        & r1 = x,   && r2 = r1, &&& r3 = r2;    $\C{// references to x}$
     299
     300*p1 = 3; **p2 = 3; ***p3 = 3;                           $\C{// change x}$
     301  r1 = 3;    r2 = 3;      r3 = 3;                       $\C{// change x}$
     302**p3 = &y; *p3 = &z;                                            $\C{// change p1, p2}$
     303&&r3 = &y; &r3 = &z;                                            $\C{// change p1, p2}$
     304int & ar[3] = {x, y, z};                                        $\C{// initialize array of references}$
     305
     306typeof( ar[1]) p;                                                       $\C{// is int, referenced object type}$
     307typeof(&ar[1]) q;                                                       $\C{// is int \&, reference type}$
     308sizeof( ar[1]) == sizeof(int);                          $\C{// is true, referenced object size}$
     309sizeof(&ar[1]) == sizeof(int *);                        $\C{// is true, reference size}$
    306310\end{cfa}
    307311The important take away from this code example is that a reference offers a handle to an object, much like a pointer, but which is automatically dereferenced for convenience.
     
    626630\end{lrbox}
    627631\subfloat[3 States, internal variables]{\label{f:Coroutine3States}\usebox\myboxA}
    628 \qquad
     632\qquad\qquad
    629633\subfloat[1 State, internal variables]{\label{f:Coroutine1State}\usebox\myboxB}
    630634\caption{\CFA Coroutine Fibonacci Implementations}
     
    653657
    654658\begin{figure}
    655 \centering
    656 \begin{cfa}
     659\begin{cfa}[xleftmargin=4\parindentlnth]
    657660`coroutine` Format {
    658661        char ch;                                                                $\C{// used for communication}$
  • doc/papers/general/Paper.tex

    r58caf150 rc8ad5d9  
    1 \documentclass[AMA,STIX1COL,STIXSMALL]{WileyNJD-v2}
     1\documentclass[AMA,STIX1COL]{WileyNJD-v2}
     2
    23\articletype{RESEARCH ARTICLE}%
    34
     
    1718\usepackage{upquote}                                            % switch curled `'" to straight
    1819\usepackage{listings}                                           % format program code
     20\captionsetup{justification=raggedright,singlelinecheck=false}
    1921%\usepackage{enumitem}
    2022%\setlist[itemize]{topsep=3pt,itemsep=2pt,parsep=0pt}% global
     
    2729\renewcommand{\linenumberfont}{\scriptsize\sffamily}
    2830
    29 \lefthyphenmin=4                                                        % hyphen only after 4 characters
    30 \righthyphenmin=4
     31\lefthyphenmin=3                                                        % hyphen only after 4 characters
     32\righthyphenmin=3
    3133
    3234%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     
    8688\newcommand{\abbrevFont}{\textit}                       % set empty for no italics
    8789\@ifundefined{eg}{
    88 \newcommand{\EG}{\abbrevFont{e}.\abbrevFont{g}.}
     90\newcommand{\EG}{\abbrevFont{e}\abbrevFont{g}}
    8991\newcommand*{\eg}{%
    9092        \@ifnextchar{,}{\EG}%
     
    9395}}{}%
    9496\@ifundefined{ie}{
    95 \newcommand{\IE}{\abbrevFont{i}.\abbrevFont{e}.}
     97\newcommand{\IE}{\abbrevFont{i}\abbrevFont{e}}
    9698\newcommand*{\ie}{%
    9799        \@ifnextchar{,}{\IE}%
     
    129131\lstdefinelanguage{CFA}[ANSI]{C}{
    130132        morekeywords={
    131                 _Alignas, _Alignof, __alignof, __alignof__, asm, __asm, __asm__, _At, __attribute,
    132                 __attribute__, auto, _Bool, catch, catchResume, choose, _Complex, __complex, __complex__,
    133                 __const, __const__, disable, dtype, enable, exception, __extension__, fallthrough, fallthru,
    134                 finally, forall, ftype, _Generic, _Imaginary, inline, __label__, lvalue, _Noreturn, one_t,
    135                 otype, restrict, _Static_assert, throw, throwResume, trait, try, ttype, typeof, __typeof,
    136                 __typeof__, virtual, with, zero_t},
    137         morekeywords=[2]{
    138                 _Atomic, coroutine, is_coroutine, is_monitor, is_thread, monitor, mutex, nomutex, or,
    139                 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},
    140141        moredirectives={defined,include_next}%
    141142}
     
    158159literate={-}{\makebox[1ex][c]{\raisebox{0.4ex}{\rule{0.8ex}{0.1ex}}}}1 {^}{\raisebox{0.6ex}{$\scriptstyle\land\,$}}1
    159160        {~}{\raisebox{0.3ex}{$\scriptstyle\sim\,$}}1 % {`}{\ttfamily\upshape\hspace*{-0.1ex}`}1
    160         {<-}{$\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,
    161162moredelim=**[is][\color{red}]{`}{`},
    162163}% lstset
     
    180181\authormark{MOSS \textsc{et al}}
    181182
    182 \address[1]{\orgdiv{David R. Cheriton School of Computer Science}, \orgname{University of Waterloo}, \orgaddress{\state{Ontario}, \country{Canada}}}
    183 
    184 \corres{*Peter A. Buhr, \email{pabuhr{\char`\@}uwaterloo.ca}}
    185 \presentaddress{David R. Cheriton School of Computer Science, University of Waterloo, Waterloo, ON, N2L 3G1, Canada}
    186 
     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}
    187188
    188189\abstract[Summary]{
     
    228229Nevertheless, C, first standardized over thirty years ago, lacks many features that make programming in more modern languages safer and more productive.
    229230
    230 \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.
     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.
    231232The four key design goals for \CFA~\cite{Bilson03} are:
    232233(1) The behaviour of standard C code must remain the same when translated by a \CFA compiler as when translated by a C compiler;
     
    328329A simple example is leveraging the existing type-unsafe (@void *@) C @bsearch@ to binary search a sorted float array:
    329330\begin{cfa}
    330 void * bsearch( const void * key, const void * base, size_t nmemb, size_t size,
    331                                          int (* compar)( const void *, const void * ));
     331void * bsearch( const void * key, const void * base, size_t nmemb, size_t size, int (* compar)( const void *, const void * ));
    332332int comp( const void * t1, const void * t2 ) {
    333333         return *(double *)t1 < *(double *)t2 ? -1 : *(double *)t2 < *(double *)t1 ? 1 : 0;
     
    336336double * val = (double *)bsearch( &key, vals, 10, sizeof(vals[0]), comp ); $\C{// search sorted array}$
    337337\end{cfa}
    338 which can be augmented simply with a generalized, type-safe, \CFA-overloaded wrappers:
     338which can be augmented simply with generalized, type-safe, \CFA-overloaded wrappers:
    339339\begin{cfa}
    340340forall( otype T | { int ?<?( T, T ); } ) T * bsearch( T key, const T * arr, size_t size ) {
     
    398398        T ?++( T * );
    399399};
    400 forall( otype T `| summable( T )` ) T sum( T a[$\,$], size_t size ) {  // use trait
     400forall( otype T `| summable( T )` ) T sum( T a[$\,$], size_t size ) {$\C{// use trait}$
    401401        `T` total = { `0` };                                    $\C{// instantiate T from 0 by calling its constructor}$
    402402        for ( unsigned int i = 0; i < size; i += 1 ) total `+=` a[i]; $\C{// select appropriate +}$
     
    576576        return (scalar(U)){ a.value + b.value };
    577577}
    578 scalar(metres) half_marathon = { 21093 };
    579 scalar(litres) swimming_pool = { 2500000 };
     578scalar(metres) half_marathon = { 21_093 };
     579scalar(litres) swimming_pool = { 2_500_000 };
    580580scalar(metres) marathon = half_marathon + half_marathon;
    581581scalar(litres) two_pools = swimming_pool + swimming_pool;
     
    724724\end{cfa}
    725725Here, the mass assignment sets all members of @s@ to zero.
    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).
     726Since 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).
    727727\begin{cfa}
    728728[int, int, long, double] x;
     
    18791879\lstDeleteShortInline@%
    18801880\begin{tabular}{@{}l@{\hspace{3em}}l|l@{}}
    1881 \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}}     \\
    18821882\hline
    18831883\begin{cfa}
     
    20022002{
    20032003        VLA  x,            y = { 20, 0x01 },     z = y; $\C{// z points to y}$
    2004         //    ?{}( x );   ?{}( y, 20, 0x01 );    ?{}( z, y );
     2004        //      ?{}( x );   ?{}( y, 20, 0x01 );   ?{}( z, y );
    20052005        ^x{};                                                                   $\C{// deallocate x}$
    20062006        x{};                                                                    $\C{// reallocate x}$
     
    20272027These semantics closely mirror the rule for implicit declaration of constructors in \CC\cite[p.~186]{ANSI98:C++}.
    20282028
    2029 In some circumstance programmers may not wish to have constructor and destructor 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.
     2029In some circumstance programmers may not wish to have implicit constructor and destructor generation and calls.
     2030In these cases, \CFA provides the initialization syntax \lstinline|S x `@=` {}|, and the object becomes unmanaged, so implicit constructor and destructor calls are not generated.
     2031Any C initializer can be the right-hand side of an \lstinline|@=| initializer, \eg \lstinline|VLA a @= { 0, 0x0 }|, with the usual C initialization semantics.
     2032The same syntax can be used in a compound literal, \eg \lstinline|a = VLA`@`{ 0, 0x0 }|, to create a C-style literal.
    20322033The 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.
    20332034
     
    20542055\begin{cfa}
    2055205620_`hh`     // signed char
    2056 21_`hh`u    // unsigned char
     205721_`hh`u   // unsigned char
    2057205822_`h`       // signed short int
    2058205923_u`h`     // unsigned short int
    2059 24`z`       // size_t
     206024`z`         // size_t
    20602061\end{cfa}
    20612062&
     
    20882089To 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);
    20892090@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.
    2090 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)@.
     2091With 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 )@.
    20912092\CC makes types truthy by adding a conversion to @bool@;
    20922093prior to the addition of explicit cast operators in \CCeleven, this approach had the pitfall of making truthy types transitively convertable to any numeric type;
     
    21632164\lstset{language=CFA,moredelim=**[is][\color{red}]{|}{|},deletedelim=**[is][]{`}{`}}
    21642165\lstDeleteShortInline@%
    2165 \begin{tabular}{@{}l@{\hspace{\parindentlnth}}l@{}}
    2166 \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}}      \\
    21672168\begin{cfa}
    21682169struct W {
     
    22602261\begin{cfa}
    22612262MIN
    2262 
    22632263MAX
    2264 
    22652264PI
    22662265E
     
    22682267&
    22692268\begin{cfa}
    2270 SCHAR_MIN, CHAR_MIN, SHRT_MIN, INT_MIN, LONG_MIN, LLONG_MIN,
    2271                 FLT_MIN, DBL_MIN, LDBL_MIN
    2272 SCHAR_MAX, UCHAR_MAX, SHRT_MAX, INT_MAX, LONG_MAX, LLONG_MAX,
    2273                 FLT_MAX, DBL_MAX, LDBL_MAX
     2269SCHAR_MIN, CHAR_MIN, SHRT_MIN, INT_MIN, LONG_MIN, LLONG_MIN, FLT_MIN, DBL_MIN, LDBL_MIN
     2270SCHAR_MAX, UCHAR_MAX, SHRT_MAX, INT_MAX, LONG_MAX, LLONG_MAX, FLT_MAX, DBL_MAX, LDBL_MAX
    22742271M_PI, M_PIl
    22752272M_E, M_El
     
    24442441ip = (int *)malloc( sizeof( int ) ); memset( ip, fill, dim * sizeof( int ) );
    24452442ip = (int *)realloc( ip, 2 * dim * sizeof( int ) );
    2446 ip = (int *)realloc( ip, 4 * dim * sizeof( int ) );
    2447                         memset( ip, fill, 4 * dim * sizeof( int ) );
     2443ip = (int *)realloc( ip, 4 * dim * sizeof( int ) ); memset( ip, fill, 4 * dim * sizeof( int ) );
     2444
    24482445ip = memalign( 16, sizeof( int ) );
    24492446ip = memalign( 16, sizeof( int ) ); memset( ip, fill, sizeof( int ) );
Note: See TracChangeset for help on using the changeset viewer.