12e5b6d6dSopenharmony_ci/*
22e5b6d6dSopenharmony_ci ***********************************************************************
32e5b6d6dSopenharmony_ci * © 2016 and later: Unicode, Inc. and others.
42e5b6d6dSopenharmony_ci * License & terms of use: http://www.unicode.org/copyright.html
52e5b6d6dSopenharmony_ci ***********************************************************************
62e5b6d6dSopenharmony_ci ***********************************************************************
72e5b6d6dSopenharmony_ci * Copyright (c) 2011-2012,International Business Machines
82e5b6d6dSopenharmony_ci * Corporation and others.  All Rights Reserved.
92e5b6d6dSopenharmony_ci ***********************************************************************
102e5b6d6dSopenharmony_ci */
112e5b6d6dSopenharmony_ci
122e5b6d6dSopenharmony_ci#ifndef SIEVE_H
132e5b6d6dSopenharmony_ci#define SIEVE_H
142e5b6d6dSopenharmony_ci
152e5b6d6dSopenharmony_ci#ifndef U_LOTS_OF_TIMES
162e5b6d6dSopenharmony_ci#define U_LOTS_OF_TIMES 1000000
172e5b6d6dSopenharmony_ci#endif
182e5b6d6dSopenharmony_ci
192e5b6d6dSopenharmony_ci#include "unicode/utypes.h"
202e5b6d6dSopenharmony_ci/**
212e5b6d6dSopenharmony_ci * Calculate the standardized sieve time (1 run)
222e5b6d6dSopenharmony_ci */
232e5b6d6dSopenharmony_ciU_CAPI double uprv_calcSieveTime(void);
242e5b6d6dSopenharmony_ci
252e5b6d6dSopenharmony_ci/**
262e5b6d6dSopenharmony_ci * Calculate the mean time, with margin of error
272e5b6d6dSopenharmony_ci * @param times array of times (modified/sorted)
282e5b6d6dSopenharmony_ci * @param timeCount length of array - on return, how many remain after throwing out outliers
292e5b6d6dSopenharmony_ci * @param marginOfError out parameter: gives +/- margin of err at 95% confidence
302e5b6d6dSopenharmony_ci * @return the mean time, or negative if error/imprecision.
312e5b6d6dSopenharmony_ci */
322e5b6d6dSopenharmony_ciU_CAPI double uprv_getMeanTime(double *times, uint32_t *timeCount, double *marginOfError);
332e5b6d6dSopenharmony_ci
342e5b6d6dSopenharmony_ci/**
352e5b6d6dSopenharmony_ci * Get the standardized sieve time. (Doesn't recalculate if already computed.
362e5b6d6dSopenharmony_ci * @param marginOfError out parameter: gives +/- margin of error at 95% confidence.
372e5b6d6dSopenharmony_ci * @return the mean time, or negative if error/imprecision.
382e5b6d6dSopenharmony_ci */
392e5b6d6dSopenharmony_ciU_CAPI double uprv_getSieveTime(double *marginOfError);
402e5b6d6dSopenharmony_ci
412e5b6d6dSopenharmony_ci#endif
42