Crafter.Build/tests/CudaCompile/fixture/main.cpp

13 lines
433 B
C++
Raw Normal View History

// SPDX-License-Identifier: LGPL-3.0-only
// SPDX-FileCopyrightText: Copyright (C) 2026 Catcrafts®
import std;
// In kernel.cu: doubles every index into `values` on the GPU, and returns
// cudaSuccess (0) or the CUDA error.
extern "C" std::int32_t LaunchDouble(std::int32_t count, float* values);
int main() {
std::array<float, 8> values{};
return LaunchDouble(static_cast<std::int32_t>(values.size()), values.data());
}