Skip to content

Commit 7163fc9

Browse files
committed
opal/class: add a new class: opal_interval_tree_t
This commit adds a new class to opal: opal_interval_tree_t. This is a thread-safe impelementation of a 1-dimensional interval tree. The data structure is intended to provide a faster implementation of the registration cache VMA tree. The thread safety is provided by a relativistic red-black tree implementation. This structure provides support for multiple-reader, and single writer. There is one caveat, an item may appear in the tree twice while the tree is being updated. Care needs to be taken to avoid issues associated with this "feature". I don't anticipate a problem with the current VMA tree usage. Signed-off-by: Nathan Hjelm <[email protected]>
1 parent 5c59876 commit 7163fc9

File tree

3 files changed

+1155
-3
lines changed

3 files changed

+1155
-3
lines changed

opal/class/Makefile.am

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# Copyright (c) 2004-2005 The Regents of the University of California.
1212
# All rights reserved.
1313
# Copyright (c) 2014 Cisco Systems, Inc. All rights reserved.
14-
# Copyright (c) 2014-2015 Los Alamos National Security, LLC. All rights
14+
# Copyright (c) 2014-2018 Los Alamos National Security, LLC. All rights
1515
# reserved.
1616
# $COPYRIGHT$
1717
#
@@ -38,7 +38,8 @@ headers += \
3838
class/opal_pointer_array.h \
3939
class/opal_value_array.h \
4040
class/opal_ring_buffer.h \
41-
class/opal_rb_tree.h
41+
class/opal_rb_tree.h \
42+
class/opal_interval_tree.h
4243

4344
lib@OPAL_LIB_PREFIX@open_pal_la_SOURCES += \
4445
class/opal_bitmap.c \
@@ -54,4 +55,5 @@ lib@OPAL_LIB_PREFIX@open_pal_la_SOURCES += \
5455
class/opal_pointer_array.c \
5556
class/opal_value_array.c \
5657
class/opal_ring_buffer.c \
57-
class/opal_rb_tree.c
58+
class/opal_rb_tree.c \
59+
class/opal_interval_tree.c

0 commit comments

Comments
 (0)