libsc 2.8.7.187-a49fd
The SC library provides support for parallel scientific applications.
Loading...
Searching...
No Matches
sc_unique_counter.h
1/*
2 This file is part of the SC Library.
3 The SC Library provides support for parallel scientific applications.
4
5 Copyright (C) 2010 The University of Texas System
6 Additional copyright (C) 2011 individual authors
7
8 The SC Library is free software; you can redistribute it and/or
9 modify it under the terms of the GNU Lesser General Public
10 License as published by the Free Software Foundation; either
11 version 2.1 of the License, or (at your option) any later version.
12
13 The SC Library is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 Lesser General Public License for more details.
17
18 You should have received a copy of the GNU Lesser General Public
19 License along with the SC Library; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21 02110-1301, USA.
22*/
23
24#ifndef SC_UNIQUE_COUNTER_H
25#define SC_UNIQUE_COUNTER_H
26
27#include <sc_containers.h>
28
36
44sc_unique_counter_t *sc_unique_counter_new (int start_value);
45
50void sc_unique_counter_destroy (sc_unique_counter_t * uc);
51
55size_t sc_unique_counter_memory_used (sc_unique_counter_t * uc);
56
66int *sc_unique_counter_add (sc_unique_counter_t * uc);
67
74void sc_unique_counter_release (sc_unique_counter_t * uc,
75 int *counter);
76
77#endif /* !SC_UNIQUE_COUNTER */
Dynamic containers such as lists, arrays, and hash tables.
The sc_mempool object provides a large pool of equal-size elements.
Definition sc_containers.h:747
Public structure defining a unique counter object.
Definition sc_unique_counter.h:31
int start_value
First value overall.
Definition sc_unique_counter.h:32
sc_mempool_t * mempool
Underlying storage.
Definition sc_unique_counter.h:33