oneAPI Introduction: Calculating Fibonacci Series using dynamic programming with the help of DPC++ and oneAPI

Soumik Sarkhel

Soumik Sarkhel

Kolkata, West Bengal

1 0
  • 0 Collaborators

A simple program written in DPC++ leveraging Intel oneAPI to calculate Fibonacci Series. ...learn more

Project status: Under Development

oneAPI

Intel Technologies
oneAPI, DPC++, DevCloud

Overview / Usage

Demonstrating the capabilities of DPC++ and Intel oneAPI to offload certain tasks to accelerator hardware without needing to write specific code for that architecture.

A simple program is written in DPC++ using oneAPI and SYCL to calculate Fibonacci Series upto a certain range using dynamic programming algorithm for the same.

Unified Shared Memory makes it really easy over the traditional buffer and accessor method to allocate memory for both the device and host.

Development and testing is made really easy by Intel devcloud.

Methodology / Approach

  1. Shared memory for both the device and host is created using Unified Shared Memory or USM which returns a pointer pointing to the space allocated in the shared memory.

  2. A device is selected as the accelerator hardware using the default selector.

  3. A job queue is created and parallel_for is used to calculate the Fibonacci series, this calculation itself is done by the accelerator hardware and the result is written in the shared memory space.

  4. The result is displayed back at the host from the same shared memory.

Comments (0)