| 1225 | // |
| 1226 | |
| 1227 | void |
| 1228 | RealDescriptor::convertToNativeDoubleFormat (double* out, |
| 1229 | Long nitems, |
| 1230 | std::istream& is, |
| 1231 | const RealDescriptor& id) |
| 1232 | { |
| 1233 | // BL_PROFILE("RD:convertToNativeDoubleFormat"); |
| 1234 | |
| 1235 | Long buffSize(std::min(Long(readBufferSize), nitems)); |
| 1236 | char *bufr = new char[buffSize * id.numBytes()]; |
| 1237 | |
| 1238 | while (nitems > 0) |
| 1239 | { |
| 1240 | Long get = std::min(static_cast<Long>(readBufferSize), nitems); |
| 1241 | is.read(bufr, id.numBytes()*get); |
| 1242 | PD_convert(out, |
| 1243 | bufr, |
| 1244 | get, |
| 1245 | 0, |
| 1246 | FPC::Native64RealDescriptor(), |
| 1247 | id, |
| 1248 | FPC::NativeLongDescriptor()); |
| 1249 | |
| 1250 | if(bAlwaysFixDenormals) { |
| 1251 | PD_fixdenormals(out, get, FPC::Native64RealDescriptor().format(), |
| 1252 | FPC::Native64RealDescriptor().order()); |
| 1253 | } |
| 1254 | nitems -= get; |
| 1255 | out += get; |
| 1256 | } |
| 1257 | |
| 1258 | if(is.fail()) { |
| 1259 | amrex::Error("convert(Real*,Long,istream&,RealDescriptor&) failed"); |
| 1260 | } |
| 1261 | |
| 1262 | delete [] bufr; |
| 1263 | } |
| 1264 | |
| 1265 | } |
nothing calls this directly
no test coverage detected