diff options
| author | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
|---|---|---|
| committer | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
| commit | 54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch) | |
| tree | d915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/scripts/test_ports/vcpkg-ci-blas/project | |
Diffstat (limited to 'vcpkg/scripts/test_ports/vcpkg-ci-blas/project')
| -rw-r--r-- | vcpkg/scripts/test_ports/vcpkg-ci-blas/project/CMakeLists.txt | 14 | ||||
| -rw-r--r-- | vcpkg/scripts/test_ports/vcpkg-ci-blas/project/main.c | 17 |
2 files changed, 31 insertions, 0 deletions
diff --git a/vcpkg/scripts/test_ports/vcpkg-ci-blas/project/CMakeLists.txt b/vcpkg/scripts/test_ports/vcpkg-ci-blas/project/CMakeLists.txt new file mode 100644 index 0000000..6f94f89 --- /dev/null +++ b/vcpkg/scripts/test_ports/vcpkg-ci-blas/project/CMakeLists.txt @@ -0,0 +1,14 @@ +cmake_minimum_required(VERSION 3.18) # for BLAS::BLAS + +project(vcpkg-ci-blas C) + +find_package(BLAS REQUIRED) + +add_executable(fortran-interface main.c) +target_link_libraries(fortran-interface PRIVATE BLAS::BLAS) + +find_package(PkgConfig REQUIRED) +pkg_check_modules(BLAS_PC REQUIRED IMPORTED_TARGET blas) + +add_executable(fortran-interface-pc main.c) +target_link_libraries(fortran-interface-pc PRIVATE PkgConfig::BLAS_PC) diff --git a/vcpkg/scripts/test_ports/vcpkg-ci-blas/project/main.c b/vcpkg/scripts/test_ports/vcpkg-ci-blas/project/main.c new file mode 100644 index 0000000..cde97be --- /dev/null +++ b/vcpkg/scripts/test_ports/vcpkg-ci-blas/project/main.c @@ -0,0 +1,17 @@ +extern void dgemm_(char*, char*, int*, int*,int*, double*, double*, int*, double*, int*, double*, double*, int*); + +int main() +{ + char ta = 'N'; + char tb = 'N'; + int m = 2; + int n = 2; + int k = 1; + double alpha = 0.5; + double A[2] = {1.0, 2.0}; // m x k + double B[2] = {3.0, 4.0}; // k x n + double beta = 0.05; + double C[4] = {100.0, 200.0, 300.0, 400.0}; // 2 x 2 + dgemm_(&ta, &tb, &m, &n, &k, &alpha, A, &m, B, &k, &beta, C, &m); + return 0; +} |