Giter Club home page Giter Club logo

Comments (5)

tobiasgrosser avatar tobiasgrosser commented on August 29, 2024

I like the idea. For backwards compatibility reasons (and consistency) I would likely not drop the existing interface, but adding an implicit conversion for isl_ctx * seems a straightforward and well justified change that certainly makes mixed C and C++ code a lot more readable.

Care to propose a patch?

from isl.

aisoard avatar aisoard commented on August 29, 2024

I prefer to be (overly) cautious about implicit conversions as this create surprising behaviors that will come back to bite us. That being said, the ctx object is almost never used in any expression, we rarely check it is non-null, and that is a lossless conversion. Which makes me think that is probably ok.

In any case, I agree that having get/release in the interface make little sense as isl::ctx does not actually manage the underlying isl_ctx.

Anyway, the isl_ctx is the black sheep of the family, I don't see any proper way of managing it as it is a transverse data-structure that isl does not handle. I would almost be ok with having a thread_local global isl_ctx, but I assume that would displease a lot of people. :-) (and that is an other unrelated discussion)

from isl.

ftynse avatar ftynse commented on August 29, 2024

from isl.

tobiasgrosser avatar tobiasgrosser commented on August 29, 2024

Albert also mentioned that a ctx free (or thread-local only) use of the isl bindings would be great. It might make sense to make this a separate issue. (Seems very useful for scripting-style usage of these bindings)

from isl.

ftynse avatar ftynse commented on August 29, 2024

Now it's #14

from isl.

Related Issues (12)

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.