GithubHelp home page GithubHelp logo

maciejczyzewski / fast_gpu_voronoi Goto Github PK

View Code? Open in Web Editor NEW
25.0 25.0 4.0 70.06 MB

GPU-Accelerated Jump Flooding Algorithm for Voronoi Diagram in log*(n)

Home Page: https://git.io/jfa_star_slides

License: MIT License

Python 84.63% C 15.37%
algorithm gpgpu gpu opencl research voronoi

fast_gpu_voronoi's People

Contributors

kamilpiechowiak avatar maciejczyzewski avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

fast_gpu_voronoi's Issues

Problem running under Linux

Hey Maciej,

Your code does not seem to work under Linux. Here's what i got from your example. Any clues to how I could fix it ?

pyopencl._cl.RuntimeError: clBuildProgram failed: BUILD_PROGRAM_FAILURE - clBuildProgram failed: BUILD_PROGRAM_FAILURE - clBuildProgram failed: BUILD_PROGRAM_FAILURE

Build on <pyopencl.Device 'Quadro P4000' on 'NVIDIA CUDA' at 0x55f3a6f046a0>:

:2:26: warning: unknown OpenCL extension 'cl_ext_device_fission' - ignoring
#pragma OPENCL EXTENSION cl_ext_device_fission : enable
^
:35:29: error: expected expression
int A = (step * cos(float( ((6.28/12) * i) )));
^
:36:29: error: expected expression
int B = (step * sin(float( ((6.28/12) * i) )));

Scipy-compatible output

@maciejczyzewski and @KamilPiechowiak ,

I was wondering if there is a way to add a few more attributes to the output. So far you are storing X/Y and the matrix of points labelled by the region it belongs to.

I noticed that Scipy Voronoi implementation (https://docs.scipy.org/doc/scipy/reference/generated/scipy.spatial.Voronoi.html) actually has really convenient access to vertices and regions. While I know it is possible to extract similar attributes likely via scipy.ConvexHull, it might also add the overhead to the calculation that is "almost" done in openCL performant code.

Do you think it would be difficult to actually do the calc directly in OpenCL and expose similar attributes?

Thanks,
Anton.

PS. Why am I asking?
I am trying to make an open-source library for stippling in python that relies on:
ReScience-Archives/Rougier-2017#3
They are using Voronoi diagrams there obtained via Scipy, and so far according to the code profiler that is one of the slower spots (I have sped up some of the calculation via numba).

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.