I have a very strange problem. Here is my code:
<declare E,JV>
<perform some actions with E>
JV.Math_Mul(E);
////
public new void Math_Mul(Matrix a)
{
double[,] vC = new double[a.ColCount, this.RowCount];
externExtensions.MatMul(vC,a.Values ,this.Values, a.RowCount, this.ColCount, a.ColCount);
Values = vC;
CopyB(B.Values,vC);
}
static unsafe void CopyB(double[,] B, double[,] val)
{
int Col = val.GetLength(1);
int j = 0;
fixed (double* pA = B, pB = val)
{
for (int i = 0; i < val.Length; i++)
{
if (i != j * Col)
pA[i-j] = pB[i];
else
j++;
}
}
}
After executing CopyB function something happens to E(which is very strange because it's not a parameter of CopyB) and VS 2012 tells me:Cannot obtain value of local or argument 'E' as it is not available at this instruction pointer, possibly because it has been optimized away. Code Optimization is turned off and this code worked well until i've made CopyB. So, what is the problem? What happens to E and what should i do?
PS CopyB is implemented for faster parse of matrix after multiplication, this is part of my mathematical tools, i work with block matrixes.
I'll be very grateful for any help!