Skip to main content
0 votes
1 answer
182 views

I'm trying to program a Schrödinger simulation in python but I'm having problems with @njit from the library Numba to optimize functions. This is the code. I'm just trying to solve a discreet ...
Julian Antonio Bertolini Suare's user avatar
3 votes
1 answer
259 views

I can't figure out an easy method to include a C header with C complex types in C++. Assume you have the following files: c_source.h #include <complex.h> #ifdef __cplusplus extern "C" ...
td244's user avatar
  • 265
1 vote
1 answer
165 views

I am following a paper that uses a Hermitian covariance matrix and inverts it to produce a Fisher matrix. I construct my covariance as Gamma[i,m,n], stored inside a larger array of shape (n_z, n_k, ...
Miguel's user avatar
  • 143
4 votes
1 answer
163 views

I need (only) the real part of the product of two complex numbers. Naturally, I can code this as real(x)*real(y) - imag(x)*imag(y); or real(x*y); The latter, however, formally first computes the ...
Walter's user avatar
  • 45.9k
1 vote
1 answer
155 views

Arm® Architecture Reference Manual for A-profile architecture has the following instructions: FMLA (Floating-point fused multiply-add) FMLS (Floating-point fused multiply-subtract) FCMLA (Floating-...
pmor's user avatar
  • 6,983
1 vote
1 answer
150 views

Context: I've recently been using pybind11 to put a python frontend on an old c++ project of mine. This has mostly been a breeze (thanks pybind11 devs!), but there are some areas where I've had to ...
Mat's user avatar
  • 13
-1 votes
1 answer
121 views

I am interested in working with 32-bit complex values in C, made up of 16-bit real and imaginary values. I am working with clang and gcc, and representing my 16-bit floats using _Float16, which I ...
Brad's user avatar
  • 4,174
6 votes
3 answers
299 views

I have two python lists(list1 and list2),each containing 51 complex numbers. At each index i, I can choose either list1[i] or list2[i]. I want to select one element per index(Total of 51 elements) ...
Manish Tr's user avatar
0 votes
2 answers
71 views

I have a complex tensor: tensor1 = tensor([0.0000+0.j, -106990.0794+0.j], device='cuda:1', dtype=torch.complex128) The both elements have no imaginary part (0.j), however, when squaring the variable ...
Cameron Sangri's user avatar
6 votes
1 answer
148 views

According to the C Standard: Each complex type has the same representation and alignment requirements as an array type containing exactly two elements of the corresponding real type; the first ...
CPlus's user avatar
  • 5,156
2 votes
1 answer
200 views

For example, what Intel AVX/SSE intrinsics can I use to split a array of complex numbers into a two arrays of real and imaginary parts respectively? So something like [1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7....
Golden Rockefeller's user avatar
6 votes
2 answers
358 views

Let's say I have two arrays a and b both with dtype np.complex128 and I want to compute C = np.matmul(a, b).real . That is, I don't care about the imaginary part, only the real part. Is there a better ...
nobe's user avatar
  • 61
0 votes
0 answers
60 views

I have a large Python method that calculates a series of ndarray quantities of dtype=np.complex128. I have been experimenting with what speed increases are possible using Cython. In converting a ...
Noughbee's user avatar
0 votes
0 answers
118 views

I'm writing a code that mostly consists of matrices manipulation and, in particular, diagonalization. I already have a code, both in python and in Fortran 90 that are able to solve my problem in a ...
Felipe Flores's user avatar
0 votes
0 answers
80 views

I've encountered a bug when using Clang[1] with libomp[2] whereby using omp_priv = omp_orig in the initializer of a custom OpenMP reduction silently gives erroneous output. For example: /* file.cpp */ ...
Anti Earth's user avatar
  • 4,961

15 30 50 per page
1
2 3 4 5
97