brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.1 KiB · 961f065 Raw
58 lines · c
1//===-- lib/runtime/edit-input.h --------------------------------*- C++ -*-===//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-exception6//7//===----------------------------------------------------------------------===//8 9#ifndef FLANG_RT_RUNTIME_EDIT_INPUT_H_10#define FLANG_RT_RUNTIME_EDIT_INPUT_H_11 12#include "flang-rt/runtime/format.h"13#include "flang-rt/runtime/io-stmt.h"14#include "flang/Decimal/decimal.h"15 16namespace Fortran::runtime::io {17 18RT_OFFLOAD_API_GROUP_BEGIN19 20RT_API_ATTRS bool EditIntegerInput(21    IoStatementState &, const DataEdit &, void *, int kind, bool isSigned);22 23template <int KIND>24RT_API_ATTRS bool EditRealInput(IoStatementState &, const DataEdit &, void *);25 26RT_API_ATTRS bool EditLogicalInput(27    IoStatementState &, const DataEdit &, bool &);28 29template <typename CHAR>30RT_API_ATTRS bool EditCharacterInput(31    IoStatementState &, const DataEdit &, CHAR *, std::size_t);32 33extern template RT_API_ATTRS bool EditRealInput<2>(34    IoStatementState &, const DataEdit &, void *);35extern template RT_API_ATTRS bool EditRealInput<3>(36    IoStatementState &, const DataEdit &, void *);37extern template RT_API_ATTRS bool EditRealInput<4>(38    IoStatementState &, const DataEdit &, void *);39extern template RT_API_ATTRS bool EditRealInput<8>(40    IoStatementState &, const DataEdit &, void *);41extern template RT_API_ATTRS bool EditRealInput<10>(42    IoStatementState &, const DataEdit &, void *);43// TODO: double/double44extern template RT_API_ATTRS bool EditRealInput<16>(45    IoStatementState &, const DataEdit &, void *);46 47extern template RT_API_ATTRS bool EditCharacterInput(48    IoStatementState &, const DataEdit &, char *, std::size_t);49extern template RT_API_ATTRS bool EditCharacterInput(50    IoStatementState &, const DataEdit &, char16_t *, std::size_t);51extern template RT_API_ATTRS bool EditCharacterInput(52    IoStatementState &, const DataEdit &, char32_t *, std::size_t);53 54RT_OFFLOAD_API_GROUP_END55 56} // namespace Fortran::runtime::io57#endif // FLANG_RT_RUNTIME_EDIT_INPUT_H_58