/*
 * SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
 * SPDX-License-Identifier: LicenseRef-NvidiaProprietary
 *
 * NVIDIA CORPORATION, its affiliates and licensors retain all intellectual
 * property and proprietary rights in and to this material, related
 * documentation and any modifications thereto. Any use, reproduction,
 * disclosure or distribution of this material and related documentation
 * without an express license agreement from NVIDIA CORPORATION or
 * its affiliates is strictly prohibited.
 */

#pragma once

#include <complex.h>

namespace __lapack_std {

extern "C" void
slacpy_ (const char __uplo[], const int* __m, const int* __n,
         const float* __a, const int* __lda,
         float* __b, const int* __ldb);

extern "C" void
dlacpy_ (const char __uplo[], const int* __m, const int* __n,
         const double* __a, const int* __lda,
         double* __b, const int* __ldb);

extern "C" void
clacpy_ (const char __uplo[], const int* __m, const int* __n,
         const void* __a, const int* __lda,
         void* __b, const int* __ldb);

extern "C" void
zlacpy_ (const char __uplo[], const int* __m, const int* __n,
         const void* __a, const int* __lda,
         void* __b, const int* __ldb);

inline void __lapack_lacpy (const char __uplo[], const int __m, const int __n,
                            const float* __A, const int __lda,
                            float* __B, const int __ldb)
{
    slacpy_ (__uplo, &__m, &__n, __A, &__lda, __B, &__ldb);
}

inline void __lapack_lacpy (const char __uplo[], const int __m, const int __n,
                            const double* __A, const int __lda,
                            double* __B, const int __ldb)
{
    dlacpy_ (__uplo, &__m, &__n, __A, &__lda, __B, &__ldb);
}

inline void __lapack_lacpy (const char __uplo[], const int __m, const int __n,
                            const std::complex<float>* __A, const int __lda,
                            std::complex<float>* __B, const int __ldb)
{
    clacpy_ (__uplo, &__m, &__n, __A, &__lda, __B, &__ldb);
}

inline void __lapack_lacpy (const char __uplo[], const int __m, const int __n,
                            const std::complex<double>* __A, const int __lda,
                            std::complex<double>* __B, const int __ldb)
{
    zlacpy_ (__uplo, &__m, &__n, __A, &__lda, __B, &__ldb);
}

}
