| 1 |
//===----------------------------------------------------------------------===// |
| 2 |
// |
| 3 |
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
| 4 |
// See https://llvm.org/LICENSE.txt for license information. |
| 5 |
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 6 |
// |
| 7 |
//===----------------------------------------------------------------------===// |
| 8 |
/// |
| 9 |
/// \file |
| 10 |
/// This file contains the definition of the InputGenerator class, which defines |
| 11 |
/// the abstract interface for classes that generate math test inputs. |
| 12 |
/// |
| 13 |
//===----------------------------------------------------------------------===// |
| 14 |
|
| 15 |
#ifndef MATHTEST_INPUTGENERATOR_HPP |
| 16 |
#define MATHTEST_INPUTGENERATOR_HPP |
| 17 |
|
| 18 |
#include "llvm/ADT/ArrayRef.h" |
| 19 |
|
| 20 |
namespace mathtest { |
| 21 |
|
| 22 |
template <typename... InTypes> class InputGenerator { |
| 23 |
public: |
| 24 |
virtual ~InputGenerator() noexcept = default; |
| 25 |
|
| 26 |
virtual void reset() noexcept = 0; |
| 27 |
|
| 28 |
[[nodiscard]] virtual size_t |
| 29 |
fill(llvm::MutableArrayRef<InTypes>... Buffers) noexcept = 0; |
| 30 |
}; |
| 31 |
} // namespace mathtest |
| 32 |
|
| 33 |
#endif // MATHTEST_INPUTGENERATOR_HPP |