Function flamegpu::detail::compute_capability::selectAppropraiteComputeCapability

Function Documentation

int flamegpu::detail::compute_capability::selectAppropraiteComputeCapability(const int target, const std::vector<int> &architectures)

Get the best matching compute capability from a vector of compute capabililties in ascending order I.e. get the maximum CC value which is less than or equal to the target CC

This method has been separated from JitifyCache::compileKernel so that it can be tested generically, without having to write tests which are relative to the linked nvrtc and/or the current device.

Parameters:
  • target – compute capability to find the best match for

  • archictectures – a vector of architectures in ascending order

Returns:

the best compute capability to use (the largest value LE target), or 0 if none are appropriate.