BeBOP Optimized Sparse Kernel Interface Library  1.0.1h
Defines | Functions
memcpy.h File Reference

Macros for typed block memory copy operations. More...

#include <string.h>

Go to the source code of this file.

Defines

#define INC_OSKI_MEMCPY_H
 oski/memcpy.h included.
#define oski_CopyMem(dest, src, elem_type, num_elems)
 Copy a typed block of consecutive memory elements from one buffer to another.

Functions

char * oski_DuplicateString (const char *s)
 Returns a newly allocated copy of the NULL-terminated string 's'.

Detailed Description

Macros for typed block memory copy operations.


Define Documentation

oski/memcpy.h included.

#define oski_CopyMem (   dest,
  src,
  elem_type,
  num_elems 
)
Value:
memcpy((void *)(dest), (const void *)(src), \
        (num_elems) * sizeof(elem_type))

Copy a typed block of consecutive memory elements from one buffer to another.

This implementation is simply a wrapper around memcpy.

Parameters:
[out]destBuffer into which to copy.
[in]srcBuffer from which to copy.
[in]num_elemsInteger number of logical elements.
[in]elem_typeType of each logical element.
Returns:
A typed pointer to the destination buffer.

Referenced by array_Duplicate(), CalcMinMaxMedian(), ConvertFullBlocksFromCSR(), ConvertToCSR(), ConvertToCSR_Sorted(), CopyPointers(), InitSubmatCSR(), keropts_Process(), MatReprMultCore(), MBCSR_InitSubVecView(), MeasureStreamTimeCSC(), oski_ConvertMatReprToCSR(), oski_CopyMat(), oski_CopyMatRepr(), oski_CreateMatReprFromCSR(), oski_DuplicateString(), oski_ExpandCSRToFull(), oski_MatReprMult(), oski_MatReprTransMatReprMult(), oski_MatReprTrisolve(), oski_RecordCalls(), and oski_TransposeCSR().


Function Documentation

char* oski_DuplicateString ( const char *  s)

Returns a newly allocated copy of the NULL-terminated string 's'.

Parameters:
[in]sString to duplicate.
Returns:
A pointer to a newly allocated buffer containing a copy of the input string, s. If s == NULL, returns NULL. If an error occurs, returns NULL but does not call the error handler.

References oski_CopyMem, oski_DuplicateString(), and oski_Malloc.

Referenced by ConvertLuaMat(), ConvertLuaMatToCSR(), CreateLuaMatObj(), NewLuaMat(), oski_CopyMat(), oski_CreateLuaMatReprGeneric2IndexFromCSR(), oski_CreateLuaMatReprGenericFromCSR(), oski_DuplicateString(), oski_GetMatTransforms(), oski_RegisterHeur(), oski_RegisterMatType(), and oski_ReplaceTunedMatRepr().