Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
11 Views

Fast data buffer initialisation routine

I can't find a fast data buffer initialisation routine in MKL, VML etc (Typical use would be to set all array elements to zero.) I would have thought that this would be a useful routine. I did a lot of work with the Digital Extended Maths Library some years ago which from memory had a fast initialisation routine.

Apologies if there is one and I've missed it

David

0 Kudos
1 Reply
Highlighted
Valued Contributor I
11 Views

Hi,

On C/C++ you can use standard
Function: void * memset (void *BLOCK, int C, size_t SIZE)
This function copies the value of C (converted to an `unsigned
char') into each of the first SIZE bytes of the object beginning
at BLOCK. It returns the value of BLOCK.

And in case of using Intel compilers it will be highly optimized.
0 Kudos