FLANG
assign-impl.h
1//===-- runtime/assign-impl.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-exception
6//
7//===----------------------------------------------------------------------===//
8
9#ifndef FORTRAN_RUNTIME_ASSIGN_IMPL_H_
10#define FORTRAN_RUNTIME_ASSIGN_IMPL_H_
11
12#include "flang/Runtime/freestanding-tools.h"
13
14namespace Fortran::runtime {
15class Descriptor;
16class Terminator;
17
18// Assign one object to another via allocate statement from source specifier.
19// Note that if allocate object and source expression have the same rank, the
20// value of the allocate object becomes the value provided; otherwise the value
21// of each element of allocate object becomes the value provided (9.7.1.2(7)).
22#ifdef RT_DEVICE_COMPILATION
23RT_API_ATTRS void DoFromSourceAssign(Descriptor &, const Descriptor &,
24 Terminator &, MemmoveFct memmoveFct = &MemmoveWrapper);
25#else
26RT_API_ATTRS void DoFromSourceAssign(Descriptor &, const Descriptor &,
27 Terminator &, MemmoveFct memmoveFct = &Fortran::runtime::memmove);
28#endif
29
30} // namespace Fortran::runtime
31#endif // FORTRAN_RUNTIME_ASSIGN_IMPL_H_