Hello all,
I am doing a Monte Carlo integration with the following
function:
function f_dtai_1p(x, params) result(y)
real(kind=qp), dimension(:), intent(in) :: x
type(functionparams), intent(in) :: params
real(kind=qp) :: y
y = maxval( (/ 0.0_qp, matmul(x,params%x) + params%b /) )
end function f_dtai_1p
Profiling my code shows that i am spending 70% of my time in this
function.
So to speed up my computations, it would be nice if I could make the
evaluation of the above function a bit faster.
However, i currently don't see any ways to change my Fortran 95 code to
something more efficient.
Is there a way to re-write the above code so that it is more efficient?
Maybe it's good to know that the dimension of x is somewhere between 8
and 96. So params%x is maximum a 96x96 matrix.
Thanks,
Bart
--
"Share what you know. Learn what you don't."


|