~ubuntu-branches/ubuntu/utopic/blitz++/utopic-proposed

« back to all changes in this revision

Viewing changes to benchmarks/loop12.cpp

  • Committer: Package Import Robot
  • Author(s): Christophe Trophime
  • Date: 2012-07-06 09:15:30 UTC
  • mfrom: (11.1.5 sid)
  • Revision ID: package-import@ubuntu.com-20120706091530-vzrb8zf0vpbf8tp9
Tags: 1:0.10-1
* New upstream release
  Closes: #679407
* debian/rules:
  - update for new release
  - add override_dh_auto_test target
  - regenerate configure and Makefile.am
* debian/control:
  - add libtool, automake to BuildDepends
* debian/libblitz-doc.install
  - modify path for html files
* remove uneeded patches
* add examples.patch

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
// Generated code (makeloops.cpp) -- do not edit.
2
 
 
3
 
// In KAI C++ 3.2, restrict causes problems for copy propagation.
4
 
// Temporary fix: disable restrict
5
 
 
6
 
#define BZ_DISABLE_RESTRICT
7
 
 
8
 
#include <blitz/vector.h>
 
1
 
 
2
// loop12 generated by makeloops.py Thu Jun 30 16:44:56 2011
 
3
 
 
4
#include <blitz/vector2.h>
9
5
#include <blitz/array.h>
10
 
#include <blitz/rand-uniform.h>
 
6
#include <random/uniform.h>
11
7
#include <blitz/benchext.h>
12
8
 
13
 
// Generated: makeloops.cpp Dec 11 2002
14
 
 
15
9
#ifdef BZ_HAVE_VALARRAY
16
10
 #define BENCHMARK_VALARRAY
17
11
#endif
20
14
#include <valarray>
21
15
#endif
22
16
 
 
17
BZ_NAMESPACE(blitz)
 
18
extern void sink();
 
19
BZ_NAMESPACE_END
 
20
 
23
21
BZ_USING_NAMESPACE(blitz)
 
22
BZ_USING_NAMESPACE(std)
24
23
 
25
24
#if defined(BZ_FORTRAN_SYMBOLS_WITH_TRAILING_UNDERSCORES)
26
25
 #define loop12_f77 loop12_f77_
40
39
#endif
41
40
 
42
41
extern "C" {
43
 
  void loop12_f77(const int& N, double* y, double* a, double* x, double* b, double* c, double* d, const double& u);
44
 
 
45
 
  void loop12_f77overhead(const int& N, double* y, double* a, double* x, double* b, double* c, double* d, const double& u);
46
 
 
47
 
  void loop12_f90(const int& N, double* y, double* a, double* x, double* b, double* c, double* d, const double& u);
48
 
 
49
 
  void loop12_f90overhead(const int& N, double* y, double* a, double* x, double* b, double* c, double* d, const double& u);
 
42
  void loop12_f77(const int& N, double* y, double* x, double* a, double* b, double* c, double* d, const double& u);
 
43
  void loop12_f77overhead(const int& N, double* y, double* x, double* a, double* b, double* c, double* d, const double& u);
 
44
  void loop12_f90(const int& N, double* y, double* x, double* a, double* b, double* c, double* d, const double& u);
 
45
  void loop12_f90overhead(const int& N, double* y, double* x, double* a, double* b, double* c, double* d, const double& u);
50
46
 
51
47
}
52
48
 
53
49
void VectorVersion(BenchmarkExt<int>& bench, double u);
54
50
void ArrayVersion(BenchmarkExt<int>& bench, double u);
 
51
void ArrayVersion_unaligned(BenchmarkExt<int>& bench, double u);
 
52
void ArrayVersion_misaligned(BenchmarkExt<int>& bench, double u);
 
53
void ArrayVersion_index(BenchmarkExt<int>& bench, double u);
 
54
void doTinyVectorVersion(BenchmarkExt<int>& bench, double u);
55
55
void F77Version(BenchmarkExt<int>& bench, double u);
56
56
#ifdef FORTRAN_90
57
57
void F90Version(BenchmarkExt<int>& bench, double u);
60
60
void ValarrayVersion(BenchmarkExt<int>& bench, double u);
61
61
#endif
62
62
 
63
 
void sink() {}
 
63
const int numSizes = 80;
 
