commit-bot@chromium.org | be19b9e | 2013-06-14 17:26:54 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2013 Google Inc. |
| 3 | * |
| 4 | * Use of this source code is governed by a BSD-style license that can be |
| 5 | * found in the LICENSE file. |
| 6 | */ |
| 7 | |
| 8 | #ifndef skpdiff_util_DEFINED |
| 9 | #define skpdiff_util_DEFINED |
| 10 | |
| 11 | #include <CL/cl.h> |
| 12 | #include "SkString.h" |
| 13 | #include "SkTArray.h" |
| 14 | |
| 15 | /** |
| 16 | * Converts an OpenCL error number into the string of its enumeration name. |
| 17 | * @param err The OpenCL error number |
| 18 | * @return The string of the name of the error; "UNKOWN" if the error number is invalid |
| 19 | */ |
| 20 | const char* cl_error_to_string(cl_int err); |
| 21 | |
| 22 | /** |
| 23 | * Get a positive monotonic real-time measure of the amount of seconds since some undefined epoch. |
| 24 | * Maximum precision is the goal of this routine. |
| 25 | * @return Amount of time in seconds since some epoch |
| 26 | */ |
| 27 | double get_seconds(); |
| 28 | |
| 29 | /** |
| 30 | * Get file entries of the given directory. |
| 31 | * @param path A path to a directory to enumerate |
| 32 | * @param entries A vector to return the results into |
| 33 | * @return True on success, false otherwise |
| 34 | */ |
| 35 | bool get_directory(const char path[], SkTArray<SkString>* entries); |
| 36 | |
| 37 | |
| 38 | #endif |