Quantcast
Channel: Intel® Software - Intel® oneAPI Math Kernel Library & Intel® Math Kernel Library
Viewing all articles
Browse latest Browse all 3005

what is ARR_HDR_SIZE in IPP samples

$
0
0

Hello All,

I am implementing the JPEG encoding and everything looks fine. But, I want to know the ARR_HDR_SIZE  in uic samples 

 

#include <stdlib.h>
#include <etxt.h>
#include "uic_new.h"

using namespace UIC;

static const unsigned int ARR_HDR_SIZE = 32;

void* UIC::ArrAlloc   (Ipp32u itemSize, Ipp32u nOfItems)
{
    void *buff = malloc(itemSize * nOfItems + ARR_HDR_SIZE);
    unsigned int *countOf = (unsigned int*)buff;

    *countOf = nOfItems;

    return ((Etxt_DText)buff) + ARR_HDR_SIZE;
}

void  UIC::ArrFree    (const void* arr)
{
    Etxt_DText tmp = (Etxt_DText) arr;
    tmp -= ARR_HDR_SIZE;
    free(tmp);
}

Ipp32u UIC::ArrCountOf(const void* arr)
{
    Etxt_DText tmp = (Etxt_DText) arr;
    tmp -= ARR_HDR_SIZE;
    return *((unsigned int *)tmp );
}

in the above code what is the ARR_HDR_SIZE   and what it represents?.

could you anyone help me.

Regards,

sathish


Viewing all articles
Browse latest Browse all 3005

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>