64
const bool runvector=false; // no point as long as Vector is Array<1>
64
65
 
65
66
int main()
66
67
{
67
68
    int numBenchmarks = 5;
68
 
#ifndef BENCHMARK_VALARRAY
69
 
    numBenchmarks--;   // No  valarray
70
 
#endif
71
 
#ifndef FORTRAN_90
72
 
    numBenchmarks--;   // No fortran 90
73
 
#endif
74
 
 
75
 
    BenchmarkExt<int> bench("loop12: $y=u+$a;$x=$a+$b+$c+$d", numBenchmarks);
76
 
 
77
 
    const int numSizes = 23;
 
69
    if (runvector) numBenchmarks++;
 
70
#ifdef BENCHMARK_VALARRAY
 
71
    numBenchmarks++;
 
72
#endif
 
73
#ifdef FORTRAN_90
 
74
    numBenchmarks++;
 
75
#endif
 
76
 
 
77
    BenchmarkExt<int> bench("loop12: $y = u+$a; $x = $a+$b+$c+$d", numBenchmarks);
 
78
 
78
79
    bench.setNumParameters(numSizes);
79
 
    bench.setRateDescription("Mflops/s");
80
 
 
81
 
    Vector<int> parameters(numSizes);
82
 
    Vector<long> iters(numSizes);
83
 
    Vector<double> flops(numSizes);
84
 
 
85
 
    for (int i=0; i < numSizes; ++i)
86
 
    {
87
 
        parameters[i] = (int)pow(10.0, (i+1)/4.0);
88
 
        iters[i] = 10000000L / parameters[i];
89
 
        if (iters[i] < 2)
90
 
            iters[i] = 2;
91
 
        flops[i] = 4 * parameters[i];
92
 
    }
93
 
 
 
80
 
 
81
    Array<int,1> parameters(numSizes);
 
82
    Array<long,1> iters(numSizes);
 
83
    Array<double,1> flops(numSizes);
 
84
 
 
85
    parameters=pow(pow(2.,0.25),tensor::i)+tensor::i;
 
86
    flops = 4 * parameters;
 
87
    iters = 100000000L / flops;
 
88
    iters = where(iters<2, 2, iters);
 
89
    cout << iters << endl;
 
90
    
94
91
    bench.setParameterVector(parameters);
95
92
    bench.setIterations(iters);
96
 
    bench.setFlopsPerIteration(flops);
97
 
 
 
93
    bench.setOpsPerIteration(flops);
 
94
    bench.setDependentVariable("flops");
98
95
    bench.beginBenchmarking();
99
96
 
100
97
    double u = 0.39123982498157938742;
101
98
 
102
 
    VectorVersion(bench, u);
 
99
 
103
100
    ArrayVersion(bench, u);
 
101
    ArrayVersion_unaligned(bench, u);
 
102
    ArrayVersion_misaligned(bench, u);
 
103
    ArrayVersion_index(bench, u);
 
104
    //doTinyVectorVersion(bench, u);
104
105
    F77Version(bench, u);
105
106
#ifdef FORTRAN_90
106
107
    F90Version(bench, u);
109
110
    ValarrayVersion(bench, u);
110
111
#endif
111
112
 
 
113
    if(runvector)
 
114
      VectorVersion(bench, u);
 
115
 
112
116
    bench.endBenchmarking();
113
117
 
114
118
    bench.saveMatlabGraph("loop12.m");
115
 
 
116
119
    return 0;
117
120
}
118
121
 
119
122
template<class T>
120
 
void initializeRandomDouble(T data, int numElements, int stride = 1)
 
123
void initializeRandomDouble(T* data, int numElements, int stride = 1)
121
124
{
122
 
    static Random<Uniform> rnd;
 
125
    ranlib::Uniform<T> rnd;
123
126
 
124
127
    for (int i=0; i < numElements; ++i)
125
128
        data[size_t(i*stride)] = rnd.random();
126
129
}
127
130
 
128
131
template<class T>
129
 
void initializeArray(T& array, int numElements)
 
132
void initializeRandomDouble(valarray<T>& data, int numElements, int stride = 1)
130
133
{
131
 
    static Random<Uniform> rnd;
 
134
    ranlib::Uniform<T> rnd;
132
135
 
133
 
    for (size_t i=0; i < numElements; ++i)
134
 
        array[i] = rnd.random();
 
136
    for (int i=0; i < numElements; ++i)
 
137
        data[size_t(i*stride)] = rnd.random();
135
138
}
136
139
 
