Demo entry 6363043

HIGH-LEVEL CHAPEL SYNTAX -> LOW-LEVEL CHAPEL SYNTAX

   

Submitted by user3666197 on May 12, 2017 at 04:26
Language: Chapel. Code size: 1.3 kB.

// -----------------------------------------------------------------   
    const           ProblemSpace  = {1..m} dmapped Block(...);       // SYNTACTICALLY HIGH-LEVEL MAPPER
    var   A, B, C: [ProblemSpace] real;                              // DATA
          A = B + alpha * C;                                         // PROCESS
 // -----------------------------------------------------------------
    coforall loc                    in targetLocales                 // CONFIG ENUM ( GLOBAL DISTRIBUTED NODE(S) INFRASTRUCTURE )
      do  on loc                                                     //        ENUM MAPPED NODE-RELATED LOCALITY
      {   coforall subloc           in loc.getChildren()             // STATIC ENUM ( DETAILED HARDWARE ARCHITERCTURE ) { 1D | 2D | ?D } NUMA is also non-uniform WRT CPUcore
            do  on subloc                                            //        ENUM MAPPED NUMA-AFFINITY
            {   coforall tid        in here.numCores                 // STATIC ENUM ( CPUcore LOCALITY )
                { for ( a, b, c )   in zip( A, B, C )                // DATA-DRIVEN iterator
                  do    a = b + alpha * c;                           // PROCESS
                  }
                }
          }

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).