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