[MOAB-dev] r4398 - in MOAB/trunk: src src/io src/moab test
kraftche at cae.wisc.edu
kraftche at cae.wisc.edu
Tue Dec 21 16:16:20 CST 2010
Author: kraftche
Date: 2010-12-21 16:16:20 -0600 (Tue, 21 Dec 2010)
New Revision: 4398
Added:
MOAB/trunk/src/BitPage.cpp
MOAB/trunk/src/BitPage.hpp
MOAB/trunk/src/BitTag.cpp
MOAB/trunk/src/BitTag.hpp
MOAB/trunk/src/DenseTag.cpp
MOAB/trunk/src/DenseTag.hpp
MOAB/trunk/src/MeshTag.cpp
MOAB/trunk/src/MeshTag.hpp
MOAB/trunk/src/SparseTag.cpp
MOAB/trunk/src/SparseTag.hpp
MOAB/trunk/src/VarLenDenseTag.cpp
MOAB/trunk/src/VarLenDenseTag.hpp
MOAB/trunk/src/VarLenSparseTag.cpp
MOAB/trunk/src/VarLenSparseTag.hpp
Removed:
MOAB/trunk/src/BitTagServer.cpp
MOAB/trunk/src/BitTagServer.hpp
MOAB/trunk/src/SparseTagCollection.cpp
MOAB/trunk/src/SparseTagCollection.hpp
MOAB/trunk/src/TagServer.cpp
MOAB/trunk/src/TagServer.hpp
Modified:
MOAB/trunk/src/Core.cpp
MOAB/trunk/src/HigherOrderFactory.cpp
MOAB/trunk/src/Internals.hpp
MOAB/trunk/src/Makefile.am
MOAB/trunk/src/SequenceData.cpp
MOAB/trunk/src/SequenceData.hpp
MOAB/trunk/src/SequenceManager.cpp
MOAB/trunk/src/SequenceManager.hpp
MOAB/trunk/src/TagCompare.hpp
MOAB/trunk/src/TagInfo.cpp
MOAB/trunk/src/TagInfo.hpp
MOAB/trunk/src/TypeSequenceManager.cpp
MOAB/trunk/src/TypeSequenceManager.hpp
MOAB/trunk/src/VarLenTag.hpp
MOAB/trunk/src/WriteUtil.cpp
MOAB/trunk/src/io/ReadHDF5.cpp
MOAB/trunk/src/io/WriteHDF5.cpp
MOAB/trunk/src/moab/Core.hpp
MOAB/trunk/src/moab/Interface.hpp
MOAB/trunk/src/moab/Types.hpp
MOAB/trunk/test/TagTest.cpp
MOAB/trunk/test/TestTypeSequenceManager.cpp
Log:
reorganize tag storage
Copied: MOAB/trunk/src/BitPage.cpp (from rev 4369, MOAB/trunk/src/BitTagServer.cpp)
===================================================================
--- MOAB/trunk/src/BitPage.cpp (rev 0)
+++ MOAB/trunk/src/BitPage.cpp 2010-12-21 22:16:20 UTC (rev 4398)
@@ -0,0 +1,37 @@
+#include "BitPage.hpp"
+#include "moab/Range.hpp"
+#include <stdlib.h>
+#include <string.h>
+
+namespace moab {
+
+void BitPage::search( unsigned char value, int offset, int count,
+ int per_ent, Range& results, EntityHandle start ) const
+{
+ const int end = offset + count;
+ Range::iterator hint = results.begin();
+ while (offset != end) {
+ if (get_bits( offset, per_ent ) == value)
+ hint = results.insert( hint, start );
+ ++offset;
+ ++start;
+ }
+}
+
+BitPage::BitPage( int per_ent, unsigned char init_val )
+{
+ unsigned char mask = (1<<per_ent)-1; // 2^per_ent - 1
+ init_val &= mask;
+ switch (per_ent) {
+ default: assert(false); abort(); break; // must be power of two
+ // Note: no breaks. fall through such that all bits in init_val are set
+ case 1: init_val |= (init_val << 1);
+ case 2: init_val |= (init_val << 2);
+ case 4: init_val |= (init_val << 4);
+ case 8: ;
+ }
+ memset( byteArray, init_val, BitTag::PageSize );
+}
+
+
+} // namespace moab
Copied: MOAB/trunk/src/BitPage.hpp (from rev 4369, MOAB/trunk/src/BitTagServer.hpp)
===================================================================
--- MOAB/trunk/src/BitPage.hpp (rev 0)
+++ MOAB/trunk/src/BitPage.hpp 2010-12-21 22:16:20 UTC (rev 4398)
@@ -0,0 +1,172 @@
+#ifndef BIT_PAGE_HPP
+#define BIT_PAGE_HPP
+
More information about the moab-dev
mailing list