MathVector Class Reference

MathVector Class Reference#

6 min read time

Applies to Linux

rocCV: MathVector Class Reference

#include <math_vector.hpp>

Static Public Member Functions

template<typename U , typename T , unsigned int rank, typename std::enable_if<(rank==1), bool >::type = 0>
__host__ static __device__ HIP_vector_type< U, rank > convert_base (HIP_vector_type< T, rank > vec)
 
template<typename U , typename T , unsigned int rank, typename std::enable_if<(rank==2), bool >::type = 0>
__host__ static __device__ HIP_vector_type< U, rank > convert_base (HIP_vector_type< T, rank > vec)
 
template<typename U , typename T , unsigned int rank, typename std::enable_if<(rank==3), bool >::type = 0>
__host__ static __device__ HIP_vector_type< U, rank > convert_base (HIP_vector_type< T, rank > vec)
 
template<typename U , typename T , unsigned int rank, typename std::enable_if<(rank==4), bool >::type = 0>
__host__ static __device__ HIP_vector_type< U, rank > convert_base (HIP_vector_type< T, rank > vec)
 
template<typename T , unsigned int rank, typename std::enable_if<(rank==1), bool >::type = 0>
__host__ static __device__ HIP_vector_type< T, 4 > fill (HIP_vector_type< T, rank > vec)
 
template<typename T , unsigned int rank, typename std::enable_if<(rank==2), bool >::type = 0>
__host__ static __device__ HIP_vector_type< T, 4 > fill (HIP_vector_type< T, rank > vec)
 
template<typename T , unsigned int rank, typename std::enable_if<(rank==3), bool >::type = 0>
__host__ static __device__ HIP_vector_type< T, 4 > fill (HIP_vector_type< T, rank > vec)
 
template<typename T , unsigned int rank, typename std::enable_if<(rank==4), bool >::type = 0>
__host__ static __device__ HIP_vector_type< T, 4 > fill (HIP_vector_type< T, rank > vec)
 
template<typename T , unsigned int rank, typename std::enable_if<(rank==1), bool >::type = 0>
__host__ static __device__ HIP_vector_type< T, rank > pow (HIP_vector_type< T, rank > vec, double p)
 
template<typename T , unsigned int rank, typename std::enable_if<(rank==2), bool >::type = 0>
__host__ static __device__ HIP_vector_type< T, rank > pow (HIP_vector_type< T, rank > vec, double p)
 
template<typename T , unsigned int rank, typename std::enable_if<(rank==3), bool >::type = 0>
__host__ static __device__ HIP_vector_type< T, rank > pow (HIP_vector_type< T, rank > vec, double p)
 
template<typename T , unsigned int rank, typename std::enable_if<(rank==4), bool >::type = 0>
__host__ static __device__ HIP_vector_type< T, rank > pow (HIP_vector_type< T, rank > vec, double p)
 
template<typename T , unsigned int rank, typename std::enable_if<(rank==1), bool >::type = 0>
__host__ static __device__ void trunc (HIP_vector_type< T, 4 > vec, HIP_vector_type< T, rank > *dst)
 
template<typename T , unsigned int rank, typename std::enable_if<(rank==2), bool >::type = 0>
__host__ static __device__ void trunc (HIP_vector_type< T, 4 > vec, HIP_vector_type< T, rank > *dst)
 
template<typename T , unsigned int rank, typename std::enable_if<(rank==3), bool >::type = 0>
__host__ static __device__ void trunc (HIP_vector_type< T, 4 > vec, HIP_vector_type< T, rank > *dst)
 
template<typename T , unsigned int rank, typename std::enable_if<(rank==4), bool >::type = 0>
__host__ static __device__ void trunc (HIP_vector_type< T, 4 > vec, HIP_vector_type< T, rank > *dst)
 

Detailed Description

Copyright (c) 2025 Advanced Micro Devices, Inc. All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Member Function Documentation

◆ convert_base() [1/4]

template<typename U , typename T , unsigned int rank, typename std::enable_if<(rank==1), bool >::type = 0>
__host__ static __device__ HIP_vector_type<U, rank> MathVector::convert_base ( HIP_vector_type< T, rank >  vec)
inlinestatic

◆ convert_base() [2/4]

