42 #ifndef TEUCHOS_ARRAY_CONVERSIONS_H
43 #define TEUCHOS_ARRAY_CONVERSIONS_H
62 template<
class ArrayPtrT_in,
class T_out>
69 as<Teuchos_Ordinal>(a_out.size()));
71 for (
Teuchos_Ordinal i = 0; i < as<Teuchos_Ordinal>(a_in.size()); ++i) {
72 a_out[i] = a_in[i].ptr();
80 template<
class ArrayPtrT_in,
class T_out>
87 as<Teuchos_Ordinal>(a_out.size()));
89 for (
Teuchos_Ordinal i = 0; i < as<Teuchos_Ordinal>(a_in.size()); ++i) {
115 template<
class T_out,
class ArrayPtrT_in>
131 template<
class T_out,
class ArrayPtrT_in>
152 ArrayView<const Ptr<const T> >
170 ArrayView<const RCP<const T> >
180 #endif // TEUCHOS_ARRAY_CONVERSIONS_H
Array< RCP< T_out > > arrayRcpConv(const ArrayPtrT_in &a_in)
Utility function to convert any Array[View,RCP]<[const] RCP<T_in> > object to an Array<RCP<T_out> > o...
void arrayViewPtrConv(const ArrayPtrT_in &a_in, const ArrayView< Ptr< T_out > > &a_out)
Utility function to convert from an an input Array[View,RCP]<[const] PTR<T_in> > object to an output ...
TEUCHOS_ORDINAL_TYPE Teuchos_Ordinal
void arrayViewRcpConv(const ArrayPtrT_in &a_in, const ArrayView< RCP< T_out > > &a_out)
Utility function to convert from an input Array[View,RCP]<[const] RCP<T_in> > object to an output Arr...
ArrayView< const RCP< const T > > arrayConstRcpConstCast(const ArrayView< const RCP< T > > &a_in)
Utility function that does a reinterpret case to convert an ArrayView<const RCP<T> > object to an Arr...
TypeTo as(const TypeFrom &t)
Convert from one value type to another.
Templated array class derived from the STL std::vector.
Array< Ptr< T_out > > arrayPtrConv(const ArrayPtrT_in &a_in)
Utility function to convert an Array[View,RCP]<[const] PTR<T_in> > object to an Array<Ptr<T_out> > ob...
Smart reference counting pointer class for automatic garbage collection.
ArrayView< const Ptr< const T > > arrayConstPtrConstCast(const ArrayView< const Ptr< T > > &a_in)
Utility function that does a reinterpret case to convert an ArrayView<const Ptr<T> > object to an Arr...
#define TEUCHOS_ASSERT_EQUALITY(val1, val2)
This macro is checks that to numbers are equal and if not then throws an exception with a good error ...
Reference-counted pointer class and non-member templated function implementations.
Simple wrapper class for raw pointers to single objects where no persisting relationship exists...
Replacement for std::vector that is compatible with the Teuchos Memory Management classes...