Hi Toby, > I don't have much expertise with MSVC, but I'm trying to build > pyviennacl, and I've got a couple of weird bugs. I've looked at the > source, but really have no idea what it's complaining about. Why can't > it resolve the type ambiguity here? > > 4>F:/src/viennacl/pyviennacl-dev/external/viennacl-dev\viennacl/linalg/bicgstab.hpp(149): > error C2668: 'fabs' : ambiguous call to overloaded function > 4> E:\Microsoft Visual Studio 11.0\VC\INCLUDE\math.h(118): could be > 'double fabs(double)' > 4> E:\Microsoft Visual Studio 11.0\VC\INCLUDE\math.h(516): or > 'float fabs(float)' > 4> E:\Microsoft Visual Studio 11.0\VC\INCLUDE\math.h(564): or > 'long double fabs(long double)' > 4> while trying to match the argument list '(CPU_ScalarType)'
Which types did you pass in? This looks like you pass an integer type (e.g. viennacl::vector<int>), while BiCGStab only makes sense for floating point numbers. std::fabs(int) then is ambiguous. > And here, I wish I knew what class it actually thinks its assigning.. > > 4>F:/src/viennacl/pyviennacl-dev/external/viennacl-dev\viennacl/linalg/bicgstab.hpp(125): > error C2088: '-=' : illegal for class > > Does the following patch suffice? The code now builds with only the error > above, and I imagine the effect should be the same. The patch below introduces a temporary, which is not a great thing. Instead, we should find and fix the underlying reason why the initial code does not compile. Can you please provide more context (e.g. the full compiler output)? Best regards, Karli ------------------------------------------------------------------------------ Managing the Performance of Cloud-Based Applications Take advantage of what the Cloud has to offer - Avoid Common Pitfalls. Read the Whitepaper. http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk _______________________________________________ ViennaCL-devel mailing list ViennaCL-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/viennacl-devel