#ifndef ATOM_CHUNK_H
#define ATOM_CHUNK_H

#include <vector>

namespace MM
{

template 
<
    typename real,
    int chunk_size
    //std::size_t big_blocks
>
struct Atom_chunk_template
{
    int     index;

    struct Next
    {
        int     index;
        real    A, B;

        Next() : index(0), A(-1.f), B(0.f) {}  //fix remove
    };

    //std::vector<Next>    next;
    Next                   next[chunk_size];

    //Atom_chunk_template (int index, int size) : index(index), next(size) {}
    //Atom_chunk_template () : index(-1), next(64) {}

//    explicit Atom_chunk_template (int index, int i=0 ) : index(index) {}
    explicit Atom_chunk_template (int index) : index(index) {}
    explicit Atom_chunk_template () : index(-1) {}
    

    //bool    miss     (int i) const {return next[i].A < 0.f;}
    //void    set_miss (int i) const {next[i].A == -1.f;}
    
    //int     count () const {return next.size();}
    int     count () const {return chunk_size;}
};

//typedef Atom_chunk_template<float>  Atom_chunk;
//typedef Atom_chunk_template<float, 128>  Atom_chunk;
typedef Atom_chunk_template<float, 2>   Atom_chunk_small;
//typedef Atom_chunk_template<float, 4>   Atom_chunk_middle;
typedef Atom_chunk_template<float, 64>  Atom_chunk_big;


}//MM

#endif //ATOM_CHUNK_H
