Code Monkey home page Code Monkey logo

chplx's People

Contributors

ct-clmsn avatar hkaiser avatar satacker avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

chplx's Issues

chplx::forall over ranges

The following code in backend/test/heat.chpl segmentation faults. The sequential version of the loop is working correctly.

Parallel version

        chplx::forall(chplx::Range(0, 4), [&](auto i) {
#line 44 "heat.chpl"
            data(i) = 1 + (((i - 1) + nx) % nx);
#line 45 "heat.chpl"
            data2(i) = 0;
        });

Sequential version

        chplx::forLoop(chplx::Range(0, 4), [&](auto i) {
#line 44 "heat.chpl"
            data(i) = 1 + (((i - 1) + nx) % nx);
#line 45 "heat.chpl"
            data2(i) = 0;
        });

CTest

Implement ctest (cmake test infrastructure) for code generation

backend support tasks

these lists are a work in progress (subject to change)

passes

  • symbol table
  • program construction
  • program validation (validate w/type checking)
  • code generation

variable declaration with/without value initialization

  • scalar int, string, cstring, real declaration
  • array int, string, cstring, real declaration
  • multi-dimensional array int, string, real
  • scalar initialization declaration
  • array initialization declaration
  • multi-dimensional array initialization w/range
  • multi-dimensional array initialization w/domain
  • config, ref, const etc variables
  • domain declaration w/initialization
  • associative domain declaration w/initialization
  • distributed domain support

expressions

  • literal + variable + function call binary expressions (=, +, -, /, *, etc)
  • function calls (argument lists included) w/binary expressions as arguments
  • array access w/binary expressions
  • multi-dimensional array access w/binary expressions as index logic
  • casting types

function support (user defined)

  • function declarations
  • function definitions
  • variable declaration support with/without value initialization
  • first class functions/lambdas
  • iterable functions (generator functions)

control flow

  • function calls (w/argument lists)
  • for loops (for, forall)
  • conditionals (if, if-else, else, etc)
  • on
  • begin, cobegin
  • coforall
  • zip
  • do
  • locales (user defined types)

integral type support

  • array methods
  • string methods
  • associative array methods
  • byte methods
  • string (utf8) / c_string support
  • template functions, user defined types, etc
  • tuples

user defined types

  • class support (member variables, methods)
  • record support (member variables, methods)

module support

  • import statement

chplx::Array operators perform differently

I used the indexing operator [] and the performance was atleast 600 times better when compared to using operator (). Is the major reason hpx::generator ? (It was the heat.cpp code that I had tested with the changed access patterns)

CC @hkaiser @ct-clmsn

Support library facilities

Execution control

  • for loop
  • iterators

Data types

  • Tuples (#15)
  • Ranges (#6)
  • Domains (rectangular) (#16)
  • Domains (associative) (#20)
  • Strings
  • Bytes
  • Arrays (#29)

Task Parallelism and Synchronization

  • begin (#21)
  • cobegin (#21)
  • coforall loop
  • Synchronization variables (#23)
  • Atomic variables (#26)
  • Sync statement
  • Serial statement

Data Parallelism

  • forall loop

Distributed Programming

  • Locales, on (#29)
  • Domain maps (rectangular domain maps: #44)

intermediate structure support

Convert the AST-tree provided by the chapel frontend into an intermediate structure representing the program to be generated. The following tasks will :

  • perform a symbol table pass - the symbol table pass will build symbols, identify scopes, and create the symbol table
  • perform intermediate pass - convert the AST into the intermediate structure; enforce the same scoping rules as the symbol table pass (walk the symbol table's scope tree) and utilize the symbol table to resolve identifiers/variables in the program during intermediate structure creation.

Divide output files

Divide generated code into 3 files

  • Application header
  • Application main
  • Runtime main

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.