Giter Club home page Giter Club logo

adaptive-boxes-gpu's Introduction

adaptive-boxes-gpu โšก ๐Ÿ“ฆ

GPU-accelerated rectangular decomposition for sound propagation modeling in 2D. Article

Samples

High resolution images! Click over any image to see the rectangular decomposition's details.

Scene 1

Scene 2

Scene 3

Usage Guide

Requirements

  • CUDA 9.0
  • Thrust parallel template library
  • CuRand

Basics

First compile the adaptive_boxes.cu script. Just do make.

Run ./adabox with the following arguments:

  • [1] input file (binary matrix in .csv)
  • [2] output file (list of rectangles in .csv)
  • [3] n (# of tests = n x n)

Input file

The input should be a .csv file which contains the matrix size and the binary matrix data. Some samples are located in data folder. As a simple example see squares.csv.

Output file

A list of resulting rectangles in a .csv file. Data is given in the format: [x1 x2 y1 y2] (Two points rectangle location).

Performance Test

Execution time in seconds:

# of parallel searches [n] Scene 1 Scene 2 Scene 3
2400 3.1 2.6 2

Tests were performed using a GPU NVIDIA Tesla V100.

Extra info

How does it work? Why sound propagation modeling?

Adaptive Rectangular Decomposition (ARD) is an efficient technique for modeling the sound propagation. This technique reduces the computational overhead and memory requirements by using non-dispersive sub-rectangular domains suitable for parallel computation. In order to use this technique, the scene should be decomposed into large inscribed rectangles. For large and complex scenes, it is not feasible to find an optimal set of large rectangles and thus an approximation should be used. In this paper, we present a GPU-accelerated algorithm for searching an adequate rectangular decomposition of a 2D scene in a reasonable time. Our algorithm performs a fast parallel search in the entire domain. As a result, large and complex scenes can be decomposed in seconds and it enables them to be numerically modeled in parallel using ARD.

More info: GPU-accelerated rectangular decomposition for sound propagation modeling in 2D.

How to plot the .csv results?

Use adaptive-boxes python library:

pip install adaptive-boxes

See here adabox.

adaptive-boxes-gpu's People

Contributors

jnfran92 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

adaptive-boxes-gpu's Issues

Add thrust for filling data

To improve performance use thrust in that way:

    thrust::device_ptr<double> f_n_wrapped(f_n_ptr);
    thrust::fill(
            f_n_wrapped,
            f_n_wrapped + num_div_x*num_div_y,
            0.0);

CSV reader

Read files in common .csv file, without providing the size at header.

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.