/*
* kern/dqdt.h - Distributed Quad Decision Tree
*
* Author : Alain Greiner (2016,2017,2018)
*
* Copyright (c) UPMC Sorbonne Universites
*
* This file is part of ALMOS-MKH
*
* ALMOS-kernel is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by
* the Free Software Foundation; version 2.0 of the License.
*
* ALMOS-kernel is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with ALMOS-kernel; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef _DQDT_H_
#define _DQDT_H_
#include
#include
#include
/****************************************************************************************
* This DQDT infrastructure maintains a topological description of ressources usage
* in each cluster: number of threads, and number of physical pages allocated.
*
* - If X_SIZE or Y_SIZE are equal to 1, it makes the assumption that the cluster
* topology is a one dimensionnal vector, an build the smallest one-dimensionnal
* quad-tree covering this one-dimensionnal vector. If the number of clusters
* is not a power of 4, the tree is truncated as required.
*
* TODO : the mapping for the one dimensionnal topology is not implemented yet [AG].
*
* - If both Y_SIZE and Y_SIZE are larger than 1, it makes the assumption that
* the clusters topology is a 2D mesh. The [X,Y] coordinates of a cluster are
* obtained from the CXY identifier using the Rrelevant macros.
* X = CXY >> Y_WIDTH / Y = CXY & ((1<