67 using Teuchos::arcpCloneNode;
68 using Teuchos::arcp_reinterpret_cast;
69 using Teuchos::arcp_reinterpret_cast_nonpod;
89 ArrayRCP<A> a_arcp = arcp<A>(1);
96 const ArrayRCP<A> a1_arcp;
97 const ArrayRCP<const A> a2_arcp = a1_arcp.getConst();
104 const ArrayRCP<A> a_arcp;
105 const ArrayView<A> av = a_arcp();
112 const ArrayRCP<const A> a_arcp;
113 const ArrayView<const A> av = a_arcp();
120 const ArrayRCP<const A> a_arcp;
121 const ArrayView<const A> av = a_arcp(0, 0);
128 const ArrayRCP<const A> a_arcp;
129 const ArrayView<const A> av = a_arcp.view(0, 0);
136 const ArrayRCP<const A> a_arcp;
137 const ArrayRCP<const A> a_arcp2 = a_arcp.persistingView(0, 0);
145 ArrayRCP<A> arcp_view(data, 0, 10,
false);
146 ArrayView<A> view = arcp_view(0, 5);
148 #ifdef HAVE_TEUCHOS_ARRAY_BOUNDSCHECK
149 TEST_THROW(view.size(), DanglingReferenceError);
157 const ArrayRCP<A> a_arcp;
158 const ArrayRCP<const A> ac_arcp = a_arcp;
165 TEST_THROW(
const ArrayRCP< void> v_arcp, std::logic_error );
166 TEST_THROW(
const ArrayRCP<const void> cv_arcp, std::logic_error );
172 ArrayRCP<A> a_arcp = arcp<A>(1);
173 delete [] a_arcp.release();
179 ArrayRCP<A> a_arcp = arcp<A>(0, 0, -1,
false);
186 ArrayRCP<A> a_arcp = arcp<A, Teuchos::DeallocNull<A> >(0, 0, -1,
194 const RCP<std::vector<int> > v_rcp;
195 const ArrayRCP<int> a_arcp =
arcp(v_rcp);
202 const RCP<const std::vector<int> > v_rcp;
203 const ArrayRCP<const int> a_arcp =
arcp(v_rcp);
210 const RCP<std::vector<int> > v_rcp =
rcp(
new std::vector<int>);
211 const ArrayRCP<int> a_arcp =
arcp(v_rcp);
218 const RCP<const std::vector<int> > v_rcp =
rcp(
new std::vector<int>);
219 const ArrayRCP<const int> a_arcp =
arcp(v_rcp);
226 const ArrayRCP<const int> a_arcp =
227 Teuchos::arcpWithEmbeddedObj<int>(
new int[1], 0, 1, as<int>(1),
true);
228 const int embeddedObj = Teuchos::getEmbeddedObj<int,int>(a_arcp);
235 ECHO(ArrayRCP<int> a_arcp = arcp<int>(10));
247 ECHO(ArrayRCP<int> arcp1 = arcp<int>(10));
250 ECHO(ArrayRCP<int> arcp2 = arcp1.create_weak());
258 ECHO(ArrayRCP<int> arcp3 = arcp2.create_strong());
277 ECHO(ArrayRCP<char> arcp_char =
null);
278 ECHO(ArrayRCP<int> arcp_int = arcp_reinterpret_cast<int>(arcp_char));
286 const int sizeOfInt =
sizeof(int);
287 const int sizeOfChar =
sizeof(char);
288 const int num_ints =
n;
289 const int num_chars = (num_ints*sizeOfInt)/sizeOfChar;
290 out <<
"num_ints = " << num_ints <<
"\n";
291 out <<
"num_chars = " << num_chars <<
"\n";
293 ECHO(ArrayRCP<char> arcp_char = arcp<char>(num_chars));
294 ECHO(ArrayRCP<int> arcp_int = arcp_reinterpret_cast<int>(arcp_char));
297 implicit_ptr_cast<void>(&arcp_char[0]));
298 TEST_EQUALITY(implicit_ptr_cast<void>((&arcp_int[num_ints-1])+1),
299 implicit_ptr_cast<void>((&arcp_char[num_chars-1])+1));
301 ECHO(arcp_char+=sizeOfInt);
302 ECHO(arcp_int = arcp_reinterpret_cast<int>(arcp_char));
307 implicit_ptr_cast<void>(&arcp_char[-sizeOfInt])
309 TEST_EQUALITY( implicit_ptr_cast<void>((&arcp_int[num_ints-2])+1),
310 implicit_ptr_cast<void>((&arcp_char[num_chars-1-sizeOfInt])+1));
318 const int sizeOfInt =
sizeof(int);
319 const int sizeOfChar =
sizeof(char);
320 const int num_ints =
n;
321 const int num_chars = (num_ints*sizeOfInt)/sizeOfChar;
322 out <<
"num_ints = " << num_ints <<
"\n";
323 out <<
"num_chars = " << num_chars <<
"\n";
325 ECHO(ArrayRCP<int> arcp_int = arcp<int>(num_ints));
326 ECHO(ArrayRCP<char> arcp_char = arcp_reinterpret_cast<char>(arcp_int));
329 implicit_ptr_cast<void>(&arcp_char[0]));
330 TEST_EQUALITY(implicit_ptr_cast<void>((&arcp_int[num_ints-1])+1),
331 implicit_ptr_cast<void>((&arcp_char[num_chars-1])+1));
332 TEST_EQUALITY(implicit_ptr_cast<void>((&arcp_int[num_ints-1])+1),
333 implicit_ptr_cast<void>((&arcp_char[num_chars-1])+1));
336 ECHO(arcp_char = arcp_reinterpret_cast<char>(arcp_int));
337 TEST_EQUALITY(as<int>(arcp_char.lowerOffset()), as<int>(-sizeOfInt));
338 TEST_EQUALITY(as<int>(arcp_char.upperOffset()), as<int>(num_chars-1-sizeOfInt));
340 implicit_ptr_cast<void>(&arcp_char[-sizeOfInt]));
341 TEST_EQUALITY(implicit_ptr_cast<void>((&arcp_int[num_ints-2])+1),
342 implicit_ptr_cast<void>((&arcp_char[num_chars-1-sizeOfInt])+1));
349 ECHO(ArrayRCP<ArrayRCP<int> > arcp1 =
arcp<ArrayRCP<int> >(
n));
350 ECHO(ArrayRCP<ArrayRCP<const int> > arcp2 =
354 implicit_ptr_cast<const void>(&arcp2[0]));
355 ECHO(ArrayRCP<
const ArrayRCP<const int> > arcp3 = arcp2);
358 implicit_ptr_cast<const void>(&arcp3[0]));
359 out <<
"arcp3 = " << arcp3 <<
"\n";
370 ECHO(ArrayRCP<ArrayRCP<int> > arcp1 =
null);
379 ECHO(ArrayRCP<int> arcp1 = arcp<int>(
n));
386 ECHO(ArrayRCP<int> arcp3 = arcp2);
391 ECHO(ArrayRCP<int> arcp4 = arcp1);
427 MockObject(
int member_in = -1) : member_(member_in) { ++(numConstructorsCalled()); }
428 MockObject(
const MockObject &mo) : member_(mo.member_) { ++(numCopyConstructorsCalled()); }
429 ~MockObject() { ++(numDestructorsCalled()); }
430 int member()
const {
return member_; }
432 static int & numConstructorsCalled()
433 {
static int s_numConstructorsCalled = 0;
return s_numConstructorsCalled; }
434 static int & numCopyConstructorsCalled()
435 {
static int s_numCopyConstructorsCalled = 0;
return s_numCopyConstructorsCalled; }
436 static int & numDestructorsCalled()
437 {
static int s_numDestructorsCalled = 0;
return s_numDestructorsCalled; }
438 static void reset() { numConstructorsCalled() = numCopyConstructorsCalled() = numDestructorsCalled() = 0; }
446 const int sizeOfMockObject =
sizeof(MockObject);
447 const int sizeOfChar =
sizeof(char);
448 const int num_objs =
n;
449 const int num_chars = (num_objs*sizeOfMockObject)/sizeOfChar;
450 out <<
"num_objs = " << num_objs <<
"\n";
451 out <<
"num_chars = " << num_chars <<
"\n";
453 ECHO(ArrayRCP<char> arcp_chars = arcp<char>(num_chars));
455 ECHO(MockObject::reset());
459 ECHO(ArrayRCP<MockObject> arcp_objs =
460 arcp_reinterpret_cast_nonpod<MockObject>(arcp_chars));
463 TEST_EQUALITY(MockObject::numCopyConstructorsCalled(), num_objs);
466 int sum = 0;
for (
int i=0; i < num_objs; ++i) sum += arcp_objs[i].member();
470 ECHO(ArrayRCP<MockObject> arcp_objs2 = arcp_objs);
473 TEST_EQUALITY(MockObject::numCopyConstructorsCalled(), num_objs);
476 int sum = 0;
for (
int i=0; i < num_objs; ++i) sum += arcp_objs[i].member();
482 TEST_EQUALITY(MockObject::numCopyConstructorsCalled(), num_objs);
487 TEST_EQUALITY(MockObject::numCopyConstructorsCalled(), num_objs);
488 TEST_EQUALITY(MockObject::numDestructorsCalled(), num_objs + 1);
496 const int sizeOfMockObject =
sizeof(MockObject);
497 const int sizeOfChar =
sizeof(char);
498 const int num_objs =
n;
499 const int num_chars = (num_objs*sizeOfMockObject)/sizeOfChar;
500 out <<
"num_objs = " << num_objs <<
"\n";
501 out <<
"num_chars = " << num_chars <<
"\n";
503 ECHO(ArrayRCP<char> arcp_chars = arcp<char>(num_chars));
505 ECHO(MockObject::reset());
509 ECHO(
const MockObject mockObj(1));
514 ECHO(MockObject::reset());
518 ECHO(ArrayRCP<MockObject> arcp_objs =
522 TEST_EQUALITY(MockObject::numCopyConstructorsCalled(), num_objs);
525 int sum = 0;
for (
int i=0; i < num_objs; ++i) sum += arcp_objs[i].member();
529 ECHO(ArrayRCP<MockObject> arcp_objs2 = arcp_objs);
532 TEST_EQUALITY(MockObject::numCopyConstructorsCalled(), num_objs);
535 int sum = 0;
for (
int i=0; i < num_objs; ++i) sum += arcp_objs[i].member();
541 TEST_EQUALITY(MockObject::numCopyConstructorsCalled(), num_objs);
546 TEST_EQUALITY(MockObject::numCopyConstructorsCalled(), num_objs);
561 ECHO(ArrayRCP<A> a_arcp1 =
arcp(a_ptr, 0,
n));
562 #if defined(TEUCHOS_DEBUG)
566 TEST_THROW(ArrayRCP<A> a_arcp2 =
arcp(a_ptr, 0,
n), DuplicateOwningRCPError);
569 ECHO(ArrayRCP<A> a_arcp2 =
arcp(a_ptr, 0,
n));
571 ECHO(a_arcp2.release());
580 ECHO(ArrayRCP<A> a_arcp1 =
arcp(a_ptr, 0,
n));
581 ECHO(ArrayRCP<A> a_arcp2 =
arcp(a_ptr, 0,
n,
false));
583 #if defined(TEUCHOS_DEBUG)
586 TEST_THROW(a_arcp2.getRawPtr(), DanglingReferenceError);
598 RCP<std::ostream > out_;
600 WeirdDealloc(
int size,
const RCP<std::ostream> &out) : size_(size), out_(out) {}
601 void free(
void *ptr)
const
603 int *
const int_ptr =
reinterpret_cast<int*
>(ptr);
609 assert(tmpav[0] == int_ptr[0]);
610 *out_ << tmpav << std::endl;
613 ArrayView<const int> tmpav2(tmpav);
614 assert(tmpav2[0] == int_ptr[0]);
615 *out_ << tmpav2 << std::endl;
618 ArrayView<const int> tmpav3;
620 assert(tmpav3[0] == int_ptr[0]);
621 *out_ << tmpav2 << std::endl;
630 using Teuchos::rcpFromRef;
632 const bool ownsMem =
true;
633 int *int_ptr =
new int[
size];
634 std::fill_n(int_ptr, size, 0);
635 ArrayRCP<int> a = arcp<int>( int_ptr , 0,
size,
636 WeirdDealloc(size,
rcpFromRef(out)), ownsMem );
648 std::vector<T> a(
n, as<T>(1));
649 ArrayRCP<T> a_arcp(
n, as<T>(1));
663 const T val = as<T>(1);
667 a_arcp.assign(as<Ordinal>(
n), val);
674 const T val = as<T>(1);
678 a_arcp.assign(a.begin(), a.end());
685 typedef typename ArrayRCP<T>::const_iterator const_iterator;
686 ECHO(ArrayRCP<T> a_arcp = arcp<T>(
n));
687 ECHO(const_iterator itr = a_arcp.begin());
688 out <<
"itr = " << itr <<
"\n";
691 out <<
"itr = " << itr <<
"\n";
698 const T val = as<T>(1);
701 ArrayRCP<T> a_arcp = arcp<T>(
n);
702 ArrayRCP<T> a_arcp_cpy = a_arcp;
703 a_arcp.deepCopy(Teuchos::arrayViewFromVector(a));
711 const T val1 = as<T>(1);
712 const T val2 = as<T>(2);
717 out <<
"\nChecking resize(n, val1) ...\n";
719 a_arcp.resize(
n, val1);
722 out <<
"\nChecking resize(2*n, val2) ...\n";
724 a_arcp.resize(2*
n, val2);
727 out <<
"\nChecking resize(n/2) ...\n";
732 out <<
"\nChecking resize(0) ...\n";
740 TEST_THROW(a_arcp.resize(1), std::out_of_range);
747 ArrayRCP<T> a_arcp = arcp<T>(
n);
756 typedef ArrayRCP<T> iter_t;
765 ECHO(ArrayRCP<T> arcp1 = arcp<T>(
n));
766 ECHO(ArrayRCP<const T> arcp2 = arcp1);
775 ECHO(ArrayRCP<T> arcp_strong = arcp<T>(
n));
783 ECHO(ArrayRCP<T> arcp_weak1 = arcp_strong.create_weak());
800 TEST_EQUALITY( arcp_weak1.getRawPtr(), arcp_strong.getRawPtr() );
802 ECHO(ArrayRCP<T> arcp_weak2 = arcp_weak1);
820 TEST_EQUALITY( arcp_weak2.getRawPtr(), arcp_strong.getRawPtr() );
851 ECHO(arcp_weak1.assert_not_null());
852 ECHO(arcp_weak2.assert_not_null());
854 TEST_THROW( arcp_weak1.assert_valid_ptr(), DanglingReferenceError );
856 TEST_THROW( arcp_weak1.operator->(), DanglingReferenceError );
857 TEST_THROW( *arcp_weak1, DanglingReferenceError );
858 TEST_THROW( arcp_weak1.create_weak(), DanglingReferenceError );
859 TEST_THROW( arcp_weak1.get(), DanglingReferenceError );
860 TEST_THROW( arcp_weak1.getRawPtr(), DanglingReferenceError );
861 TEST_THROW( arcp_weak1[0], DanglingReferenceError );
862 TEST_THROW( ++arcp_weak1, DanglingReferenceError );
863 TEST_THROW( arcp_weak1++, DanglingReferenceError );
864 TEST_THROW( --arcp_weak1, DanglingReferenceError );
865 TEST_THROW( arcp_weak1--, DanglingReferenceError );
866 TEST_THROW( arcp_weak1+=1, DanglingReferenceError );
867 TEST_THROW( arcp_weak1-=1, DanglingReferenceError );
868 TEST_THROW( arcp_weak1+1, DanglingReferenceError );
869 TEST_THROW( arcp_weak1-1, DanglingReferenceError );
870 TEST_THROW( arcp_weak1.getConst(), DanglingReferenceError );
871 TEST_THROW( arcp_weak1.persistingView(0,
n), DanglingReferenceError );
872 TEST_THROW( arcp_weak1.lowerOffset(), DanglingReferenceError );
873 TEST_THROW( arcp_weak1.upperOffset(), DanglingReferenceError );
874 TEST_THROW( arcp_weak1.size(), DanglingReferenceError );
875 TEST_THROW( arcp_weak1.begin(), DanglingReferenceError );
876 TEST_THROW( arcp_weak1.end(), DanglingReferenceError );
877 TEST_THROW( arcp_weak1.view(0,
n), DanglingReferenceError );
878 TEST_THROW( arcp_weak1(0,
n), DanglingReferenceError );
879 TEST_THROW( arcp_weak1(), DanglingReferenceError );
880 TEST_THROW( {ArrayView<T> av = arcp_weak1();}, DanglingReferenceError );
882 DanglingReferenceError );
883 TEST_THROW( arcp_weak1.release(), DanglingReferenceError );
884 #endif // TEUCHOS_DEBUG
905 TEST_THROW( arcp_weak2.assert_valid_ptr(), DanglingReferenceError );
908 #endif // TEUCHOS_DEBUG
917 ArrayRCP<T> arcp1 = arcp<T>(
n);
921 TEST_THROW( av.size(), DanglingReferenceError );
922 TEST_THROW( av.toString(), DanglingReferenceError );
923 TEST_THROW( av.getRawPtr(), DanglingReferenceError );
925 TEST_THROW( av.front(), DanglingReferenceError );
926 TEST_THROW( av.back(), DanglingReferenceError );
927 TEST_THROW( av.view(0,
n), DanglingReferenceError );
930 TEST_THROW( av.getConst(), DanglingReferenceError );
931 TEST_THROW( av.begin(), DanglingReferenceError );
932 TEST_THROW( av.end(), DanglingReferenceError );
939 ArrayRCP<const T> cptr;
952 const T *cptr = NULL;
967 ArrayRCP<T> arcp_strong = arcp<T>(0);
974 Array<T> a = generateArray<T>(
n);
976 ArrayRCP<T> arcp1 = Teuchos::arcpFromArrayView(av);
986 TEST_THROW(ArrayRCP<T> arcp_strong = arcp<T>(-1),
993 ECHO(ArrayRCP<T> arcp1 = arcp<T>(
n));
1000 TEST_THROW(arcp1.persistingView(-1,
n), RangeError);
1001 TEST_THROW(arcp1.persistingView(0,
n+1), RangeError);
1002 TEST_THROW(arcp1.persistingView(0,-1), RangeError);
1006 #endif // TEUCHOS_DEBUG
1014 #ifdef TEUCHOS_DEBUG
1016 # define DEBUG_UNIT_TEST_GROUP( T ) \
1017 TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( ArrayRCP, arcp_neg, T ) \
1018 TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( ArrayRCP, outOfBounds, T ) \
1022 # define DEBUG_UNIT_TEST_GROUP( T )
1027 #define UNIT_TEST_GROUP( T ) \
1028 TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( ArrayRCP, construct_n, T ) \
1029 TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( ArrayRCP, assignSelf, T ) \
1030 TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( ArrayRCP, assign_n_val, T ) \
1031 TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( ArrayRCP, assign_begin_end, T ) \
1032 TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( ArrayRCP, print_iterators, T ) \
1033 TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( ArrayRCP, deepCopy, T ) \
1034 TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( ArrayRCP, resize, T ) \
1035 TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( ArrayRCP, clear, T ) \
1036 TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( ArrayRCP, nullIterator, T ) \
1037 TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( ArrayRCP, implicitConversions, T ) \
1038 TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( ArrayRCP, weakDelete, T ) \
1039 TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( ArrayRCP, danglingArrayView, T ) \
1040 TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( ArrayRCP, getRawPtr, T) \
1041 TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( CPtr, getRawPtr, T) \
1042 TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( ArrayRCP, arcp_zero, T ) \
1043 TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT( ArrayRCP, arcpFromArrayView, T ) \
1044 DEBUG_UNIT_TEST_GROUP(T)
Dangling reference error exception class.
ArrayRCP< T2 > arcp_reinterpret_cast_nonpod(const ArrayRCP< T1 > &p1, const T2 &val=T2())
Reinterpret cast of underlying ArrayRCP type from T1* to T2* where T2 is a non-POD (non-plain-old-dat...
Null reference error exception class.
RCP< T > rcp(const boost::shared_ptr< T > &sptr)
Conversion function that takes in a boost::shared_ptr object and spits out a Teuchos::RCP object...
#define TEST_ASSERT(v1)
Assert the given statement is true.
#define UNIT_TEST_GROUP(T)
#define TEST_NOTHROW(code)
Asserr that the statement 'code' does not thrown any excpetions.
#define ECHO(statement)
Echo the given statement before it is executed.
#define TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL(TEST_GROUP, TEST_NAME, TYPE)
Macro for defining a templated unit test with one template parameter.
RawPointerConversionTraits< Container >::Ptr_t getRawPtr(const Container &c)
#define TEST_EQUALITY(v1, v2)
Assert the equality of v1 and v2.
#define TEST_THROW(code, ExceptType)
Assert that the statement 'code' throws the exception 'ExceptType' (otherwise the test fails)...
const T & getConst(T &t)
Return a constant reference to an object given a non-const reference.
ArrayRCP< T > arcp(const RCP< Array< T > > &v)
Wrap an RCP<Array<T> > object as an ArrayRCP<T> object.
#define TEUCHOS_UNIT_TEST(TEST_GROUP, TEST_NAME)
Macro for defining a (non-templated) unit test.
bool is_null(const ArrayRCP< T > &p)
Returns true if p.get()==NULL.
ArrayRCP< T2 > arcp_reinterpret_cast(const ArrayRCP< T1 > &p1)
Reinterpret cast of underlying ArrayRCP type from T1* to T2*.
#define SET_RCPNODE_TRACING()
ArrayRCP< T > arcpFromArrayView(const ArrayView< T > &av)
Get an ArrayRCP object out of an ArrayView object.
TEUCHOS_ORDINAL_TYPE Teuchos_Ordinal
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
Deprecated.
#define TEST_EQUALITY_CONST(v1, v2)
Assert the equality of v1 and constant v2.
ArrayRCP< T > arcpCloneNode(const ArrayRCP< T > &a)
Allocate a new ArrayRCP object with a new RCPNode with memory pointing to the initial node...
TypeTo * implicit_ptr_cast(TypeFrom *t)
Perform an implicit cast of pointer types with a pointer being returned.
int size(const Comm< Ordinal > &comm)
Get the number of processes in the communicator.
Teuchos::Array< T > generateArray(const int n_in)
TypeTo as(const TypeFrom &t)
Convert from one value type to another.
Ptr< T > ptr(T *p)
Create a pointer to an object from a raw pointer.
#define TEST_COMPARE_ARRAYS(a1, a2)
Assert that a1.size()==a2.size() and a[i]==b[i], i=0....
RCP< T > rcpFromRef(T &r)
Return a non-owning weak RCP object from a raw object reference for a defined type.
Policy class for deallocator for non-owned RCPs.
ArrayRCP< T > arcpWithEmbeddedObj(T *p, typename ArrayRCP< T >::size_type lowerOffset, typename ArrayRCP< T >::size_type size, const Embedded &embedded, bool owns_mem=true)
Create an ArrayRCP with and also put in an embedded object.
Smart reference counting pointer class for automatic garbage collection.
Range error exception class.
Thrown if a duplicate owning RCP is creatd the the same object.
Reference-counted pointer class and non-member templated function implementations.
Definition of Teuchos::as, for conversions between types.
bool nonnull(const ArrayRCP< T > &p)
Returns true if p.get()!=NULL.
Reference-counted smart pointer for managing arrays.
Replacement for std::vector that is compatible with the Teuchos Memory Management classes...