I've sum test project working but i can't save result's to file, and program window disappears to quickly no matter what I'm trying to do: read from console or make infinity loop.
I've used getch(), and saw that simple_matmult program writes two input matrix and nothing else, now I see that problem is here
::brook::stream A(::brook::getStreamType(( float *)0), Height , Width,-1);
I'm using Palit 2600XT sonic. Take a look at this code:
::brook::stream A(::brook::getStreamType(( float *)0), Height , Width,-1);
::brook::stream B(::brook::getStreamType(( float *)0), Width , Height,-1);
::brook::stream C(::brook::getStreamType(( float *)0), Height , Height,-1);
Start(0);
getch();//1
streamRead(A, inputA);
getch();//2
streamRead(B, inputB);
for (i = 0; i < sizeof(inputA); ++i)
{
simple_matmult((float ) (Width), A, B, C);
}
The programs spops twice and there are now
"Unhandled exception at 0x00409ba1 in simple_matmult.exe: 0xC0000005: Access violation reading location 0x00000000."
I'm using CPU backend, may be problem is in "sizeof(inputA)" statement. I've changed original code to that becouse I've no console input
first StreamRead was successfull.
There are no cmd.iterations parameter. And i can enable gpu computations at all, after first getch() i see "Using cpu backend" massage. I can't use debug in VS2008. The following code :
for (i = 0; i < 1; ++i)
{
simple_matmult((float ) (Width), A, B, C);
}
returns the same exeption
I think that StreamRead's at all works right.
following code
::brook::stream A(::brook::getStreamType(( float *)0), Height , Width,-1);
::brook::stream B(::brook::getStreamType(( float *)0), Width , Height,-1);
::brook::stream C(::brook::getStreamType(( float *)0), Height , Height,-1);
Start(0);
streamRead(A, inputA);
streamRead(B, inputB);
getch();//1
for (i = 0; i < 1; ++i)
{
//simple_matmult((float ) (Width), A, B, C);
}
getch();//2
streamWrite(C, output);
getch();//3
Stop(0);
getch();//4
couses following result
0,001327 foreach item in stream C
I can't use debug becouse there are some problems with using cusom tool in VS2008. I can't run brok+ in debug at all.