
function [bb] = mapBB ( max_clm_idx , numBlocks )

%% find bounding box for each bb

%% minRow, maxRow, minClm, maxClm

%% 4 -> 5 -> 6
%% 1 -> 2 -> 3
tileSize = (max_clm_idx) / sqrt(numBlocks) ;
idx = 0 ;
for i=1:sqrt(numBlocks)
    for j=1:sqrt(numBlocks)
       idx = idx + 1 ;
     
       bb(idx).minClm = tileSize * (j-1) + 1;
       bb(idx).maxClm = bb(idx).minClm + tileSize - 1 ;
       bb(idx).minRow = tileSize * (i-1) + 1;
       bb(idx).maxRow = bb(idx).minRow + tileSize - 1; 
    end
end
