Developer Reference for Intel® oneAPI Math Kernel Library for C

ID 766684
Date 7/13/2023
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

mkl_malloc

Allocates an aligned memory buffer.

Syntax

void* mkl_malloc (size_t alloc_size, int alignment);

Include Files

  • mkl.h

Input Parameters

Name

Type

Description

alloc_size

size_t

Size of the buffer to be allocated.

alignment

int

Alignment of the buffer.

Description

The function allocates an alloc_size-byte buffer aligned on the alignment-byte boundary.

If alignment is not a power of 2, the 64-byte alignment is used.

Return Values

Name

Type

Description

a_ptr

void*

Pointer to the allocated buffer if alloc_size 1,

NULL if alloc_size < 1.