Skip to content

tenzr::check::HardwareHarness

Test helper that discovers available device targets and runs a test body once per target.

#include <check.h>

Public Functions

Name
std::vector< DeviceTestTarget > AvailableTargets()
void RunOnAllAvailableDevices(const std::function< void(const std::string &target_name)> & test_fn)

Public Functions Documentation

function AvailableTargets

static std::vector< DeviceTestTarget > AvailableTargets()

Return:

  • The available device targets.
  • The available device targets.

Returns the test targets available on this machine. Enumerate the test targets available on this machine, always including CPU.

function RunOnAllAvailableDevices

static void RunOnAllAvailableDevices(
    const std::function< void(const std::string &target_name)> & test_fn
)

Parameters:

  • test_fn Callback receiving each target name.
  • test_fn Callback executed for every available target.

Runs test_fn once for every available device target. Invoke test_fn once per available device target, passing each target's name.