Get the latest tech news

Calculating the Fibonacci numbers on GPU


In this blogpost we will show how to perform very fast calculation of the Fibonacci sequence using GPU programming. In this blogpost we will employ an NVIDI...

In this blogpost we will employ Thrust an NVIDIA library which uses concepts from modern C++ to make GPU programming easy. That means we can simply calculate Fn by performing the scan with the matrix Q and obtain the fibonacci number by taking one of the antidiagonal entries. Using the power of GPUs we are able to calculate F99999999 in only 17 milliseconds on my Consumer GPU NVIDIA GeForce RTX 3060 Mobile.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of GPU

GPU

Photo of Fibonacci

Fibonacci

Photo of Fibonacci numbers

Fibonacci numbers

Related news:

News photo

Nvidia's RTX 5050 GPU starts at $249 with last-gen GDDR6 VRAM

News photo

New budget-friendly laptops from Acer feature NVIDIA's latest RTX 5050 GPU

News photo

Voltron Data throws its weight behind AMD for GPU-accelerated SQL