cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
pdiffley
Contributor
Contributor
492 Views
Registered: ‎05-07-2019

Can SDAccel kernels use C++ templates?

Jump to solution

I would like to make a kernel that can be used with various datatypes.

0 Kudos
1 Solution

Accepted Solutions
brucey
Xilinx Employee
Xilinx Employee
447 Views
Registered: ‎03-24-2010

You can use templates but do not use templates as top-level function.  For top-level function, you need to create unique instances.

Regards,
brucey
----------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.

Give Kudos to a post which you think is helpful and reply oriented.
----------------------------------------------------------------------------------------------

View solution in original post

2 Replies
brucey
Xilinx Employee
Xilinx Employee
448 Views
Registered: ‎03-24-2010

You can use templates but do not use templates as top-level function.  For top-level function, you need to create unique instances.

Regards,
brucey
----------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.

Give Kudos to a post which you think is helpful and reply oriented.
----------------------------------------------------------------------------------------------

View solution in original post

pdiffley
Contributor
Contributor
439 Views
Registered: ‎05-07-2019

Thanks!

0 Kudos