hypre/parcsr_mv/numbers.h
falgout e3181f26b1 Added 64 bit feature using HYPRE_Int (see tracker [issue489] for details).
Changed MPI routines to hypre_MPI routines.
Added hypre_printf, etc. routines.
Added AUTOTEST tests to look for 'int' and 'MPI_' calls.
Added a new approach for the Fortran interface (not implemented everywhere yet).
2010-12-20 19:27:44 +00:00

63 lines
2.4 KiB
C

/*BHEADER**********************************************************************
* Copyright (c) 2008, Lawrence Livermore National Security, LLC.
* Produced at the Lawrence Livermore National Laboratory.
* This file is part of HYPRE. See file COPYRIGHT for details.
*
* HYPRE is free software; you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License (as published by the Free
* Software Foundation) version 2.1 dated February 1999.
*
* $Revision$
***********************************************************************EHEADER*/
/******************************************************************************
*
* Tree structure for keeping track of numbers (e.g. column numbers) -
* when you get them one at a time, in no particular order, possibly very
* sparse. In a scalable manner you want to be able to store them and find
* out whether a number has been stored.
* All decimal numbers will fit in a tree with 10 branches (digits)
* off each node. We also have a terminal "digit" to indicate that the entire
* number has been seen. E.g., 1234 would be entered in a tree as:
* (numbering the digits off a node as 0 1 2 3 4 5 6 7 8 9 TERM )
* root
* |
* - - - - 4 - - - - - -
* |
* - - - 3 - - - - - - -
* |
* - - 2 - - - - - - - -
* |
* - 1 - - - - - - - - -
* |
* - - - - - - - - - - T
*
*
* This tree represents a number through its decimal expansion, but if needed
* base depends on how the numbers encountered are distributed. Totally
* The more clustered, the larger the base should be in my judgement.
*
*****************************************************************************/
#ifndef hypre_NUMBERS_HEADER
#define hypre_NUMBERS_HEADER
typedef struct {
void * digit[11];
/* ... should be hypre_NumbersNode * digit[11]; */
} hypre_NumbersNode;
hypre_NumbersNode * hypre_NumbersNewNode(void);
void hypre_NumbersDeleteNode( hypre_NumbersNode * node );
HYPRE_Int hypre_NumbersEnter( hypre_NumbersNode * node, const HYPRE_Int n );
HYPRE_Int hypre_NumbersNEntered( hypre_NumbersNode * node );
HYPRE_Int hypre_NumbersQuery( hypre_NumbersNode * node, const HYPRE_Int n );
HYPRE_Int * hypre_NumbersArray( hypre_NumbersNode * node );
#endif