137
140
void VectorVersion(BenchmarkExt<int>& bench, double u)
141
144
    while (!bench.doneImplementationBenchmark())
142
145
    {
143
146
        int N = bench.getParameter();
144
 
        cout << "Vector<T>: N = " << N << endl;
145
 
        cout.flush();
146
 
 
147
147
        long iters = bench.getIterations();
148
148
 
 
149
        cout << bench.currentImplementation() << ": N = " << N << endl;
 
150
 
149
151
        Vector<double> y(N);
150
152
        initializeRandomDouble(y.data(), N);
 
153
        Vector<double> x(N);
 
154
        initializeRandomDouble(x.data(), N);
151
155
        Vector<double> a(N);
152
156
        initializeRandomDouble(a.data(), N);
153
 
        Vector<double> x(N);
154
 
        initializeRandomDouble(x.data(), N);
155
157
        Vector<double> b(N);
156
158
        initializeRandomDouble(b.data(), N);
157
159
        Vector<double> c(N);
159
161
        Vector<double> d(N);
160
162
        initializeRandomDouble(d.data(), N);
161
163
 
 
164
 
162
165
        bench.start();
163
166
        for (long i=0; i < iters; ++i)
164
167
        {
165
 
            y=u+a;x=a+b+c+d;
 
168
            y = u+a; x = a+b+c+d;
166
169
            sink();
167
170
        }
168
171
        bench.stop();
169
172
 
170
173
        bench.startOverhead();
171
 
        for (long i=0; i < iters; ++i)
 
174
        for (long i=0; i < iters; ++i) {
172
175
            sink();
 
176
        }
 
177
 
173
178
        bench.stopOverhead();
174
179
    }
175
180
 
176
181
    bench.endImplementation();
177
182
}
178
183
 
179
 
void ArrayVersion(BenchmarkExt<int>& bench, double u)
 
184
 
 
185
  void ArrayVersion(BenchmarkExt<int>& bench, double u)
180
186
{
181
187
    bench.beginImplementation("Array<T,1>");
182
188
 
183
189
    while (!bench.doneImplementationBenchmark())
184
190
    {
185
191
        int N = bench.getParameter();
186
 
        cout << "Array<T,1>: N = " << N << endl;
187
 
        cout.flush();
188
 
 
189
 
        long iters = bench.getIterations();
190
 
 
191
 
        Array<double, 1> y(N);
192
 
        initializeRandomDouble(y.dataFirst(), N);
193
 
        Array<double, 1> a(N);
194
 
        initializeRandomDouble(a.dataFirst(), N);
195
 
        Array<double, 1> x(N);
196
 
        initializeRandomDouble(x.dataFirst(), N);
197
 
        Array<double, 1> b(N);
198
 
        initializeRandomDouble(b.dataFirst(), N);
199
 
        Array<double, 1> c(N);
200
 
        initializeRandomDouble(c.dataFirst(), N);
201
 
        Array<double, 1> d(N);
202
 
        initializeRandomDouble(d.dataFirst(), N);
203
 
 
204
 
        bench.start();
205
 
        for (long i=0; i < iters; ++i)
206
 
        {
207
 
            y=u+a;x=a+b+c+d;
208
 
            sink();
209
 
        }
210
 
        bench.stop();
211
 
 
212
 
        bench.startOverhead();
213
 
        for (long i=0; i < iters; ++i)
214
 
            sink();
 
192
        long iters = bench.getIterations();
 
193
 
 
194
        cout << bench.currentImplementation() << ": N = " << N << endl;
 
195
 
 
196
        Array<double,1> y(N);
 
197
        initializeRandomDouble(y.dataFirst(), N);
 
198
        Array<double,1> x(N);
 
199
        initializeRandomDouble(x.dataFirst(), N);
 
200
        Array<double,1> a(N);
 
201
        initializeRandomDouble(a.dataFirst(), N);
 
202
        Array<double,1> b(N);
 
203
        initializeRandomDouble(b.dataFirst(), N);
 
204
        Array<double,1> c(N);
 
205
        initializeRandomDouble(c.dataFirst(), N);
 
206
        Array<double,1> d(N);
 
207
        initializeRandomDouble(d.dataFirst(), N);
 
208
 
 
209
 
 
210
        bench.start();
 
211
        for (long i=0; i < iters; ++i)
 
212
        {
 
213
            y = u+a; x = a+b+c+d;
 
214
            sink();
 
215
        }
 
216
        bench.stop();
 
217
 
 
218
        bench.startOverhead();
 
219
        for (long i=0; i < iters; ++i) {
 
220
            sink();
 
221
        }
 
222
 
 
223
        bench.stopOverhead();
 
224
    }
 
225
 
 
226
    bench.endImplementation();
 
227
}
 