template<typename U , typename T , unsigned int rank, typename std::enable_if<(rank==2), bool >::type = 0>
__host__ static __device__ HIP_vector_type<U, rank> MathVector::convert_base ( HIP_vector_type< T, rank >  vec)
inlinestatic

◆ convert_base() [3/4]

template<typename U , typename T , unsigned int rank, typename std::enable_if<(rank==3), bool >::type = 0>
__host__ static __device__ HIP_vector_type<U, rank> MathVector::convert_base ( HIP_vector_type< T, rank >  vec)
inlinestatic

◆ convert_base() [4/4]

template<typename U , typename T , unsigned int rank, typename std::enable_if<(rank==4), bool >::type = 0>
__host__ static __device__ HIP_vector_type<U, rank> MathVector::convert_base ( HIP_vector_type< T, rank >  vec)
inlinestatic

◆ fill() [1/4]

template<typename T , unsigned int rank, typename std::enable_if<(rank==1), bool >::type = 0>
__host__ static __device__ HIP_vector_type<T, 4> MathVector::fill ( HIP_vector_type< T, rank >  vec)
inlinestatic

◆ fill() [2/4]

template<typename T , unsigned int rank, typename std::enable_if<(rank==2), bool >::type = 0>
__host__ static __device__ HIP_vector_type<T, 4> MathVector::fill ( HIP_vector_type< T, rank >  vec)
inlinestatic

◆ fill() [3/4]

template<typename T , unsigned int rank, typename std::enable_if<(rank==3), bool >::type = 0>
__host__ static __device__ HIP_vector_type<T, 4> MathVector::fill ( HIP_vector_type< T, rank >  vec)
inlinestatic

◆ fill() [4/4]

template<typename T , unsigned int rank, typename std::enable_if<(rank==4), bool >::type = 0>
__host__ static __device__ HIP_vector_type<T, 4> MathVector::fill ( HIP_vector_type< T, rank >  vec)
inlinestatic

◆ pow() [1/4]

template<typename T , unsigned int rank, typename std::enable_if<(rank==1), bool >::type = 0>
__host__ static __device__ HIP_vector_type<T, rank> MathVector::pow ( HIP_vector_type< T, rank >  vec,
double  p 
)
inlinestatic

◆ pow() [2/4]

template<typename T , unsigned int rank, typename std::enable_if<(rank==2), bool >::type = 0>
__host__ static __device__ HIP_vector_type<T, rank> MathVector::pow ( HIP_vector_type< T, rank >  vec,
double  p 
)
inlinestatic

◆ pow() [3/4]

template<typename T , unsigned int rank, typename std::enable_if<(rank==3), bool >::type = 0>
__host__ static __device__ HIP_vector_type<T, rank> MathVector::pow ( HIP_vector_type< T, rank >  vec,
double  p 
)
inlinestatic

◆ pow() [4/4]

template<typename T , unsigned int rank, typename std::enable_if<(rank==4), bool >::type = 0>
__host__ static __device__ HIP_vector_type<T, rank> MathVector::pow ( HIP_vector_type< T, rank >  vec,
double  p 
)
inlinestatic

◆ trunc() [1/4]

template<typename T , unsigned int rank, typename std::enable_if<(rank==1), bool >::type = 0>
__host__ static __device__ void MathVector::trunc ( HIP_vector_type< T, 4 >  vec,
HIP_vector_type< T, rank > *  dst 
)
inlinestatic

◆ trunc() [2/4]

template<typename T , unsigned int rank, typename std::enable_if<(rank==2), bool >::type = 0>
__host__ static __device__ void MathVector::trunc ( HIP_vector_type< T, 4 >  vec,
HIP_vector_type< T, rank > *  dst 
)
inlinestatic

◆ trunc() [3/4]

template<typename T , unsigned int rank, typename std::enable_if<(rank==3), bool >::type = 0>
__host__ static __device__ void MathVector::trunc ( HIP_vector_type< T, 4 >  vec,
HIP_vector_type< T, rank > *  dst 
)
inlinestatic

◆ trunc() [4/4]

template<typename T , unsigned int rank, typename std::enable_if<(rank==4), bool >::type = 0>
__host__ static __device__ void MathVector::trunc ( HIP_vector_type< T, 4 >  vec,
HIP_vector_type< T, rank > *  dst 
)
inlinestatic

The documentation for this class was generated from the following file:
  • /home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-roccv/checkouts/latest/include/common/math_vector.hpp