On 06/01/2015 11:01 PM, Kamal Iqramuddin Kamal Arifin wrote:
> Hi,
> Sorry but this is a stupid-simple question. I have created my own parser
> using standard C++ library. How do I store the data in the host and copy
> to ArrayFire?
You can use one of the copy constructors in ArrayFire. For example:
// Create a six-element array on the host
float hA[] = {0, 1, 2, 3, 4, 5};
// Which can be copied into an ArrayFire Array using the pointer copy
// constructor. Here we copy the data into a 2x3 matrix:
array A(2, 3, hA);
The full list of constructors can be found in the documentation:
http://arrayfire.com/docs/group__construct__mat.htm
Kind regards,
Brian
> <mailto:
arrayfire-use...@googlegroups.com>.
> <mailto:
arrayfi...@googlegroups.com>.
> <
https://groups.google.com/d/msgid/arrayfire-users/4348c0be-d4af-465e-afe6-f17bcab09ff7%40googlegroups.com?utm_medium=email&utm_source=footer>.
> *Thanks & Regards,*
> *
> *
> *_MUHAMMAD KAMAL IQRAMUDDIN BIN KAMAL ARIFIN_*
> Bachelor of Technology,
> Information and Communication Technology,
> Universiti Teknologi PETRONAS/./
> Phone : _
+601111002423_
> E-mail : _
kamaliq...@gmail.com <mailto:
kamaliq...@gmail.com>_
>
> --
> You received this message because you are subscribed to the Google
> Groups "ArrayFire Users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to
arrayfire-use...@googlegroups.com
> <mailto:
arrayfire-use...@googlegroups.com>.
> <mailto:
arrayfi...@googlegroups.com>.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/arrayfire-users/CAGg9qKYFznrNSV%3D0gwr5AM5cgPie_FZA1genag%3Dg74gqRLTMsw%40mail.gmail.com
> <
https://groups.google.com/d/msgid/arrayfire-users/CAGg9qKYFznrNSV%3D0gwr5AM5cgPie_FZA1genag%3Dg74gqRLTMsw%40mail.gmail.com?utm_medium=email&utm_source=footer>.