Hadamard product is element-wise multiplication of two vectors of same size.
These are the templates to configure the function.
Parameters:
TT_DATA_A | describes the type of individual data samples input to the function. This is a typename and must be one of the following: int16, int32, cint16, cint32, float, cfloat. |
TT_DATA_B | describes the type of individual data samples input to the function. This is a typename and must be one of the following: int16, int32, cint16, cint32, float, cfloat. |
TP_DIM | describes the number of samples in the vectors A and B. |
TP_NUM_FRAMES | describes the number of vectors to be processed in each call to this function. |
TP_SHIFT | describes power of 2 shift down applied to the accumulation of product terms before each output. TP_SHIFT must be in the range 0 to 59 (61 for AIE1). |
TP_API | described whether to use streams (1) or windows (0). |
TP_SSR | describes the number of kernels to use in parallel. |
TP_RND | describes the selection of rounding to be applied during the shift down stage of processing. Although, TP_RND accepts unsigned integer values descriptive macros are recommended where
|
TP_SAT | describes the selection of saturation to be applied during the shift down stage of processing. TP_SAT accepts unsigned integer values, where:
|
template < typename TT_DATA_A, typename TT_DATA_B, unsigned int TP_DIM, unsigned int TP_NUM_FRAMES, unsigned int TP_SHIFT, unsigned int TP_API, unsigned int TP_SSR, unsigned int TP_RND = 0, unsigned int TP_SAT = 1 > class hadamard_graph: public graph // fields port_array <input, TP_SSR> inA port_array <input, TP_SSR> inB port_array <output, TP_SSR> out kernel m_kernels[TP_SSR]