]> git.saurik.com Git - apple/icu.git/blame - icuSources/test/perf/howExpensiveIs/sieve.h
ICU-59117.0.1.tar.gz
[apple/icu.git] / icuSources / test / perf / howExpensiveIs / sieve.h
CommitLineData
4388f060 1/*
f3c0d7a5
A
2 ***********************************************************************
3 * © 2016 and later: Unicode, Inc. and others.
4 * License & terms of use: http://www.unicode.org/copyright.html#License
5 ***********************************************************************
6 ***********************************************************************
51004dcb 7 * Copyright (c) 2011-2012,International Business Machines
4388f060 8 * Corporation and others. All Rights Reserved.
f3c0d7a5 9 ***********************************************************************
4388f060
A
10 */
11
12#ifndef SIEVE_H
13#define SIEVE_H
14
51004dcb 15#ifndef U_LOTS_OF_TIMES
4388f060 16#define U_LOTS_OF_TIMES 1000000
51004dcb 17#endif
4388f060
A
18
19#include "unicode/utypes.h"
20/**
21 * Calculate the standardized sieve time (1 run)
22 */
23U_INTERNAL double uprv_calcSieveTime(void);
24
25/**
26 * Calculate the mean time, with margin of error
27 * @param times array of times (modified/sorted)
51004dcb 28 * @param timeCount length of array - on return, how many remain after throwing out outliers
4388f060
A
29 * @param marginOfError out parameter: gives +/- margin of err at 95% confidence
30 * @return the mean time, or negative if error/imprecision.
31 */
51004dcb 32U_INTERNAL double uprv_getMeanTime(double *times, uint32_t *timeCount, double *marginOfError);
4388f060
A
33
34/**
35 * Get the standardized sieve time. (Doesn't recalculate if already computed.
36 * @param marginOfError out parameter: gives +/- margin of error at 95% confidence.
37 * @return the mean time, or negative if error/imprecision.
38 */
39U_INTERNAL double uprv_getSieveTime(double *marginOfError);
40
41#endif