Skip to content

shuyangsun/Function-Approximation-on-CUDA

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

83 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Function Approximation

An example of how to use orthogonal projection to speed up some mathematical CUDA kernels. Checkout this article I wrote for a detailed explanation of the math and implementation behind it.

Introduction

Some CUDA kernels perform heavy scientific computing tasks, this sample project shows how to find alternative functions and speed up the kernel.

Functionalities

Orthogonal Projection Calculator

To approximate functions with polynomial, use opc.py (Orthogonal Projection Calculator). It's able to calculate the derivative, integral of a polynomial; get an orthonormal basis of an inner product space of polynomials; or find polynomial approximation of any continuous real-valued function.

To get a detailed list of its commands, use python opc.py --help. Make sure you have Python 3 and SymPy installed.

CUDA Program

The CUDA program in this project is an implementation of a specific example I mentioned in the article. It contains many testing cases to prove the claims in the article.

Supplementary Resources

The supplementary_resources folder contains some additional materials to help you understand orthogonal projection visually (a macOS Grapher file), and a text file with a sample output of Orthogonal Projection Calculator when approximating a function.

About

A demo for using Reiz-Representation Theorem to speed up integral calculation for certain trig functions on GPU.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published