0
|
1 |
// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
|
|
2 |
// All rights reserved.
|
|
3 |
// This component and the accompanying materials are made available
|
|
4 |
// under the terms of the License "Eclipse Public License v1.0"
|
|
5 |
// which accompanies this distribution, and is available
|
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
7 |
//
|
|
8 |
// Initial Contributors:
|
|
9 |
// Nokia Corporation - initial contribution.
|
|
10 |
//
|
|
11 |
// Contributors:
|
|
12 |
//
|
|
13 |
// Description:
|
|
14 |
// e32test\bench\t_asmbm.cpp
|
|
15 |
// Common header for assmbler benchmark tests
|
|
16 |
//
|
|
17 |
//
|
|
18 |
|
|
19 |
#ifndef __T_ASMBM_H__
|
|
20 |
#define __T_ASMBM_H__
|
|
21 |
|
|
22 |
#include <e32cmn.h>
|
|
23 |
|
|
24 |
const TUint KCategoryGeneral = 1<<0; ///< Benchmarks that get run by default
|
|
25 |
const TUint KCategoryMemory = 1<<1; ///< Memory alignement benchmarks run with -m option
|
|
26 |
const TUint KCategoryExtra = 1<<2; ///< Extra benchmarks run with -x option
|
|
27 |
|
|
28 |
struct TBmInfo
|
|
29 |
{
|
|
30 |
TBuf8<64> iName; ///< Name of this benchmark
|
|
31 |
TUint iCategories; ///< Set of applicable categories
|
|
32 |
TUint iAlignStep; ///< For memory benchmarks only, the alignment step
|
|
33 |
};
|
|
34 |
|
|
35 |
struct TBmParams
|
|
36 |
{
|
|
37 |
TInt iIts; ///< NUmber of iterations to run benchmark for
|
|
38 |
TInt iSourceAlign; ///< For memory benchmarks only, the source alignment
|
|
39 |
TInt iDestAlign; ///< For memory benchmarks only, the destination alignment
|
|
40 |
};
|
|
41 |
|
|
42 |
struct MBenchmarkList
|
|
43 |
{
|
|
44 |
virtual TInt Count() = 0;
|
|
45 |
virtual TInt Info(TInt aIndex, TBmInfo& aInfoOut) = 0;
|
|
46 |
virtual TInt Run(TInt aIndex, const TBmParams& aParams, TInt& aDeltaOut) = 0;
|
|
47 |
};
|
|
48 |
|
|
49 |
/// Implementation of main program
|
|
50 |
void RunBenchmarkTestsL(MBenchmarkList& aBenchmarks);
|
|
51 |
|
|
52 |
/// Caller-supplied function to initialise any data used by benchmarks
|
|
53 |
extern void InitDataL();
|
|
54 |
|
|
55 |
#endif
|