Blaze
3.9
Toggle main menu visibility
Loading...
Searching...
No Matches
blaze
math
blas
dotc.h
Go to the documentation of this file.
1
//=================================================================================================
33
//=================================================================================================
34
35
#ifndef _BLAZE_MATH_BLAS_DOTC_H_
36
#define _BLAZE_MATH_BLAS_DOTC_H_
37
38
39
//*************************************************************************************************
40
// Includes
41
//*************************************************************************************************
42
43
#include <
blaze/math/Aliases.h
>
44
#include <
blaze/math/blas/cblas/dotc.h
>
45
#include <
blaze/math/constraints/BLASCompatible.h
>
46
#include <
blaze/math/constraints/Computation.h
>
47
#include <
blaze/math/constraints/ConstDataAccess.h
>
48
#include <
blaze/math/expressions/DenseVector.h
>
49
#include <
blaze/system/BLAS.h
>
50
#include <
blaze/system/Inline.h
>
51
#include <
blaze/system/MacroDisable.h
>
52
#include <
blaze/util/Assert.h
>
53
#include <
blaze/util/Complex.h
>
54
#include <
blaze/util/NumericCast.h
>
55
#include <
blaze/util/StaticAssert.h
>
56
57
58
namespace
blaze {
59
60
//=================================================================================================
61
//
62
// BLAS DOT PRODUCT (DOTC)
63
//
64
//=================================================================================================
65
66
//*************************************************************************************************
69
template
<
typename
VT1,
bool
TF1,
typename
VT2,
bool
TF2 >
70
ElementType_t<VT1>
dotc
(
const
DenseVector<VT1,TF1>
& x,
const
DenseVector<VT2,TF2>
& y );
72
//*************************************************************************************************
73
74
75
//*************************************************************************************************
92
template
<
typename
VT1,
bool
TF1,
typename
VT2,
bool
TF2 >
93
ElementType_t<VT1>
dotc
(
const
DenseVector<VT1,TF1>
& x,
const
DenseVector<VT2,TF2>
& y )
94
{
95
BLAZE_CONSTRAINT_MUST_NOT_BE_COMPUTATION_TYPE
( VT1 );
96
BLAZE_CONSTRAINT_MUST_NOT_BE_COMPUTATION_TYPE
( VT2 );
97
98
BLAZE_CONSTRAINT_MUST_HAVE_CONST_DATA_ACCESS
( VT1 );
99
BLAZE_CONSTRAINT_MUST_HAVE_CONST_DATA_ACCESS
( VT2 );
100
101
BLAZE_CONSTRAINT_MUST_BE_BLAS_COMPATIBLE_TYPE
(
ElementType_t<VT1>
);
102
BLAZE_CONSTRAINT_MUST_BE_BLAS_COMPATIBLE_TYPE
(
ElementType_t<VT2>
);
103
104
const
blas_int_t
n(
numeric_cast<blas_int_t>
( (*x).size() ) );
105
106
return
dotc
( n, (*x).data(), 1, (*y).data(), 1 );
107
}
108
//*************************************************************************************************
109
110
}
// namespace blaze
111
112
#endif
Aliases.h
Header file for auxiliary alias declarations.
blaze::ElementType_t
typename T::ElementType ElementType_t
Alias declaration for nested ElementType type definitions.
Definition
Aliases.h:190
Assert.h
Header file for run time assertion macros.
BLASCompatible.h
Constraint on the data type.
Complex.h
Header file for the complex data type.
ConstDataAccess.h
Constraint on the data type.
MacroDisable.h
Deactivation of problematic macros.
NumericCast.h
Cast operators for numeric types.
StaticAssert.h
Compile time assertion.
dotc.h
Header file for the CBLAS dotc wrapper functions.
blaze::DenseVector
Base class for N-dimensional dense vectors.
Definition
DenseVector.h:77
Computation.h
Constraint on the data type.
DenseVector.h
Header file for the DenseVector base class.
blaze::dotc
ElementType_t< VT1 > dotc(const DenseVector< VT1, TF1 > &x, const DenseVector< VT2, TF2 > &y)
BLAS kernel for a dense vector complex conjugate dot product ( ).
Definition
dotc.h:93
BLAZE_CONSTRAINT_MUST_BE_BLAS_COMPATIBLE_TYPE
#define BLAZE_CONSTRAINT_MUST_BE_BLAS_COMPATIBLE_TYPE(T)
Constraint on the data type.
Definition
BLASCompatible.h:61
BLAZE_CONSTRAINT_MUST_NOT_BE_COMPUTATION_TYPE
#define BLAZE_CONSTRAINT_MUST_NOT_BE_COMPUTATION_TYPE(T)
Constraint on the data type.
Definition
Computation.h:81
BLAZE_CONSTRAINT_MUST_HAVE_CONST_DATA_ACCESS
#define BLAZE_CONSTRAINT_MUST_HAVE_CONST_DATA_ACCESS(T)
Constraint on the data type.
Definition
ConstDataAccess.h:61
blaze::blas_int_t
int32_t blas_int_t
Signed integer type used in the BLAS/LAPACK wrapper functions.
Definition
Types.h:64
blaze::numeric_cast
To numeric_cast(From from)
Checked conversion of values of numeric type.
Definition
NumericCast.h:275
BLAS.h
System settings for the BLAS mode.
Inline.h
System settings for the inline keywords.
Generated by
1.18.0