VCV Rack API v2
Loading...
Searching...
No Matches
Vector.hpp File Reference
#include <cstring>
#include "common.hpp"
Include dependency graph for Vector.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  rack::simd::Vector< float, 4 >
 Wrapper for __m128 representing an aligned vector of 4 single-precision float values. More...
 
struct  rack::simd::Vector< int32_t, 4 >
 

Namespaces

namespace  rack
 Root namespace for the Rack API.
 
namespace  rack::simd
 Abstraction of aligned types for SIMD computation.
 

Macros

#define DECLARE_VECTOR_OPERATOR_INFIX(t, s, operator, func)
 a @ b
 
#define DECLARE_VECTOR_OPERATOR_INCREMENT(t, s, operator, opfunc)
 a @= b
 

Typedefs

using rack::simd::float_4 = Vector<float, 4>
 
using rack::simd::int32_4 = Vector<int32_t, 4>
 

Functions

Vector< int32_t, 4 > rack::simd::operator>= (const Vector< int32_t, 4 > &a, const Vector< int32_t, 4 > &b)
 
Vector< int32_t, 4 > rack::simd::operator<= (const Vector< int32_t, 4 > &a, const Vector< int32_t, 4 > &b)
 
Vector< int32_t, 4 > rack::simd::operator!= (const Vector< int32_t, 4 > &a, const Vector< int32_t, 4 > &b)
 
Vector< float, 4 > rack::simd::operator+ (const Vector< float, 4 > &a)
 +a
 
Vector< int32_t, 4 > rack::simd::operator+ (const Vector< int32_t, 4 > &a)
 
Vector< float, 4 > rack::simd::operator- (const Vector< float, 4 > &a)
 -a
 
Vector< int32_t, 4 > rack::simd::operator- (const Vector< int32_t, 4 > &a)
 
Vector< float, 4 > & rack::simd::operator++ (Vector< float, 4 > &a)
 ++a
 
Vector< int32_t, 4 > & rack::simd::operator++ (Vector< int32_t, 4 > &a)
 
Vector< float, 4 > & rack::simd::operator-- (Vector< float, 4 > &a)
 --a
 
Vector< int32_t, 4 > & rack::simd::operator-- (Vector< int32_t, 4 > &a)
 
Vector< float, 4 > rack::simd::operator++ (Vector< float, 4 > &a, int)
 a++
 
Vector< int32_t, 4 > rack::simd::operator++ (Vector< int32_t, 4 > &a, int)
 
Vector< float, 4 > rack::simd::operator-- (Vector< float, 4 > &a, int)
 a--
 
Vector< int32_t, 4 > rack::simd::operator-- (Vector< int32_t, 4 > &a, int)
 
Vector< float, 4 > rack::simd::operator~ (const Vector< float, 4 > &a)
 ~a
 
Vector< int32_t, 4 > rack::simd::operator~ (const Vector< int32_t, 4 > &a)
 
Vector< int32_t, 4 > rack::simd::operator<< (const Vector< int32_t, 4 > &a, const int &b)
 a << b
 
Vector< int32_t, 4 > rack::simd::operator>> (const Vector< int32_t, 4 > &a, const int &b)
 a >> b
 

Macro Definition Documentation

◆ DECLARE_VECTOR_OPERATOR_INFIX

#define DECLARE_VECTOR_OPERATOR_INFIX ( t,
s,
operator,
func )
Value:
inline Vector<t, s> operator(const Vector<t, s>& a, const Vector<t, s>& b) { \
return Vector<t, s>(func(a.v, b.v)); \
}

a @ b

◆ DECLARE_VECTOR_OPERATOR_INCREMENT

#define DECLARE_VECTOR_OPERATOR_INCREMENT ( t,
s,
operator,
opfunc )
Value:
inline Vector<t, s>& operator(Vector<t, s>& a, const Vector<t, s>& b) { \
return a = opfunc(a, b); \
}

a @= b