- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When I call abs(valarray), the contents of the valarray are cast to int, when is included (under Windows.) If I include only, there is no problem, but I need for other functions. So what's to be done?
Seems like there should be a way to get this to work. Especially, since the ICL 11.0 manual specifically says: "The Intel compiler provides a high performance implementation of specialized valarray operations for the C++ standard valarray container." And lists the supported functions, including abs(valarray)
===========================================================
It's possible to override abs() in the code, but there's got to be a better way (?)
double abs( double x ) { return fabs(x); }
valarray abs ( valarray& x )
{
valarray absX (x);
for (int i = 0 ; i < x.size(); ++i) absX = fabs(x);
return absX;
}
Seems like there should be a way to get this to work. Especially, since the ICL 11.0 manual specifically says: "The Intel compiler provides a high performance implementation of specialized valarray operations for the C++ standard valarray container." And lists the supported functions, including abs(valarray
===========================================================
It's possible to override abs() in the code, but there's got to be a better way (?)
double abs( double x ) { return fabs(x); }
valarray
{
valarray
for (int i = 0 ; i < x.size(); ++i) absX = fabs(x);
return absX;
}
Link Copied
0 Replies
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page