228
 
 
229
 
 
230
  void ArrayVersion_index(BenchmarkExt<int>& bench, double u)
 
231
{
 
232
    bench.beginImplementation("Array<T,1> (indexexpr.)");
 
233
 
 
234
    while (!bench.doneImplementationBenchmark())
 
235
    {
 
236
        int N = bench.getParameter();
 
237
        long iters = bench.getIterations();
 
238
 
 
239
        cout << bench.currentImplementation() << ": N = " << N << endl;
 
240
 
 
241
        Array<double,1> y(N);
 
242
        initializeRandomDouble(y.dataFirst(), N);
 
243
        Array<double,1> x(N);
 
244
        initializeRandomDouble(x.dataFirst(), N);
 
245
        Array<double,1> a(N);
 
246
        initializeRandomDouble(a.dataFirst(), N);
 
247
        Array<double,1> b(N);
 
248
        initializeRandomDouble(b.dataFirst(), N);
 
249
        Array<double,1> c(N);
 
250
        initializeRandomDouble(c.dataFirst(), N);
 
251
        Array<double,1> d(N);
 
252
        initializeRandomDouble(d.dataFirst(), N);
 
253
 
 
254
 
 
255
        bench.start();
 
256
        for (long i=0; i < iters; ++i)
 
257
        {
 
258
            y = u+a(tensor::i); x = a(tensor::i)+b(tensor::i)+c(tensor::i)+d(tensor::i);;
 
259
            sink();
 
260
        }
 
261
        bench.stop();
 
262
 
 
263
        bench.startOverhead();
 
264
        for (long i=0; i < iters; ++i) {
 
265
            sink();
 
266
        }
 
267
 
 
268
        bench.stopOverhead();
 
269
    }
 
270
 
 
271
    bench.endImplementation();
 
272
}
 
273
 
 
274
  void ArrayVersion_unaligned(BenchmarkExt<int>& bench, double u)
 
275
{
 
276
    bench.beginImplementation("Array<T,1> (unal.)");
 
277
 
 
278
    while (!bench.doneImplementationBenchmark())
 
279
    {
 
280
        int N = bench.getParameter();
 
281
        long iters = bench.getIterations();
 
282
 
 
283
        cout << bench.currentImplementation() << ": N = " << N << endl;
 
284
 
 
285
 
 
286
    Array<double,1> yfill(N+1);
 
287
    Array<double,1> y(yfill(Range(1,N)));
 
288
    initializeRandomDouble(y.dataFirst(), N);
 
289
 
 
290
    Array<double,1> xfill(N+1);
 
291
    Array<double,1> x(xfill(Range(1,N)));
 
292
    initializeRandomDouble(x.dataFirst(), N);
 
293
 
 
294
    Array<double,1> afill(N+1);
 
295
    Array<double,1> a(afill(Range(1,N)));
 
296
    initializeRandomDouble(a.dataFirst(), N);
 
297
 
 
298
    Array<double,1> bfill(N+1);
 
299
    Array<double,1> b(bfill(Range(1,N)));
 
300
    initializeRandomDouble(b.dataFirst(), N);
 
301
 
 
302
    Array<double,1> cfill(N+1);
 
303
    Array<double,1> c(cfill(Range(1,N)));
 
304
    initializeRandomDouble(c.dataFirst(), N);
 
305
 
 
306
    Array<double,1> dfill(N+1);
 
307
    Array<double,1> d(dfill(Range(1,N)));
 
308
    initializeRandomDouble(d.dataFirst(), N);
 
309
 
 
310
 
 
311
        bench.start();
 
312
        for (long i=0; i < iters; ++i)
 
313
        {
 
314
            y = u+a; x = a+b+c+d;
 
315
            sink();
 
316
        }
 
317
        bench.stop();
 
318
 
 
319
        bench.startOverhead();
 
320
        for (long i=0; i < iters; ++i) {
 
321
            sink();
 
322
        }
 
323
 
 
324
        bench.stopOverhead();
 
325
    }
 
326
 
 
327
    bench.endImplementation();
 
328
}
 
