mirror of
https://github.com/paboyle/Grid.git
synced 2025-06-13 04:37:05 +01:00
Working version with additional Grid traits pre: review by Antonin
This commit is contained in:
@ -556,6 +556,46 @@ bool DebugIOTest(void) {
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
//template <typename T> ReallyIsGridTensor struct {
|
||||
//false_type;
|
||||
//}
|
||||
|
||||
/*template<typename T>
|
||||
struct GridSize : public std::integral_constant<std::size_t, 0> {};
|
||||
|
||||
template<typename T>
|
||||
struct GridRank<iScalar<T>> : public std::integral_constant<std::size_t, rank<T>::value + 1> {};
|
||||
|
||||
template<class T, std::size_t N>
|
||||
struct rank<T[N]> : public std::integral_constant<std::size_t, rank<T>::value + 1> {};
|
||||
*/
|
||||
|
||||
template <typename T>
|
||||
void DebugGridTensorTest_print( int i )
|
||||
{
|
||||
std::cout << i << " : " << is_grid_tensor<T>::value << ", depth" << grid_tensor_att<T>::depth << ", rank" << grid_tensor_att<T>::rank << ", count" << grid_tensor_att<T>::count << ", scalar_size" << grid_tensor_att<T>::scalar_size << ", size" << grid_tensor_att<T>::size << std::endl;
|
||||
}
|
||||
|
||||
bool DebugGridTensorTest( void )
|
||||
{
|
||||
typedef Complex t1;
|
||||
typedef iScalar<t1> t2;
|
||||
typedef iVector<t1, Ns> t3;
|
||||
typedef iMatrix<t1, Nc> t4;
|
||||
typedef iVector<iMatrix<t1,3>,4> t5;
|
||||
typedef iScalar<t5> t6;
|
||||
typedef iMatrix<iVector<iScalar<iMatrix<t6, 4>>,2>,7> t7;
|
||||
int i = 1;
|
||||
DebugGridTensorTest_print<t1>( i++ );
|
||||
DebugGridTensorTest_print<t2>( i++ );
|
||||
DebugGridTensorTest_print<t3>( i++ );
|
||||
DebugGridTensorTest_print<t4>( i++ );
|
||||
DebugGridTensorTest_print<t5>( i++ );
|
||||
DebugGridTensorTest_print<t6>( i++ );
|
||||
DebugGridTensorTest_print<t7>( i++ );
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
@ -565,6 +605,7 @@ int main(int argc, char *argv[])
|
||||
std::cout << "sizeof(std::streamsize) = " << sizeof(std::streamsize) << std::endl;
|
||||
std::cout << "sizeof(Eigen::Index) = " << sizeof(Eigen::Index) << std::endl;
|
||||
//if( DebugEigenTest() ) return 0;
|
||||
//if(DebugGridTensorTest()) return 0;
|
||||
if(DebugIOTest()) return 0;
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user