From 1adba473e6917b227e1b0a1118148101dca202e7 Mon Sep 17 00:00:00 2001 From: Manuel Traut Date: Mon, 31 Mar 2014 16:53:55 +0200 Subject: add quellcode Signed-off-by: Manuel Traut --- quellcode/versuch3/multithreading/benchI.cpp | 137 +++++++++++++++++++++++++++ 1 file changed, 137 insertions(+) create mode 100755 quellcode/versuch3/multithreading/benchI.cpp (limited to 'quellcode/versuch3/multithreading/benchI.cpp') diff --git a/quellcode/versuch3/multithreading/benchI.cpp b/quellcode/versuch3/multithreading/benchI.cpp new file mode 100755 index 0000000..cd185c0 --- /dev/null +++ b/quellcode/versuch3/multithreading/benchI.cpp @@ -0,0 +1,137 @@ +// -*- C++ -*- +// +// $Id$ + +// **** Code generated by the The ACE ORB (TAO) IDL Compiler **** +// TAO and the TAO IDL Compiler have been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// and +// Distributed Object Computing Laboratory +// University of California at Irvine +// Irvine, CA +// USA +// http://doc.ece.uci.edu/ +// and +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about TAO is available at: +// http://www.cs.wustl.edu/~schmidt/TAO.html + +// TAO_IDL - Generated from +// be/be_codegen.cpp:1063 + +#include "benchI.h" + +// Implementation skeleton constructor +benchmark_PutLow_i::benchmark_PutLow_i (void) +{ +} + +// Implementation skeleton destructor +benchmark_PutLow_i::~benchmark_PutLow_i (void) +{ +} + +void benchmark_PutLow_i::connect ( + + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )) +{ + // Add your implementation here + cpx = new CPX(); +} + +void benchmark_PutLow_i::onePort ( + ::CORBA::Short portNo, + ::CORBA::Short value + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )) +{ + // Add your implementation here + std::string huhu = ""; + for(int i=0; i<65000; i++) for(int i=0; i<5000; i++) if(i%2) huhu += "a"; + cpx->set(portNo, value); +} + +void benchmark_PutLow_i::allPorts ( + ::CORBA::Short valPort1, + ::CORBA::Short valPort2, + ::CORBA::Short valPort3 + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )) +{ + // Add your implementation here + if(valPort1>=0) cpx->set(1, valPort1); + if(valPort2>=0) cpx->set(2, valPort2); + if(valPort3>=0) cpx->set(3, valPort3); +} + +// Implementation skeleton constructor +benchmark_PutHigh_i::benchmark_PutHigh_i (void) +{ +} + +// Implementation skeleton destructor +benchmark_PutHigh_i::~benchmark_PutHigh_i (void) +{ +} + +void benchmark_PutHigh_i::connect ( + + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )) +{ + // Add your implementation here + cpx = new CPX(); +} + +void benchmark_PutHigh_i::onePort ( + ::CORBA::Short portNo, + ::CORBA::Short value + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )) +{ + // Add your implementation here + cpx->set(portNo, value); +} + +void benchmark_PutHigh_i::allPorts ( + ::CORBA::Short valPort1, + ::CORBA::Short valPort2, + ::CORBA::Short valPort3 + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )) +{ + // Add your implementation here + if(valPort1>=0) cpx->set(1, valPort1); + if(valPort2>=0) cpx->set(2, valPort2); + if(valPort3>=0) cpx->set(3, valPort3); +} + + -- cgit v1.2.3