329
 
 
330
  void ArrayVersion_misaligned(BenchmarkExt<int>& bench, double u)
 
331
{
 
332
    bench.beginImplementation("Array<T,1> (misal.)");
 
333
 
 
334
    while (!bench.doneImplementationBenchmark())
 
335
    {
 
336
        int N = bench.getParameter();
 
337
        long iters = bench.getIterations();
 
338
 
 
339
        cout << bench.currentImplementation() << ": N = " << N << endl;
 
340
 
 
341
 
 
342
    Array<double,1> yfill(N+6);
 
343
    Array<double,1> y(yfill(Range(0,N+0-1)));
 
344
    initializeRandomDouble(y.dataFirst(), N);
 
345
 
 
346
    Array<double,1> xfill(N+6);
 
347
    Array<double,1> x(xfill(Range(1,N+1-1)));
 
348
    initializeRandomDouble(x.dataFirst(), N);
 
349
 
 
350
    Array<double,1> afill(N+6);
 
351
    Array<double,1> a(afill(Range(2,N+2-1)));
 
352
    initializeRandomDouble(a.dataFirst(), N);
 
353
 
 
354
    Array<double,1> bfill(N+6);
 
355
    Array<double,1> b(bfill(Range(3,N+3-1)));
 
356
    initializeRandomDouble(b.dataFirst(), N);
 
357
 
 
358
    Array<double,1> cfill(N+6);
 
359
    Array<double,1> c(cfill(Range(4,N+4-1)));
 
360
    initializeRandomDouble(c.dataFirst(), N);
 
361
 
 
362
    Array<double,1> dfill(N+6);
 
363
    Array<double,1> d(dfill(Range(5,N+5-1)));
 
364
    initializeRandomDouble(d.dataFirst(), N);
 
365
 
 
366
 
 
367
        bench.start();
 
368
        for (long i=0; i < iters; ++i)
 
369
        {
 
370
            y = u+a; x = a+b+c+d;
 
371
            sink();
 
372
        }
 
373
        bench.stop();
 
374
 
 
375
        bench.startOverhead();
 
376
        for (long i=0; i < iters; ++i) {
 
377
            sink();
 
378
        }
 
379
 
215
380
        bench.stopOverhead();
216
381
    }
217
382
 
226
391
    while (!bench.doneImplementationBenchmark())
227
392
    {
228
393
        int N = bench.getParameter();
229
 
        cout << "valarray<T>: N = " << N << endl;
230
 
        cout.flush();
 
394
        cout << bench.currentImplementation() << ": N = " << N << endl;
231
395
 
232
396
        long iters = bench.getIterations();
233
397
 
234
398
        valarray<double> y(N);
235
 
        initializeArray(y, N);
 
399
        initializeRandomDouble(y, N);
 
400
        valarray<double> x(N);
 
401
        initializeRandomDouble(x, N);
236
402
        valarray<double> a(N);
237
 
        initializeArray(a, N);
238
 
        valarray<double> x(N);
239
 
        initializeArray(x, N);
 
403
        initializeRandomDouble(a, N);
240
404
        valarray<double> b(N);
241
 
        initializeArray(b, N);
 
405
        initializeRandomDouble(b, N);
242
406
        valarray<double> c(N);
243
 
        initializeArray(c, N);
 
407
        initializeRandomDouble(c, N);
244
408
        valarray<double> d(N);
245
 
        initializeArray(d, N);
 
409
        initializeRandomDouble(d, N);
 
410
 
246
411
 
247
412
        bench.start();
248
413
        for (long i=0; i < iters; ++i)
249
414
        {
250
 
            y=u+a;x=a+b+c+d;
 
415
            y = u+a; x = a+b+c+d;
251
416
            sink();
252
417
        }
253
418
        bench.stop();
254
419
 
255
420
        bench.startOverhead();
256
 
        for (long i=0; i < iters; ++i)
257
 
            sink();
 
421
        for (long i=0; i < iters; ++i) {
 
422
          sink();
 
423
        }
258
424
        bench.stopOverhead();
259
425
    }
260
426
 
261
427
    bench.endImplementation();
262
428
}
263
 
 
264
429
#endif
 
