Input from a file or database

I want to know how to take input from a file or a database for cuda computations ?

  • read input from file/DB and store into host memory(array, vector).
  • copy them to device memmory using cudaMemcpy

Is it necessary to use the sqlapi++ library if i want to access the data from database using c++ language or is there any other alternative For accessing data fron database using c++?

This has nothing to do with cuda programming.