Next: , Previous: bpipe_matrix_squeeze, Up: Utility Functions


A.4.17 bpipe_memfill

Fill a region of memory with data.

Synopsis

     #include <bpipe/bpipe.h>
     
     
     
void bpipe_memfill( void *dstp, size_t n_dst, void *srcp, size_t n_src, size_t size );

Parameters

void *dstp
the memory to fill
size_t n_dst
the number of data elements in the destination
void *srcp
the data to replicate
size_t n_src
the number of data elements in the src
size_t size
the size of a data element

Description

This routine will replicate user supplied data throughout a region of memory. It uses memcpy, and attempts to invoke it as few times as possible.