 NCVStatus ncvHaarGetClassifierSize(const std::string &filename, Ncv32u &numStages,
                                    Ncv32u &numNodes, Ncv32u &numFeatures)
 {
+    size_t readCount;
     NCVStatus ncvStat;
 
     std::string fext = filename.substr(filename.find_last_of(".") + 1);

__device__ Ncv32u d_outMaskPosition;


__inline __device__ void compactBlockWriteOutAnchorParallel(NcvBool threadPassFlag,
                                                            Ncv32u threadElem,
                                                            Ncv32u *vectorOut)
{
#if __CUDA_ARCH__ >= 110
    Ncv32u passMaskElem = threadPassFlag ? 1 : 0;
    __shared__ Ncv32u shmem[NUM_THREADS_ANCHORSPARALLEL * 2];
    Ncv32u incScan = blockScanInclusive<Ncv32u, NUM_THREADS_ANCHORSPARALLEL>(passMaskElem, shmem);
    __syncthreads();
    Ncv32u excScan = incScan - passMaskElem;

    __shared__ Ncv32u numPassed;
    __shared__ Ncv32u outMaskOffset;
    if (threadIdx.x == NUM_THREADS_ANCHORSPARALLEL-1)
    {
        numPassed = incScan;
        outMaskOffset = atomicAdd(&d_outMaskPosition, incScan);
    }
    __syncthreads();

    if (threadPassFlag)
    {
        shmem[excScan] = threadElem;
    }
    __syncthreads();

    if (threadIdx.x < numPassed)

    fdata.resize(fsize);
    Ncv32u dataOffset = 0;
    fseek(fp, 0, SEEK_SET);
    readCount = fread(&fdata[0], fsize, 1, fp);
    ncvAssertReturn(1 == readCount, NCV_FILE_ERROR);
    fclose(fp);

    //data
