Speclib  0.1.2
The library for writing better CUDA libraries
sp::VariableBindingSpecialiser Class Referencefinal

Soecialize the values in an sp::VariableBinding, and optimize the result. More...

#include <VariableBinding.hpp>

Inheritance diagram for sp::VariableBindingSpecialiser:
[legend]

Static Public Member Functions

template<typename T >
constexpr static bool test ()
 
template<typename Child , VariableName... Names, typename... Ts, typename Fn , typename... Stuff>
static auto run (const sp::VariableBinding< Child, VariableNames< Names... >, Ts... > &binding, Fn &fn, Stuff &&... stuff)
 

Detailed Description

Soecialize the values in an sp::VariableBinding, and optimize the result.

This includes:

  • Optimize and filter the VariableUser so that expressions like x - x avoid using x entirely.
  • Specialize the values in the sp::VariableBinding.
  • Promote any constant values in the specialized result to sp::Consts in the VariableUser.
  • Optimize and filter the result.
  • Convert any sp::Consts to be sp::Consts of sp::Scalar.