430
 
265
431
void F77Version(BenchmarkExt<int>& bench, double u)
266
432
{
267
433
    bench.beginImplementation("Fortran 77");
269
435
    while (!bench.doneImplementationBenchmark())
270
436
    {
271
437
        int N = bench.getParameter();
272
 
 
273
 
        cout << "Fortran 77: N = " << N << endl;
274
 
        cout.flush();
 
438
        cout << bench.currentImplementation() << ": N = " << N << endl;
275
439
 
276
440
        int iters = bench.getIterations();
277
441
 
278
442
        double* y = new double[N];
279
443
        initializeRandomDouble(y, N);
 
444
        double* x = new double[N];
 
445
        initializeRandomDouble(x, N);
280
446
        double* a = new double[N];
281
447
        initializeRandomDouble(a, N);
282
 
        double* x = new double[N];
283
 
        initializeRandomDouble(x, N);
284
448
        double* b = new double[N];
285
449
        initializeRandomDouble(b, N);
286
450
        double* c = new double[N];
287
451
        initializeRandomDouble(c, N);
288
452
        double* d = new double[N];
289
453
        initializeRandomDouble(d, N);
 
454
        
290
455
 
291
456
        bench.start();
292
457
        for (int iter=0; iter < iters; ++iter)
293
 
            loop12_f77(N, y, a, x, b, c, d, u);
 
458
            loop12_f77(N, y, x, a, b, c, d, u);
294
459
        bench.stop();
295
460
 
296
461
        bench.startOverhead();
297
462
        for (int iter=0; iter < iters; ++iter)
298
 
            loop12_f77overhead(N, y, a, x, b, c, d, u);
 
463
            loop12_f77overhead(N, y, x, a, b, c, d, u);
299
464
 
300
465
        bench.stopOverhead();
 
466
 
301
467
        delete [] y;
 
468
        delete [] x;
302
469
        delete [] a;
303
 
        delete [] x;
304
470
        delete [] b;
305
471
        delete [] c;
306
472
        delete [] d;
 
473
 
307
474
    }
308
475
 
309
476
    bench.endImplementation();
317
484
    while (!bench.doneImplementationBenchmark())
318
485
    {
319
486
        int N = bench.getParameter();
320
 
 
321
 
        cout << "Fortran 90: N = " << N << endl;
322
 
        cout.flush();
 
487
        cout << bench.currentImplementation() << ": N = " << N << endl;
323
488
 
324
489
        int iters = bench.getIterations();
325
490
 
326
491
        double* y = new double[N];
327
492
        initializeRandomDouble(y, N);
 
493
        double* x = new double[N];
 
494
        initializeRandomDouble(x, N);
328
495
        double* a = new double[N];
329
496
        initializeRandomDouble(a, N);
330
 
        double* x = new double[N];
331
 
        initializeRandomDouble(x, N);
332
497
        double* b = new double[N];
333
498
        initializeRandomDouble(b, N);
334
499
        double* c = new double[N];
336
501
        double* d = new double[N];
337
502
        initializeRandomDouble(d, N);
338
503
 
 
504
 
339
505
        bench.start();
340
506
        for (int iter=0; iter < iters; ++iter)
341
 
            loop12_f90(N, y, a, x, b, c, d, u);
 
507
            loop12_f90(N, y, x, a, b, c, d, u);
342
508
        bench.stop();
343
509
 
344
510
        bench.startOverhead();
345
511
        for (int iter=0; iter < iters; ++iter)
346
 
            loop12_f90overhead(N, y, a, x, b, c, d, u);
 
512
            loop12_f90overhead(N, y, x, a, b, c, d, u);
347
513
 
348
514
        bench.stopOverhead();
349
515
        delete [] y;
 
516
        delete [] x;
350
517
        delete [] a;
351
 
        delete [] x;
352
518
        delete [] b;
353
519
        delete [] c;
354
520
        delete [] d;
 
521
 
355
522
    }
356
523
 
357
524
    bench.endImplementation();