Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Fortran > optimizing ques...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 8 Topic 8335 of 8908
Post > Topic >>

optimizing question

by Bart Vandewoestyne <MyFirstName.MyLastName@[EMAIL PROTECTED] > Jun 6, 2008 at 02:54 PM

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."
 




 8 Posts in Topic:
optimizing question
Bart Vandewoestyne <My  2008-06-06 14:54:02 
Re: optimizing question
"FX" <couder  2008-06-06 18:00:56 
Re: optimizing question
nospam@[EMAIL PROTECTED]   2008-06-06 11:12:35 
Re: optimizing question
glen herrmannsfeldt <g  2008-06-06 12:41:19 
Re: optimizing question
Gib Bogle <bogle@[EMAI  2008-06-08 11:11:25 
Re: optimizing question
Terence <tbwright@[EMA  2008-06-07 16:54:21 
Re: optimizing question
Gib Bogle <g.bogle@[EM  2008-06-10 16:26:49 
Re: optimizing question
Bart Vandewoestyne <My  2008-06-11 15:11:32 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed Nov 19 7:31:22 CST 2008.