[PATCH] D103805: [flang] Define the runtime API for CPU_TIME

Diana Picus via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 7 05:50:46 PDT 2021


rovka created this revision.
rovka added reviewers: klausler, jeanPerier.
rovka added a project: Flang.
Herald added a subscriber: jdoerfert.
rovka requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

CPU_TIME takes a single real scalar INTENT(OUT) argument.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D103805

Files:
  flang/runtime/time-intrinsic.h


Index: flang/runtime/time-intrinsic.h
===================================================================
--- /dev/null
+++ flang/runtime/time-intrinsic.h
@@ -0,0 +1,26 @@
+//===-- runtime/time-intrinsic.h --------------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+// Defines the API between compiled code and the implementations of time-related
+// intrinsic subroutines in the runtime library.
+
+#ifndef FORTRAN_RUNTIME_TIME_INTRINSIC_H_
+#define FORTRAN_RUNTIME_TIME_INTRINSIC_H_
+
+#include "cpp-type.h"
+#include "entry-names.h"
+
+namespace Fortran::runtime {
+extern "C" {
+
+void RTNAME(CpuTime)(CppTypeFor<TypeCategory::Real, 8> &time,
+    const char *sourceFile = nullptr, int line = 0);
+
+} // extern "C"
+} // namespace Fortran::runtime
+#endif // FORTRAN_RUNTIME_NUMERIC_H_


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D103805.350260.patch
Type: text/x-patch
Size: 1076 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210607/2f1be4a2/attachment.bin>


More information about the llvm-commits mailing list