VPP  0.7
A high-level modern C++ API for Vulkan
Public Member Functions | List of all members
vpp::Double Class Reference

Shader (GPU-side) data type for 64-bit floating point values. More...

#include <vppLangScalarTypes.hpp>

Public Member Functions

 Double (double value)
 Construct a r-value from specified C++ value. More...
 
Double operator+ (const Double &rhs) const
 Standard addition operator.
 
Double operator- (const Double &rhs) const
 Standard subtraction operator.
 
Double operator* (const Double &rhs) const
 Standard multiplication operator.
 
Double operator/ (const Double &rhs) const
 Standard division operator.
 
Double operator% (const Double &rhs) const
 Standard remainder operator. Result sign is taken from the first operand.
 
Double operator- () const
 Standard sign reversal operator.
 
Bool operator== (const Double &rhs) const
 Standard comparison operator (true if equal).
 
Bool operator!= (const Double &rhs) const
 Standard comparison operator (true if not equal).
 
Bool operator> (const Double &rhs) const
 Standard comparison operator (true if greater).
 
Bool operator>= (const Double &rhs) const
 Standard comparison operator (true if greater or equal).
 
Bool operator< (const Double &rhs) const
 Standard comparison operator (true if less).
 
Bool operator<= (const Double &rhs) const
 Standard comparison operator (true if less or equal).
 

Detailed Description

Shader (GPU-side) data type for 64-bit floating point values.

Use this type inside shader code as a counterpart of CPU-side double type.

This is a r-value type. You must initialize it with value, either CPU-side one (an explicit constant), or an expression computed on GPU side. The value can not be changed.

For mutable variable type, see VDouble. Beware that mutable variables can degrade performance on GPU, therefore Double is preferable, unless you really want a mutable variable.

Constructor & Destructor Documentation

◆ Double()

vpp::Double::Double ( double  value)

Construct a r-value from specified C++ value.

The source value can be either a constant, or a parameter passed to shader specific for that shader. The constructor is called once when compiling the pipeline.


The documentation for this class was generated from the following file: