Home
last modified time | relevance | path

Searched refs:Complex (Results 1 – 25 of 160) sorted by relevance

1234567

/llvm-project-15.0.7/flang/include/flang/Evaluate/
H A Dcomplex.h22 template <typename REAL_TYPE> class Complex {
27 constexpr Complex() {} // (+0.0, +0.0) in Complex() function
28 constexpr Complex(const Complex &) = default;
31 constexpr Complex &operator=(const Complex &) = default;
32 constexpr Complex &operator=(Complex &&) = default;
65 ValueWithRealFlags<Complex> result;
71 ValueWithRealFlags<Complex> Add(const Complex &,
73 ValueWithRealFlags<Complex> Subtract(const Complex &,
75 ValueWithRealFlags<Complex> Multiply(const Complex &,
77 ValueWithRealFlags<Complex> Divide(const Complex &,
[all …]
/llvm-project-15.0.7/flang/lib/Evaluate/
H A Dcomplex.cpp15 ValueWithRealFlags<Complex<R>> Complex<R>::Add( in Add()
16 const Complex &that, Rounding rounding) const { in Add()
20 return {Complex{reSum, imSum}, flags}; in Add()
24 ValueWithRealFlags<Complex<R>> Complex<R>::Subtract( in Subtract()
29 return {Complex{reDiff, imDiff}, flags}; in Subtract()
33 ValueWithRealFlags<Complex<R>> Complex<R>::Multiply( in Multiply()
43 return {Complex{acbd, adbc}, flags}; in Multiply()
47 ValueWithRealFlags<Complex<R>> Complex<R>::Divide( in Divide()
81 return {Complex{re, im}, flags}; in Divide()
100 template class Complex<Real<Integer<16>, 11>>; variable
[all …]
H A Dfold-complex.cpp15 Expr<Type<TypeCategory::Complex, KIND>> FoldIntrinsicFunction( in FoldIntrinsicFunction()
17 FunctionRef<Type<TypeCategory::Complex, KIND>> &&funcRef) { in FoldIntrinsicFunction() argument
18 using T = Type<TypeCategory::Complex, KIND>; in FoldIntrinsicFunction()
78 Expr<Type<TypeCategory::Complex, KIND>> FoldOperation( in FoldOperation()
83 using Result = Type<TypeCategory::Complex, KIND>; in FoldOperation()
H A Dtype.cpp147 case TypeCategory::Complex: in MeasureSizeInBytes()
408 case TypeCategory::Complex: in ResultTypeForMultiply()
420 case TypeCategory::Complex: in ResultTypeForMultiply()
421 return DynamicType{TypeCategory::Complex, std::max(kind_, that.kind_)}; in ResultTypeForMultiply()
426 case TypeCategory::Complex: in ResultTypeForMultiply()
431 case TypeCategory::Complex: in ResultTypeForMultiply()
432 return DynamicType{TypeCategory::Complex, std::max(kind_, that.kind_)}; in ResultTypeForMultiply()
503 case TypeCategory::Complex: in ComparisonType()
513 case TypeCategory::Complex: in ComparisonType()
518 case TypeCategory::Complex: in ComparisonType()
[all …]
/llvm-project-15.0.7/llvm/test/Analysis/LoopAccessAnalysis/
H A Dpr31098.ll19 ; class Complex {
27 ; Complex(const Complex &rhs) : real_(rhs.real()), imaginary_(rhs.imaginary()) { }
32 ; Complex operator+(const Complex& rhs) const
37 ; Complex operator-(const Complex& rhs) const
43 ; void Test(Complex *out, size_t size)
48 ; Complex t0 = out[offset];
59 %class.Complex = type { float, float }
78 %0 = getelementptr inbounds %class.Complex, %class.Complex* %out, i64 %offset.048, i32 0
80 …%imaginary_.i.i = getelementptr inbounds %class.Complex, %class.Complex* %out, i64 %offset.048, i3…
83 %3 = getelementptr inbounds %class.Complex, %class.Complex* %out, i64 %add, i32 0
[all …]
/llvm-project-15.0.7/llvm/test/Transforms/LoopVectorize/
H A Dpr31098.ll20 ; class Complex {
28 ; Complex(const Complex &rhs) : real_(rhs.real()), imaginary_(rhs.imaginary()) { }
33 ; Complex operator+(const Complex& rhs) const
38 ; Complex operator-(const Complex& rhs) const
44 ; void Test(Complex *out, size_t size)
49 ; Complex t0 = out[offset];
61 %class.Complex = type { float, float }
80 %0 = getelementptr inbounds %class.Complex, %class.Complex* %out, i64 %offset.048, i32 0
82 …%imaginary_.i.i = getelementptr inbounds %class.Complex, %class.Complex* %out, i64 %offset.048, i3…
85 %3 = getelementptr inbounds %class.Complex, %class.Complex* %out, i64 %add, i32 0
[all …]
H A Dinterleaved-accesses-1.ll14 ; class Complex {
20 ; Complex() : real_(0), imaginary_(0) { }
22 ; Complex(const Complex &rhs) : real_(rhs.real()), imaginary_(rhs.imaginary()) { }
28 ;void test(Complex * __restrict__ out, Complex * __restrict__ in, size_t out_start, size_t size)
33 ; Complex t0 = in[out_ix];
43 %class.Complex = type { float, float }
62 %arrayidx = getelementptr inbounds %class.Complex, %class.Complex* %in, i64 %add
63 %0 = bitcast %class.Complex* %arrayidx to i32*
65 %imaginary_.i.i = getelementptr inbounds %class.Complex, %class.Complex* %in, i64 %add, i32 1
68 %arrayidx1 = getelementptr inbounds %class.Complex, %class.Complex* %out, i64 %add
[all …]
/llvm-project-15.0.7/llvm/test/Transforms/InstCombine/
H A Dextractinsert-tbaa.ll3 %Complex = type { double, double }
6 define double @teststructextract(%Complex *%val) {
8 ; CHECK-NOT: load %Complex
9 %loaded = load %Complex, %Complex *%val, !tbaa !1
10 %real = extractvalue %Complex %loaded, 0
23 define void @teststructinsert(%Complex *%loc, double %a, double %b) {
26 ; CHECK-NOT: store %Complex
27 %inserted = insertvalue %Complex undef, double %a, 0
28 %inserted2 = insertvalue %Complex %inserted, double %b, 1
29 store %Complex %inserted2, %Complex *%loc, !tbaa !1
[all …]
/llvm-project-15.0.7/clang/test/SemaCXX/
H A Dcomplex-conversion.cpp5 void func(float Real, _Complex float Complex) { in func() argument
6 …Real += Complex; // expected-error {{assigning to 'float' from incompatible type '_Complex float'}} in func()
7 Real += (float)Complex; in func()
9 …Real = Complex; // expected-error {{implicit conversion from '_Complex float' to 'float' is not pe… in func()
10 Real = (float)Complex; in func()
12 …take<float>(Complex); // expected-error {{implicit conversion from '_Complex float' to 'float' is … in func()
14 take<_Complex float>(Complex); in func()
17 take<bool>(Complex); in func()
/llvm-project-15.0.7/llvm/test/Transforms/SROA/
H A Dmem-par-metadata-sroa.ll6 ; class Complex {
12 ; Complex() : real_(0), imaginary_(0) { }
13 ; Complex(float real, float imaginary) : real_(real), imaginary_(imaginary) { }
14 ; Complex(const Complex &rhs) : real_(rhs.real()), imaginary_(rhs.imaginary()) { }
19 ; Complex operator+(const Complex& rhs) const
21 ; return Complex(real_ + rhs.real_, imaginary_ + rhs.imaginary_);
25 ; void test(Complex *out, long size)
29 ; Complex t0 = out[offset];
47 %class.Complex = type { float, float }
52 %t0 = alloca %class.Complex, align 4
[all …]
/llvm-project-15.0.7/flang/runtime/
H A Dtype-code.cpp56 case TypeCategory::Complex: in TypeCode()
141 return std::make_pair(TypeCategory::Complex, 2); in GetCategoryAndKind()
143 return std::make_pair(TypeCategory::Complex, 3); in GetCategoryAndKind()
145 return std::make_pair(TypeCategory::Complex, 4); in GetCategoryAndKind()
147 return std::make_pair(TypeCategory::Complex, 8); in GetCategoryAndKind()
149 return std::make_pair(TypeCategory::Complex, 10); in GetCategoryAndKind()
151 return std::make_pair(TypeCategory::Complex, 16); in GetCategoryAndKind()
153 return std::make_pair(TypeCategory::Complex, 16); in GetCategoryAndKind()
H A Dtools.h162 case TypeCategory::Complex: in ApplyType()
166 return FUNC<TypeCategory::Complex, 2>{}(std::forward<A>(x)...); in ApplyType()
168 return FUNC<TypeCategory::Complex, 3>{}(std::forward<A>(x)...); in ApplyType()
171 return FUNC<TypeCategory::Complex, 4>{}(std::forward<A>(x)...); in ApplyType()
306 case TypeCategory::Complex: in GetResultType()
317 case TypeCategory::Complex: in GetResultType()
323 case TypeCategory::Complex: in GetResultType()
326 return std::make_pair(TypeCategory::Complex, xKind); in GetResultType()
328 case TypeCategory::Complex: in GetResultType()
329 return std::make_pair(TypeCategory::Complex, maxKind); in GetResultType()
[all …]
H A Dfindloc.cpp31 struct Equality<TypeCategory::Complex, KIND1, TypeCategory::Complex, KIND2> {
32 using Type1 = CppTypeFor<TypeCategory::Complex, KIND1>;
33 using Type2 = CppTypeFor<TypeCategory::Complex, KIND2>;
43 struct Equality<TypeCategory::Complex, KIND1, CAT2, KIND2> {
44 using Type1 = CppTypeFor<TypeCategory::Complex, KIND1>;
54 struct Equality<CAT1, KIND1, TypeCategory::Complex, KIND2> {
56 using Type2 = CppTypeFor<TypeCategory::Complex, KIND2>;
163 case TypeCategory::Complex: in operator ()()
231 case TypeCategory::Complex: in RTNAME()
232 ApplyFloatingPointKind<NumericFindlocHelper<TypeCategory::Complex, in RTNAME()
[all …]
H A Dproduct.cpp125 void RTNAME(CppProductComplex4)(CppTypeFor<TypeCategory::Complex, 4> &result, in RTNAME()
128 result = GetTotalReduction<TypeCategory::Complex, 4>(x, source, line, dim, in RTNAME()
132 void RTNAME(CppProductComplex8)(CppTypeFor<TypeCategory::Complex, 8> &result, in RTNAME()
135 result = GetTotalReduction<TypeCategory::Complex, 8>(x, source, line, dim, in RTNAME()
140 void RTNAME(CppProductComplex10)(CppTypeFor<TypeCategory::Complex, 10> &result, in RTNAME()
143 result = GetTotalReduction<TypeCategory::Complex, 10>(x, source, line, dim, in RTNAME()
148 void RTNAME(CppProductComplex16)(CppTypeFor<TypeCategory::Complex, 16> &result, in RTNAME()
151 result = GetTotalReduction<TypeCategory::Complex, 16>(x, source, line, dim, in RTNAME()
H A Dsum.cpp148 void RTNAME(CppSumComplex4)(CppTypeFor<TypeCategory::Complex, 4> &result, in RTNAME()
151 result = GetTotalReduction<TypeCategory::Complex, 4>( in RTNAME()
154 void RTNAME(CppSumComplex8)(CppTypeFor<TypeCategory::Complex, 8> &result, in RTNAME()
157 result = GetTotalReduction<TypeCategory::Complex, 8>( in RTNAME()
161 void RTNAME(CppSumComplex10)(CppTypeFor<TypeCategory::Complex, 10> &result, in RTNAME()
164 result = GetTotalReduction<TypeCategory::Complex, 10>( in RTNAME()
168 void RTNAME(CppSumComplex16)(CppTypeFor<TypeCategory::Complex, 16> &result, in RTNAME()
171 result = GetTotalReduction<TypeCategory::Complex, 16>( in RTNAME()
H A Ddot-product.cpp37 if constexpr (RCAT == TypeCategory::Complex) { in AccumulateIndexed()
83 if constexpr (RCAT == TypeCategory::Complex) { in DoDotProduct()
198 auto z{DotProduct<TypeCategory::Complex, 4>{}(x, y, source, line)}; in RTNAME()
204 result = DotProduct<TypeCategory::Complex, 8>{}(x, y, source, line); in RTNAME()
209 result = DotProduct<TypeCategory::Complex, 10>{}(x, y, source, line); in RTNAME()
214 result = DotProduct<TypeCategory::Complex, 16>{}(x, y, source, line); in RTNAME()
/llvm-project-15.0.7/clang/test/CodeGenCXX/
H A Ddebug-info-composite-cc.cpp36 struct Complex { struct
37 Complex() {} in Complex() function
38 Complex(Complex &Copy) : i(Copy.i) {}; in Complex() argument
/llvm-project-15.0.7/mlir/include/mlir/Dialect/Complex/IR/
H A DComplexOps.td12 include "mlir/Dialect/Complex/IR/ComplexBase.td"
26 let arguments = (ins Complex<AnyFloat>:$lhs, Complex<AnyFloat>:$rhs);
27 let results = (outs Complex<AnyFloat>:$result);
36 let arguments = (ins Complex<AnyFloat>:$complex);
119 let results = (outs Complex<AnyFloat>:$complex);
149 let results = (outs Complex<AnyFloat>:$result);
218 let arguments = (ins Complex<AnyFloat>:$lhs, Complex<AnyFloat>:$rhs);
242 let results = (outs Complex<AnyFloat>:$result);
269 let results = (outs Complex<AnyFloat>:$result);
313 let results = (outs Complex<AnyFloat>:$result);
[all …]
/llvm-project-15.0.7/llvm/test/CodeGen/AArch64/
H A Darm64-dagcombiner-load-slicing.ll4 %class.Complex = type { float, float }
15 define void @test(%class.Complex* nocapture %out, i64 %out_start) {
17 %arrayidx = getelementptr inbounds %class.Complex, %class.Complex* %out, i64 %out_start
18 %0 = bitcast %class.Complex* %arrayidx to i64*
26 %arrayidx2 = getelementptr inbounds %class.Complex, %class.Complex* %out, i64 %add
27 %i.i = getelementptr inbounds %class.Complex, %class.Complex* %arrayidx2, i64 0, i32 0
31 %r.i = getelementptr inbounds %class.Complex, %class.Complex* %arrayidx2, i64 0, i32 1
35 %ref.tmp.sroa.0.0.cast = bitcast %class.Complex* %arrayidx to <2 x float>*
/llvm-project-15.0.7/flang/lib/Optimizer/Builder/
H A DComplex.cpp16 fir::factory::Complex::getComplexPartType(mlir::Type complexType) const { in getComplexPartType()
20 mlir::Type fir::factory::Complex::getComplexPartType(mlir::Value cplx) const { in getComplexPartType()
24 mlir::Value fir::factory::Complex::createComplex(fir::KindTy kind, in createComplex()
31 mlir::Value fir::factory::Complex::createComplex(mlir::Type cplxTy, in createComplex()
/llvm-project-15.0.7/flang/unittests/Runtime/
H A DMiscIntrinsic.cpp41 mold.Establish(TypeCategory::Complex, 4, nullptr, 1, extent); in TEST()
46 EXPECT_EQ(result.type().raw(), (TypeCode{TypeCategory::Complex, 4}.raw())); in TEST()
61 mold.Establish(TypeCategory::Complex, 4, nullptr, 1, extent); in TEST()
66 EXPECT_EQ(result.type().raw(), (TypeCode{TypeCategory::Complex, 4}.raw())); in TEST()
75 auto source{Descriptor::Create(TypeCategory::Complex, 4, in TEST()
/llvm-project-15.0.7/llvm/test/Transforms/SLPVectorizer/ARM/
H A Dsroa.ll6 %class.Complex = type { double, double }
12 define void @SROAed(%class.Complex* noalias nocapture sret(%class.Complex) %agg.result, [4 x i32] %…
45 ; CHECK-NEXT: [[RE_I_I:%.*]] = getelementptr inbounds [[CLASS_COMPLEX:%.*]], %class.Complex* [[A…
47 ; CHECK-NEXT: [[IM_I_I:%.*]] = getelementptr inbounds [[CLASS_COMPLEX]], %class.Complex* [[AGG_R…
82 %re.i.i = getelementptr inbounds %class.Complex, %class.Complex* %agg.result, i32 0, i32 0
84 %im.i.i = getelementptr inbounds %class.Complex, %class.Complex* %agg.result, i32 0, i32 1
/llvm-project-15.0.7/flang/include/flang/Optimizer/Builder/
H A DComplex.h21 class Complex {
23 explicit Complex(FirOpBuilder &builder, mlir::Location loc) in Complex() function
25 Complex(const Complex &) = delete;
/llvm-project-15.0.7/llvm/test/MC/Disassembler/Hexagon/
H A Dxtype_complex.txt4 # Complex add/sub halfwords
14 # Complex add/sub words
20 # Complex multiply
46 # Complex multiply real or imaginary
56 # Complex multiply with round and pack
66 # Complex multiply 32x16
/llvm-project-15.0.7/clang/unittests/Tooling/
H A DQualTypeNamesTest.cpp174 TypeNameVisitor Complex; in TEST() local
175 Complex.ExpectedQualTypeNames["CheckTX"] = "B::TX"; in TEST()
176 Complex.runOver( in TEST()

1234567