Code Monkey home page Code Monkey logo

Comments (2)

inducer avatar inducer commented on May 20, 2024

Good catch, thanks for the report. For now, predicates are simply strings representing variable names, but your examples demonstrate that that simply won't suffice. I'll have to allow expressions to allow for these transformations to happen. Not a huge change in principle--I'll see what I can do.

else is doable, too. FWIW, syntax like this:

if blah
   a = b
end

already exists.

from loopy.

inducer avatar inducer commented on May 20, 2024

This commit addresses the ILP concern, and it's possible that it might also address the unroll case, but I haven't tested that yet.

There are a few loose ends:

  • Investigate expression parsing in if-like contexts (basically check that it works, ideally add tests), given that it previously (technically) should have only allowed variables
  • I'd be grateful if you could PR me a test for the unroll case, along the lines of the one I've added for your ILP example (see that commit).
  • Add else syntax. (if you like) For that, look in loopy/kernel/creation.py and search for IF_RE and its usage sites.

from loopy.

Related Issues (20)

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.