Forum > Windows

GPU crunching question

<< < (21/37) > >>

Pepo:

--- Quote from: Devaster on 24 Apr 2007, 02:36:00 pm ---how i can rewrite this part of code

--- Code: ---const float* outp=output.read_data ();
  for (int i=0;i<fftlen;i++)
  {
  PowerSpectrum[CurrentSub+i]=outp[i];
  }

--- End code ---
to something like this

--- Code: ---PowerSpectrum[CurrentSub]=output.read_data ();
--- End code ---
left side is float right side is const float*. how make typecast ???

--- End quote ---

Hard to meaningfully typecast a pointer to float array into float value ;)

You would either have to sort of memcpy() the values from output.read_data() to &PowerSpectrum[CurrentSub], or create and later use some pointer instead of PowerSpectrum[CurrentSub] (which I suppose will not be possible, but I have never seen the code, so a wild guess only).

Peter

Devaster:
yes i have used a memcpy...

i ll remember for memcpy today morning by work on mz house .... ;D

Devaster:
yesterday i have compiled a seti client without graphics .... 120 percent performance boost over version with graphics . on GPU is:  FFT(Nagas) and Powerspectrum(Rapidmind) and a part of BaseSmooth (first fft(nagas)).

CPU load is about 60 percent and from this used a 30 percent for system thread. as i have seen in codeanalyst this 30 percent is a nvogl32.dll - this is a GLSL encapsulator.

but i need create a console for some messages because i dont know where the code is ....
simon can i use for this a DEBUG directive implemented in code ?

i must to do a validation check ....
thats all for now...  :)

Simon:
Hi Devaster,

I'd just use a simple fprintf to stderr.txt - you could also use #ifdef DEBUG statements and echo to console from them. When you run the app inside Visual Studio, you'll get the console output. Otherwise, the stderr.txt (or a new file) seems simple to implement.

HTH,
Simon.

Devaster:
i willvconvert it to console aplication  ;)

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version