Questions tagged [efficiency]
The efficiency tag has no usage guidance.
12 questions with no upvoted or accepted answers
5
votes
0
answers
152
views
Single precision vs double precision conjugate gradients
I tested my conjugate gradients implementation with float and double precision and contrary to my guess the double code was twice faster than the single precision code. The reason is that I need many ...
5
votes
0
answers
109
views
Dense factorization specialized for RBF-FD method
In RBF-FD methods (see Fornberg & Flyer. A Primer on Radial Basis Functions with Application to the Geosciences. SIAM, 2015. Chapter 5.), the finite-difference stencil coefficients for a set of ...
2
votes
0
answers
14
views
Integration involving bessel functions
I want to (efficiently) integrate a function of the form
$$
\int_0^a f(r) \dfrac{J_1(kr)}{r} \, dr,
$$
where $f$ is some function which involves trigonometric functions and where I do not always have $...
2
votes
0
answers
114
views
Efficient heat diffusion implementation with varying coefficients
I have the following heat diffusion equation:
\begin{alignat}{3}
\partial_t u(t, \vec{x}) &= g(\vec{x})\Delta u(t,\vec{x}), &\quad& \vec{x} \in\Omega, \, t\in(0,\infty],\\
\partial_n u(t,\...
2
votes
0
answers
265
views
Why is the method of im2col with GEMM is more efficient than the method of direction implementation with SIMD in CNN
The convolutional layers are most computationally intense parts of Convolutional neural networks (CNNs).Currently the common approach to impement convolutional layers is to expand the image into a ...
1
vote
0
answers
103
views
B-splines least squares with equality constraints
Can someone recommend the best way to solve a least squares fitting problem with B-splines, with additional equality constraints? I want to solve:
$$
\min_x || b - A x ||^2, \textrm{subject to: } C x =...
1
vote
0
answers
67
views
Stiff ODEs coupled with PDEs (computational efficiency)
I am simulating in COMSOL a system of 3 coupled PDEs (parabolic & elliptic) along with 10 stiff ODEs. In order to have the system working, I am downsizing the time step size too much to achieve ...
1
vote
0
answers
93
views
What's the most efficient way to calculate the Wiger quasiprobability distribution?
I want to calculate the Wigner quasiprobability distribution function of a particular wavefunction. The definition suggests a few straightforward ways of calculating it, but I was wondering if there's ...
0
votes
0
answers
63
views
Are there any efficient numerical methods to solve the recurrence relation of a function?
First, the recurrence relation is:
$$\pi_{k+1}(\omega)=(\omega-\alpha_k)\pi_{k}(\omega)-\beta_k\pi_{k-1}(\omega),$$
where
$$\alpha_k=\frac{\int_0^\Lambda\omega\pi_{k}^2(\omega)h^2(\omega)\text{d}\...
0
votes
0
answers
69
views
How can I optimize that loop?
I need to populate a matrix $A_{kl}$, where
$$ k = (m-1)J+n$$
$$ l = (p-1)J+q$$
And
$$m,p = 1, 2, ..., I$$
$$n,q = 1, 2, ..., J$$
Its components are (mnpq). For ...
0
votes
0
answers
88
views
Reducing run time of a numerical calculation using a mex file in Matlab
I wrote a Matlab code that involves doing a numeric calculation (relaxation), but it is quite slow. I learned of the possibility of using a mex file to run a C code and integrate it into Matlab, so I ...
0
votes
0
answers
824
views
Efficient Implementation of the Log Sum Exp Log trick for Preventing Underflow erros
So I'm constructing a Gibbs sampler for a moderately sized graphical model, and I started encountering underflow errors (the computed relative frequencies were all very small). To get around this, I'...