MCPcopy Create free account
hub / github.com/arrayfire/arrayfire / af_conjg

Function af_conjg

src/api/c/complex.cpp:152–176  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

150}
151
152af_err af_conjg(af_array *out, const af_array in) {
153 try {
154 const ArrayInfo &info = getInfo(in);
155 af_dtype type = info.getType();
156
157 if (type != c32 && type != c64) { return af_retain_array(out, in); }
158 if (info.ndims() == 0) { return af_retain_array(out, in); }
159
160 af_array res;
161 switch (type) {
162 case c32:
163 res = getHandle(conj<cfloat>(getArray<cfloat>(in)));
164 break;
165 case c64:
166 res = getHandle(conj<cdouble>(getArray<cdouble>(in)));
167 break;
168
169 default: TYPE_ERROR(0, type);
170 }
171
172 std::swap(*out, res);
173 }
174 CATCHALL;
175 return AF_SUCCESS;
176}
177
178af_err af_abs(af_array *out, const af_array in) {
179 try {

Callers 1

af_transposeFunction · 0.85

Calls 5

swapFunction · 0.85
af_retain_arrayFunction · 0.70
getHandleFunction · 0.70
getTypeMethod · 0.45
ndimsMethod · 0.45

Tested by

no test coverage detected