![Page 1: GPU Based Sound Simulation and Visualization Torbjorn Loken, Torbjorn Loken, Sergiu M. Dascalu, and Frederick C Harris, Jr. Department of Computer Science](https://reader036.vdocuments.site/reader036/viewer/2022081506/5697bfdf1a28abf838cb26cc/html5/thumbnails/1.jpg)
![Page 2: GPU Based Sound Simulation and Visualization Torbjorn Loken, Torbjorn Loken, Sergiu M. Dascalu, and Frederick C Harris, Jr. Department of Computer Science](https://reader036.vdocuments.site/reader036/viewer/2022081506/5697bfdf1a28abf838cb26cc/html5/thumbnails/2.jpg)
GPU Based Sound Simulation and Visualization
Torbjorn Loken,
Sergiu M. Dascalu, and
Frederick C Harris, Jr.
Department of Computer Science and Engineering
University of Nevada, Reno
![Page 3: GPU Based Sound Simulation and Visualization Torbjorn Loken, Torbjorn Loken, Sergiu M. Dascalu, and Frederick C Harris, Jr. Department of Computer Science](https://reader036.vdocuments.site/reader036/viewer/2022081506/5697bfdf1a28abf838cb26cc/html5/thumbnails/3.jpg)
![Page 4: GPU Based Sound Simulation and Visualization Torbjorn Loken, Torbjorn Loken, Sergiu M. Dascalu, and Frederick C Harris, Jr. Department of Computer Science](https://reader036.vdocuments.site/reader036/viewer/2022081506/5697bfdf1a28abf838cb26cc/html5/thumbnails/4.jpg)
Reno, Nevada
![Page 5: GPU Based Sound Simulation and Visualization Torbjorn Loken, Torbjorn Loken, Sergiu M. Dascalu, and Frederick C Harris, Jr. Department of Computer Science](https://reader036.vdocuments.site/reader036/viewer/2022081506/5697bfdf1a28abf838cb26cc/html5/thumbnails/5.jpg)
University of Nevada, Reno
![Page 6: GPU Based Sound Simulation and Visualization Torbjorn Loken, Torbjorn Loken, Sergiu M. Dascalu, and Frederick C Harris, Jr. Department of Computer Science](https://reader036.vdocuments.site/reader036/viewer/2022081506/5697bfdf1a28abf838cb26cc/html5/thumbnails/6.jpg)
GPU Based Sound Simulation and Visualization
Torbjorn Loken,
Sergiu M. Dascalu, and
Frederick C Harris, Jr.
Department of Computer Science and Engineering
University of Nevada, Reno
![Page 7: GPU Based Sound Simulation and Visualization Torbjorn Loken, Torbjorn Loken, Sergiu M. Dascalu, and Frederick C Harris, Jr. Department of Computer Science](https://reader036.vdocuments.site/reader036/viewer/2022081506/5697bfdf1a28abf838cb26cc/html5/thumbnails/7.jpg)
Coprocessors
Step back in time– Channel I/O
![Page 8: GPU Based Sound Simulation and Visualization Torbjorn Loken, Torbjorn Loken, Sergiu M. Dascalu, and Frederick C Harris, Jr. Department of Computer Science](https://reader036.vdocuments.site/reader036/viewer/2022081506/5697bfdf1a28abf838cb26cc/html5/thumbnails/8.jpg)
![Page 9: GPU Based Sound Simulation and Visualization Torbjorn Loken, Torbjorn Loken, Sergiu M. Dascalu, and Frederick C Harris, Jr. Department of Computer Science](https://reader036.vdocuments.site/reader036/viewer/2022081506/5697bfdf1a28abf838cb26cc/html5/thumbnails/9.jpg)
Channel I/O
I/O processing was taking a significant amount for processor time– Just renting an IBM 709 could cost upwards
of $55,000 a month
![Page 10: GPU Based Sound Simulation and Visualization Torbjorn Loken, Torbjorn Loken, Sergiu M. Dascalu, and Frederick C Harris, Jr. Department of Computer Science](https://reader036.vdocuments.site/reader036/viewer/2022081506/5697bfdf1a28abf838cb26cc/html5/thumbnails/10.jpg)
Channel IO
I/O channels hooked into data synchronizer units – Central Processor free to continue
Similar to the modern Southbridge chip found on motherboards
![Page 11: GPU Based Sound Simulation and Visualization Torbjorn Loken, Torbjorn Loken, Sergiu M. Dascalu, and Frederick C Harris, Jr. Department of Computer Science](https://reader036.vdocuments.site/reader036/viewer/2022081506/5697bfdf1a28abf838cb26cc/html5/thumbnails/11.jpg)
Coprocessors
Step back in time– Channel I/O– Floating Point Units
![Page 12: GPU Based Sound Simulation and Visualization Torbjorn Loken, Torbjorn Loken, Sergiu M. Dascalu, and Frederick C Harris, Jr. Department of Computer Science](https://reader036.vdocuments.site/reader036/viewer/2022081506/5697bfdf1a28abf838cb26cc/html5/thumbnails/12.jpg)
Floating Point Math
Before 1985 and the IEEE 754 standard the implementation of floating point math varied greatly– Word sizes varied, accuracy varied
![Page 13: GPU Based Sound Simulation and Visualization Torbjorn Loken, Torbjorn Loken, Sergiu M. Dascalu, and Frederick C Harris, Jr. Department of Computer Science](https://reader036.vdocuments.site/reader036/viewer/2022081506/5697bfdf1a28abf838cb26cc/html5/thumbnails/13.jpg)
Floating Point Math
IEEE Standard 754 and a consensus about word sizes (32-bits) helped greatly
Hardware implementations almost required– Complex– Slow– Valuable
![Page 14: GPU Based Sound Simulation and Visualization Torbjorn Loken, Torbjorn Loken, Sergiu M. Dascalu, and Frederick C Harris, Jr. Department of Computer Science](https://reader036.vdocuments.site/reader036/viewer/2022081506/5697bfdf1a28abf838cb26cc/html5/thumbnails/14.jpg)
Floating Point Numbers
![Page 15: GPU Based Sound Simulation and Visualization Torbjorn Loken, Torbjorn Loken, Sergiu M. Dascalu, and Frederick C Harris, Jr. Department of Computer Science](https://reader036.vdocuments.site/reader036/viewer/2022081506/5697bfdf1a28abf838cb26cc/html5/thumbnails/15.jpg)
Floating Point units
Initially off chip– One of the most popular coprocessors
Moore’s Law made room for them on chip
![Page 16: GPU Based Sound Simulation and Visualization Torbjorn Loken, Torbjorn Loken, Sergiu M. Dascalu, and Frederick C Harris, Jr. Department of Computer Science](https://reader036.vdocuments.site/reader036/viewer/2022081506/5697bfdf1a28abf838cb26cc/html5/thumbnails/16.jpg)
SSE and AVX
New instruction sets Compute using 128-512 bit wide registers
– Multiple floating point numbers per register Non-blocking, CPU free to continue while
computations run. Modern, widely available.
![Page 17: GPU Based Sound Simulation and Visualization Torbjorn Loken, Torbjorn Loken, Sergiu M. Dascalu, and Frederick C Harris, Jr. Department of Computer Science](https://reader036.vdocuments.site/reader036/viewer/2022081506/5697bfdf1a28abf838cb26cc/html5/thumbnails/17.jpg)
![Page 18: GPU Based Sound Simulation and Visualization Torbjorn Loken, Torbjorn Loken, Sergiu M. Dascalu, and Frederick C Harris, Jr. Department of Computer Science](https://reader036.vdocuments.site/reader036/viewer/2022081506/5697bfdf1a28abf838cb26cc/html5/thumbnails/18.jpg)
Coprocessors
Step back in time– Channel I/O– Floating Point Units
Graphics Processing units
![Page 19: GPU Based Sound Simulation and Visualization Torbjorn Loken, Torbjorn Loken, Sergiu M. Dascalu, and Frederick C Harris, Jr. Department of Computer Science](https://reader036.vdocuments.site/reader036/viewer/2022081506/5697bfdf1a28abf838cb26cc/html5/thumbnails/19.jpg)
Games: FPU Powered
![Page 20: GPU Based Sound Simulation and Visualization Torbjorn Loken, Torbjorn Loken, Sergiu M. Dascalu, and Frederick C Harris, Jr. Department of Computer Science](https://reader036.vdocuments.site/reader036/viewer/2022081506/5697bfdf1a28abf838cb26cc/html5/thumbnails/20.jpg)
Games: GPU Powered
![Page 21: GPU Based Sound Simulation and Visualization Torbjorn Loken, Torbjorn Loken, Sergiu M. Dascalu, and Frederick C Harris, Jr. Department of Computer Science](https://reader036.vdocuments.site/reader036/viewer/2022081506/5697bfdf1a28abf838cb26cc/html5/thumbnails/21.jpg)
GPU Design
Goal: Floating Point Throughput SIMD to the core Hardware Accelerate common operations
– Initially Transformation and Lighting calculations
– Later Transcendentals, Texture sampling, etc...
![Page 22: GPU Based Sound Simulation and Visualization Torbjorn Loken, Torbjorn Loken, Sergiu M. Dascalu, and Frederick C Harris, Jr. Department of Computer Science](https://reader036.vdocuments.site/reader036/viewer/2022081506/5697bfdf1a28abf838cb26cc/html5/thumbnails/22.jpg)
The Original Pipeline
![Page 23: GPU Based Sound Simulation and Visualization Torbjorn Loken, Torbjorn Loken, Sergiu M. Dascalu, and Frederick C Harris, Jr. Department of Computer Science](https://reader036.vdocuments.site/reader036/viewer/2022081506/5697bfdf1a28abf838cb26cc/html5/thumbnails/23.jpg)
The evolution of the pipeline
![Page 24: GPU Based Sound Simulation and Visualization Torbjorn Loken, Torbjorn Loken, Sergiu M. Dascalu, and Frederick C Harris, Jr. Department of Computer Science](https://reader036.vdocuments.site/reader036/viewer/2022081506/5697bfdf1a28abf838cb26cc/html5/thumbnails/24.jpg)
Increasing Programmability
Shaders– Intended for graphical use
– They were als used also to accelerate applications with a large amount of floating point math
Image processing, simulations, etc VFire
![Page 25: GPU Based Sound Simulation and Visualization Torbjorn Loken, Torbjorn Loken, Sergiu M. Dascalu, and Frederick C Harris, Jr. Department of Computer Science](https://reader036.vdocuments.site/reader036/viewer/2022081506/5697bfdf1a28abf838cb26cc/html5/thumbnails/25.jpg)
Enter CUDA
![Page 26: GPU Based Sound Simulation and Visualization Torbjorn Loken, Torbjorn Loken, Sergiu M. Dascalu, and Frederick C Harris, Jr. Department of Computer Science](https://reader036.vdocuments.site/reader036/viewer/2022081506/5697bfdf1a28abf838cb26cc/html5/thumbnails/26.jpg)
Changes
Unified Processor Architecture– No more vertex or fragment processors
Threading emphasized– Many cores running many many threads
![Page 27: GPU Based Sound Simulation and Visualization Torbjorn Loken, Torbjorn Loken, Sergiu M. Dascalu, and Frederick C Harris, Jr. Department of Computer Science](https://reader036.vdocuments.site/reader036/viewer/2022081506/5697bfdf1a28abf838cb26cc/html5/thumbnails/27.jpg)
![Page 28: GPU Based Sound Simulation and Visualization Torbjorn Loken, Torbjorn Loken, Sergiu M. Dascalu, and Frederick C Harris, Jr. Department of Computer Science](https://reader036.vdocuments.site/reader036/viewer/2022081506/5697bfdf1a28abf838cb26cc/html5/thumbnails/28.jpg)
![Page 29: GPU Based Sound Simulation and Visualization Torbjorn Loken, Torbjorn Loken, Sergiu M. Dascalu, and Frederick C Harris, Jr. Department of Computer Science](https://reader036.vdocuments.site/reader036/viewer/2022081506/5697bfdf1a28abf838cb26cc/html5/thumbnails/29.jpg)
![Page 30: GPU Based Sound Simulation and Visualization Torbjorn Loken, Torbjorn Loken, Sergiu M. Dascalu, and Frederick C Harris, Jr. Department of Computer Science](https://reader036.vdocuments.site/reader036/viewer/2022081506/5697bfdf1a28abf838cb26cc/html5/thumbnails/30.jpg)
CUDA
A subset of C with some extensions – Thread identifiers – Launching kernels– Some data types
Mainly used for organizing thread numbering
![Page 31: GPU Based Sound Simulation and Visualization Torbjorn Loken, Torbjorn Loken, Sergiu M. Dascalu, and Frederick C Harris, Jr. Department of Computer Science](https://reader036.vdocuments.site/reader036/viewer/2022081506/5697bfdf1a28abf838cb26cc/html5/thumbnails/31.jpg)
Example Kernel
__global__ void kernel(float* a, int N) {int idx = threadIdx.x;if(idx < N) {
a[idx] = a[idx] * a[idx];}
}
![Page 32: GPU Based Sound Simulation and Visualization Torbjorn Loken, Torbjorn Loken, Sergiu M. Dascalu, and Frederick C Harris, Jr. Department of Computer Science](https://reader036.vdocuments.site/reader036/viewer/2022081506/5697bfdf1a28abf838cb26cc/html5/thumbnails/32.jpg)
Now back to Sound Simulation
![Page 33: GPU Based Sound Simulation and Visualization Torbjorn Loken, Torbjorn Loken, Sergiu M. Dascalu, and Frederick C Harris, Jr. Department of Computer Science](https://reader036.vdocuments.site/reader036/viewer/2022081506/5697bfdf1a28abf838cb26cc/html5/thumbnails/33.jpg)
Sound Simulation
What are the acoustic properties of a room?
What acoustic phenomena will be produced in a room?
![Page 34: GPU Based Sound Simulation and Visualization Torbjorn Loken, Torbjorn Loken, Sergiu M. Dascalu, and Frederick C Harris, Jr. Department of Computer Science](https://reader036.vdocuments.site/reader036/viewer/2022081506/5697bfdf1a28abf838cb26cc/html5/thumbnails/34.jpg)
Wave Simulation Techniques
Geometric – Ray tracing
Numeric– Finite Element Methods(FEM)
Breaks domain into many smaller domains
– Finite Difference Time Domain(FDTD) Grid based
![Page 35: GPU Based Sound Simulation and Visualization Torbjorn Loken, Torbjorn Loken, Sergiu M. Dascalu, and Frederick C Harris, Jr. Department of Computer Science](https://reader036.vdocuments.site/reader036/viewer/2022081506/5697bfdf1a28abf838cb26cc/html5/thumbnails/35.jpg)
FDTD
Decomposes the space in a rectilinear grid Visualization easy. Naturally very data parallel
– Easy to fit to SIMD Computationally expensive
– Increased frequency range -> Increased resolution of grid and decreased timestep size
![Page 36: GPU Based Sound Simulation and Visualization Torbjorn Loken, Torbjorn Loken, Sergiu M. Dascalu, and Frederick C Harris, Jr. Department of Computer Science](https://reader036.vdocuments.site/reader036/viewer/2022081506/5697bfdf1a28abf838cb26cc/html5/thumbnails/36.jpg)
Radio Wave Propagation
Simulating a cellular telephone in an elevator
![Page 37: GPU Based Sound Simulation and Visualization Torbjorn Loken, Torbjorn Loken, Sergiu M. Dascalu, and Frederick C Harris, Jr. Department of Computer Science](https://reader036.vdocuments.site/reader036/viewer/2022081506/5697bfdf1a28abf838cb26cc/html5/thumbnails/37.jpg)
FDTD Sound Simulation
Solve for the acoustic pressure across the each point in the grid every time step
4 Different cases based on the boundaries at a grid point
![Page 38: GPU Based Sound Simulation and Visualization Torbjorn Loken, Torbjorn Loken, Sergiu M. Dascalu, and Frederick C Harris, Jr. Department of Computer Science](https://reader036.vdocuments.site/reader036/viewer/2022081506/5697bfdf1a28abf838cb26cc/html5/thumbnails/38.jpg)
Implementation
1 array which encodes the boundaries for each point on the grid (the boundary is constant for the entire simulation)
A series of arrays for holding the current simulation state
![Page 39: GPU Based Sound Simulation and Visualization Torbjorn Loken, Torbjorn Loken, Sergiu M. Dascalu, and Frederick C Harris, Jr. Department of Computer Science](https://reader036.vdocuments.site/reader036/viewer/2022081506/5697bfdf1a28abf838cb26cc/html5/thumbnails/39.jpg)
0110
1110
1010
1011
1111
0111
1001
1101
0101
![Page 40: GPU Based Sound Simulation and Visualization Torbjorn Loken, Torbjorn Loken, Sergiu M. Dascalu, and Frederick C Harris, Jr. Department of Computer Science](https://reader036.vdocuments.site/reader036/viewer/2022081506/5697bfdf1a28abf838cb26cc/html5/thumbnails/40.jpg)
System architecture
3 Components– Simulation Manager– Memory Manager– Renderer
![Page 41: GPU Based Sound Simulation and Visualization Torbjorn Loken, Torbjorn Loken, Sergiu M. Dascalu, and Frederick C Harris, Jr. Department of Computer Science](https://reader036.vdocuments.site/reader036/viewer/2022081506/5697bfdf1a28abf838cb26cc/html5/thumbnails/41.jpg)
![Page 42: GPU Based Sound Simulation and Visualization Torbjorn Loken, Torbjorn Loken, Sergiu M. Dascalu, and Frederick C Harris, Jr. Department of Computer Science](https://reader036.vdocuments.site/reader036/viewer/2022081506/5697bfdf1a28abf838cb26cc/html5/thumbnails/42.jpg)
System Architecture
Each component runs on its own thread Inter-thread communication done with
thread-safe queues
![Page 43: GPU Based Sound Simulation and Visualization Torbjorn Loken, Torbjorn Loken, Sergiu M. Dascalu, and Frederick C Harris, Jr. Department of Computer Science](https://reader036.vdocuments.site/reader036/viewer/2022081506/5697bfdf1a28abf838cb26cc/html5/thumbnails/43.jpg)
CPU
GPU
Simulation Manager
RendererMemory Manager
Simulation Data
OpenGL Data
Frame Data
![Page 44: GPU Based Sound Simulation and Visualization Torbjorn Loken, Torbjorn Loken, Sergiu M. Dascalu, and Frederick C Harris, Jr. Department of Computer Science](https://reader036.vdocuments.site/reader036/viewer/2022081506/5697bfdf1a28abf838cb26cc/html5/thumbnails/44.jpg)
![Page 45: GPU Based Sound Simulation and Visualization Torbjorn Loken, Torbjorn Loken, Sergiu M. Dascalu, and Frederick C Harris, Jr. Department of Computer Science](https://reader036.vdocuments.site/reader036/viewer/2022081506/5697bfdf1a28abf838cb26cc/html5/thumbnails/45.jpg)
Texture Mapped Volume Rendering Uses alpha blending to quickly render
volumetric data.
![Page 47: GPU Based Sound Simulation and Visualization Torbjorn Loken, Torbjorn Loken, Sergiu M. Dascalu, and Frederick C Harris, Jr. Department of Computer Science](https://reader036.vdocuments.site/reader036/viewer/2022081506/5697bfdf1a28abf838cb26cc/html5/thumbnails/47.jpg)
Thank you!
![Page 48: GPU Based Sound Simulation and Visualization Torbjorn Loken, Torbjorn Loken, Sergiu M. Dascalu, and Frederick C Harris, Jr. Department of Computer Science](https://reader036.vdocuments.site/reader036/viewer/2022081506/5697bfdf1a28abf838cb26cc/html5/thumbnails/48.jpg)
GPU Based Sound Simulation and Visualization
Torbjorn Loken,
Sergiu M. Dascalu, and
Frederick C Harris, Jr.
Department of Computer Science and Engineering
University of Nevada, Reno
![Page 49: GPU Based Sound Simulation and Visualization Torbjorn Loken, Torbjorn Loken, Sergiu M. Dascalu, and Frederick C Harris, Jr. Department of Computer Science](https://reader036.vdocuments.site/reader036/viewer/2022081506/5697bfdf1a28abf838cb26cc/html5/thumbnails/49.jpg)