 
         int* h_num_extrema = oct_obj.getExtremaMgmtH();
         int* d_num_extrema = oct_obj.getExtremaMgmtD();
+        int* d_num_featvec = oct_obj.getFeatVecMgmtD();
         int* orientation_num_blocks = oct_obj.getNumberOfOriBlocks( );
 
         for( int level=1; level<_levels-2; level++ ) {

    ext->num_ori = angles;
}


__global__
void orientation_starter_v1( Extremum*     extremum,
                             int*          extrema_counter,
                             Plane2D_float layer )
{
    dim3 block;
    dim3 grid;
    grid.x  = *extrema_counter;
    block.x = ORI_V1_NUM_THREADS;

    if( grid.x != 0 ) {
        compute_keypoint_orientations_v1
            <<<grid,block>>>
            ( extremum,
              extrema_counter,
              layer );
    }
}


            grid.x  = h_num_extrema[level];
            block.x = ORI_V1_NUM_THREADS;
            if( grid.x != 0 ) {
                compute_keypoint_orientations
                    <<<grid,block,0,oct_str>>>
                    ( oct_obj.getExtrema( level ),
                      &d_num_extrema[level],
                      oct_obj.getData( level ),
                      &orientation_num_blocks[level],
                      grid.x * grid.y );

                block.x = 32;
                block.y = 32;
                grid.x  = 1;
                ori_prefix_sum
                    <<<grid,block,0,oct_str>>>
                    ( &d_num_extrema[level],
                      &d_num_featvec[level],
                      oct_obj.getExtrema( level ) );
            }
        }
    }
