mcpp index

aimol.tensorvia

import

Tensorvia: C++23 module tensor library with CPU, Vulkan, CUDA and SYCL backends

import tensorvia;

Module name taken from this index's own test project for the package.

mcpp add aimol.tensorvia@0.3.2

Usage

From this repository's own test project — built and run by CI, not written for the website.

// aimol.tensorvia smoke: import the module, run CPU ops, and read back
// scalars. Every check can fail; a non-zero exit is the signal.
import std;
import tensorvia;

namespace {

int failures = 0;

void check(bool ok, std::string_view what) {
    if (!ok) {
        std::println("FAIL: {}", what);
        ++failures;
    }
}

}  // namespace

int main() {
    const Tensor ones = ops::Ones({4, 4}, DataType::FLOAT32);
    check(ops::Sum(ones).item<float>() == 16.0f, "Sum(Ones(4x4)) == 16");

// …

tests/examples/tensorvia/tests/smoke.cpp · project tests/examples/tensorvia

Build · upstream manifest

targets
tensorvia (shared), cnn_inference (bin)
language
c++23
manifest version
0.3.2
dependencies
compat
source
https://raw.githubusercontent.com/Aimol-l/Tensorvia/v0.3.2/mcpp.toml

Versions

VersionPlatforms Mirrorssha256
0.3.2 latest LinuxWindows source f5170e419fa4…