)
IF(UNIX)
SET(TEST_SOURCES ${TEST_SOURCES}
- #TestInline.cxx
+ TestInline.cxx
)
ENDIF(UNIX)
)
# add test that require VTK:
IF(GDCM_VTK)
+
IF("${VTK_MAJOR_VERSION}" LESS 4)
MESSAGE(FATAL_ERROR "This VTK version is not supported, you are on your own !")
ELSE("${VTK_MAJOR_VERSION}" LESS 4)
+
IF("${VTK_MAJOR_VERSION}" EQUAL 4 AND "${VTK_MINOR_VERSION}" EQUAL 2)
MESSAGE(FATAL_ERROR "This VTK version is not supported, you are on your own !"
"Although gdcm should compile fine. You just need to turn BUILD_TESTING:=OFF")
MESSAGE(FATAL_ERROR "This VTK version is not supported, you are on your own !"
"Although gdcm should compile fine. You just need to turn BUILD_TESTING:=OFF")
ENDIF("${VTK_MAJOR_VERSION}" EQUAL 4 AND "${VTK_MINOR_VERSION}" EQUAL 4 AND "${VTK_BUILD_VERSION}" LESS 3)
+
# Include the VTK library since we know this is going to work
INCLUDE(${VTK_USE_FILE})
Program: gdcm
Module: $RCSfile: TestInline.cxx,v $
Language: C++
- Date: $Date: 2005/11/30 11:40:26 $
- Version: $Revision: 1.11 $
+ Date: $Date: 2007/09/20 12:48:21 $
+ Version: $Revision: 1.12 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
int TestInline(int argc, char *argv[])
{
-
+ std::cout << std::endl << std::endl
+ << "Just to be sure : sizes of native types"
+ << std::endl << std::endl;
// just to know, on every proc
std::cout << "Size of short int " << sizeof(short int) << std::endl;
std::cout << "Size of int " << sizeof(int) << std::endl;
if (argc > 1)
nbLoop = atoi(argv[1]);
else
- nbLoop = 10000000;
+ nbLoop = 100000000;
//clock_t r1, r2;
struct tms tms1, tms2;
double a = 1, b = 2;
+ std::cout << "Exchange 2 scalars " << nbLoop << " times"
+ << std::endl << std::endl;
uint8_t x8 =1, y8 =2;
uint16_t x16=1, y16=2;
uint32_t x32=1, y32=2;
// ----------------------------------------
-
+ std::cout << std::endl << std::endl
+ << "Check different ways of passing scalars to a function, "
+ << nbLoop << " times" << std::endl << std::endl;
+
std::cout << "Pass uint_8 param directly"
<< std::endl;
//r1 = times(&tms1);
<< std::endl;
// ----------------------------------------
-
+ std::cout << std::endl;
std::cout << "Pass uint_16 param directly"
<< std::endl;
//r1 = times(&tms1);
// ----------------------------------------
-
+ std::cout << std::endl;
std::cout << "Pass uint_32 param directly"
<< std::endl;
//r1 = times(&tms1);
<< std::endl;
// ----------------------------------------
-
+ std::cout << std::endl;
std::cout << "Pass float param directly"
<< std::endl;
//r1 = times(&tms1);
<< std::endl;
// ----------------------------------------
-
+ std::cout << std::endl;
std::cout << "Pass double param directly"
<< std::endl;
//r1 = times(&tms1);