Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
Announcements
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.
15469 Discussions

How can I get the kernel code to implement a sample by sample processing instead of an array?

FHuss10
Beginner
253 Views

__kernel void ADD_TO_ARRAY ( __global const short* restrict k_din,

__global const short* restrict k_din2,

__global short * restrict k_out )

{

for(unsigned i=0; i<20; i++)

k_dout[i] = k_din[i] * k_din2[i];

}

0.5 DSP is correctly detected for a multiplier for Arria 10.

All examples I have seen show a for loop for the block of data processing. Is it possible to process sample by sample?

OpenCl does not allow static int function scope.

I would like to process every N samples to produce a result.

Can I please get a sample code?

 

 

0 Kudos
1 Reply
GRN
Novice
206 Views

Hi FHuss10,

 

Do you mean parallel execution of each loop iteration?

You can use #pargma unroll for the loop.

Reply