The Gaudi Framework  master (37c0b60a)
Allocator.cpp File Reference
#include <algorithm>
#include <cmath>
#include <functional>
#include <iostream>
#include <random>
#include <string>
#include <vector>
#include <boost/format.hpp>
#include <GaudiKernel/ChronoEntity.h>
#include <GaudiKernel/System.h>
#include "MyClass1.h"
#include "MyClass1A.h"
Include dependency graph for Allocator.cpp:

Go to the source code of this file.

Functions

int main ()
 

Detailed Description

Test for the class GaudiUtils::Allocator

Author
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
Date
2006-02-10

Definition in file Allocator.cpp.

Function Documentation

◆ main()

int main ( )

Definition at line 128 of file Allocator.cpp.

128  {
129 
130  const size_t number = 10000;
131  const size_t repeate = 4000;
132 
133  // normalization test with "char"
134  {
135  typedef char Test;
136 
138 
139  std::cout << " Tests with " << System::typeinfoName( typeid( Test ) ) << " size=" << sizeof( Test ) << std::endl;
140  makeTest<Test>( number, repeate, test );
141  std::cout << test << std::endl;
142  };
143 
144  // class without allocator
145  {
146  typedef MyClass1 Test;
147 
149 
150  std::cout << " Tests with " << System::typeinfoName( typeid( Test ) ) << " size=" << sizeof( Test ) << std::endl;
151  makeTest<Test>( number, repeate, test );
152  std::cout << test << std::endl;
153  };
154 
155  // class with allocator
156  {
157  typedef MyClass1A Test;
158 
160 
161  std::cout << " Tests with " << System::typeinfoName( typeid( Test ) ) << " size=" << sizeof( Test ) << std::endl;
162  makeTest<Test>( number, repeate, test );
163  std::cout << test << std::endl;
164  };
165 
166  // class without allocator
167  {
168  typedef MyClass1 Test;
169 
171 
172  std::cout << " Tests with " << System::typeinfoName( typeid( Test ) ) << " size=" << sizeof( Test ) << std::endl;
173  makeTest<Test>( number, repeate, test );
174  std::cout << test << std::endl;
175  };
176 
177  // class with allocator
178  {
179  typedef MyClass1A Test;
180 
182 
183  std::cout << " Tests with " << System::typeinfoName( typeid( Test ) ) << " size=" << sizeof( Test ) << std::endl;
184  makeTest<Test>( number, repeate, test );
185  std::cout << test << std::endl;
186  };
187 
188  return 0;
189 }
ChronoEntity
Definition: ChronoEntity.h:31
MyClass1A
Definition: MyClass1A.h:29
System::typeinfoName
GAUDI_API const std::string typeinfoName(const std::type_info &)
Get platform independent information about the class type.
Definition: System.cpp:315
std::cout
Test
Definition: ViewTester.h:23
std::endl
T endl(T... args)
compareRootHistos.test
test
Definition: compareRootHistos.py:28
MyClass1
Definition: MyClass1.h:29