Giter Site home page Giter Site logo

Comments (6)

larsmans avatar larsmans commented on May 17, 2024

Turns out the following program causes the same crash, GCC 4.8.4:

#include <regex>

static const std::regex ver_regex("^OpenCL ([0-9]+)\\.([0-9]+).*");

int main() {}

Works with GCC 4.9.0, though. I'm starting to doubt whether C++11 on Linux is mature enough for production use.

from pyopencl.

larsmans avatar larsmans commented on May 17, 2024

Ah: <regex> was simply not implemented until GCC 4.9.0. So the minimum requirement for compiling PyOpenCL is now that version. That might be something to document.

from pyopencl.

inducer avatar inducer commented on May 17, 2024

4.9 seems like a somewhat steep requirement... @yuyichao, opinions?

from pyopencl.

larsmans avatar larsmans commented on May 17, 2024

FYI, both Ubuntu 14.04 LTS and CentOS 7 still ship 4.8. Ubuntu has 4.9 as an optional package that require setting environment variables. I didn't find it in EPEL.

There doesn't seem to be a CPython C API for re...

from pyopencl.

yuyichao avatar yuyichao commented on May 17, 2024

So my opinion is that std::regex was the most obvious way to port the old code and I was on gcc 4.9.0 at that time so it was available (and had no idea it was only added in that version....).

It doesn't have to use a regular expression as shown in #86....

from pyopencl.

yuyichao avatar yuyichao commented on May 17, 2024

And FWIW, the original code for getting platform version from string in python is still there. The ability to query this info is added in order to decide whether to use the callback API for asynchronously releasing the event.

On a related note, the Event.set_callback API was added a while back only in the CFFI branch so I didn't bother adding it to the doc. Now the cffi branch is the master and seems that it is still not documented yet.

from pyopencl.

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.