UltraGrid
UltraGrid Low-Latency High-Resolution Transmission System
Loading...
Searching...
No Matches
vec2 Struct Reference
Inheritance diagram for vec2:
Inheritance graph
Collaboration diagram for vec2:
Collaboration graph

Public Member Functions

__device__ vec2 (const uvec2 &v)
 
__device__ vec2 (const vec3 &v)
 
__device__ vec2 (float n=0.0f)
 
__device__ vec2 (float x, float y)
 
__device__ vec2 operator* (const float n) const
 
__device__ vec2 operator* (const vec2 &v) const
 
__device__ vec2 operator+ (const vec2 &o) const
 
__device__ vec2 operator- (const vec2 &o) const
 
__device__ vec2 operator/ (const float n) const
 

Public Attributes

float g
 
float r
 

Detailed Description

Definition at line 25 of file cuda_dxt.cu.

Constructor & Destructor Documentation

◆ vec2() [1/4]

__device__ vec2::vec2 ( float x,
float y )
inline

Definition at line 27 of file cuda_dxt.cu.

27: r(x), g(y) {}
float r
Definition cuda_dxt.cu:26
float g
Definition cuda_dxt.cu:26

Referenced by vec3::gb(), operator*(), operator*(), and operator+().

◆ vec2() [2/4]

__device__ vec2::vec2 ( float n = 0.0f)
inline

Definition at line 28 of file cuda_dxt.cu.

28: r(n), g(n) {}

◆ vec2() [3/4]

__device__ vec2::vec2 ( const vec3 & v)

Definition at line 86 of file cuda_dxt.cu.

86: r(v.r), g(v.g) {}

◆ vec2() [4/4]

__device__ vec2::vec2 ( const uvec2 & v)

Definition at line 87 of file cuda_dxt.cu.

87: r(v.r), g(v.g) {}
u32 g
Definition cuda_dxt.cu:49
u32 r
Definition cuda_dxt.cu:49

Member Function Documentation

◆ operator*() [1/2]

__device__ vec2 vec2::operator* ( const float n) const
inline

Definition at line 37 of file cuda_dxt.cu.

37 {
38 return *this * vec2(n);
39 }
__device__ vec2(float x, float y)
Definition cuda_dxt.cu:27

References vec2().

Here is the call graph for this function:

◆ operator*() [2/2]

__device__ vec2 vec2::operator* ( const vec2 & v) const
inline

Definition at line 34 of file cuda_dxt.cu.

34 {
35 return vec2(r * v.r, g * v.g);
36 }

References vec2(), g, and r.

Here is the call graph for this function:

◆ operator+()

__device__ vec2 vec2::operator+ ( const vec2 & o) const
inline

Definition at line 31 of file cuda_dxt.cu.

31 {
32 return vec2(r + o.r, g + o.g);
33 }

References vec2(), g, and r.

Here is the call graph for this function:

◆ operator-()

__device__ vec2 vec2::operator- ( const vec2 & o) const
inline

Definition at line 40 of file cuda_dxt.cu.

40 {
41 return *this + (o * -1.0f);
42 }

◆ operator/()

__device__ vec2 vec2::operator/ ( const float n) const
inline

Definition at line 43 of file cuda_dxt.cu.

43 {
44 return *this * (1.0f / n);
45 }

Member Data Documentation

◆ g

◆ r


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