LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

CUDA sine function

Hello!

I have a large array of elements.  I need to calculate the cosine of each element of this array. How can I do this using CUDA?

Thank you

0 Kudos
Message 1 of 4
(201 Views)

@nakom wrote:

Hello!

I have a large array of elements.  I need to calculate the cosine of each element of this array. How can I do this using CUDA?

Thank you


Are you expecting to post a question and expect someone to do the work for you?

I don't understand attitude like yours.

0 Kudos
Message 2 of 4
(198 Views)

Hi nakom,

 


@nakom wrote:

I have a large array of elements.  I need to calculate the cosine of each element of this array. How can I do this using CUDA?


Apply the Cosine function on your "large array", it is polymorphic…

 

Why do you want to use CUDA?

Why is the thread title about "sine", but the message about "cosine"?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO
0 Kudos
Message 3 of 4
(193 Views)

CUDA sounds nice in theory for something like that. In practice it is useless. To perform the operation as graphics accelerated function the "large" array has to be transported to the graphics card over the PCI bus, the CUDA processors need to process it and then the data needs to be transferred back to the main memory. These two transfers back and forth easily can make and to dominate the time needed and will destroy any performance gain you could get from the CUDA accelerated operation.

 

CUDA only makes sense if you can download data to the card and do a lot of massive calculations on them before they need to be transferred back. Otherwise the bus transfer times are the dominant part of the processing and even your "super accelerated" graphics operation is not able to make up for that time.

 

And once you venture into such highly customized graphics processing algorithmes you end up writing C code for the CUDA compiler, and that is even more complicated than normal C code on the host system.

Rolf Kalbermatter
Averna BV
0 Kudos
Message 4 of 4
(175 Views)