Sadhana Rayan
Sadhana Rayan

Reputation: 51

Does OpenCL 1.0 support parallel read or write from file?

I am using JOCL to write a parallel program. The OpenCL version supported by my GPU is 1.0. It allows to read arrays into global memory and process it in parallel. I have an excel file from which the data must be read into those arrays. Is it possible to read data into those arrays parallely? Is there any tutorial using which I could understand these concepts clearly?

Upvotes: 0

Views: 490

Answers (1)

Christian
Christian

Reputation: 395

I'm afraid, there is no direct way of reading files from OpenCL into a kernel program. You have to choose a file operation library to import the data into the host memory. This strongly depends on you application language (mostly C++ or Java).

After that, the usual OpenCL memory transactions can take place. Also be aware, that operations on a single file are usually hard to parallelize. Most of the executed program code is much more faster than the file operation code, especially if using OpenCL.

You can find a lot of introductional tutorial on OpenCL online. Maybe you could provide some information about your further data processings.

Upvotes: 2

Related Questions