Deleted Added
sdiff udiff text old ( 13160:1e959d3afc64 ) new ( 13325:86323e6cc8ec )
full compact
1/*****************************************************************************
2
3 Licensed to Accellera Systems Initiative Inc. (Accellera) under one or
4 more contributor license agreements. See the NOTICE file distributed
5 with this work for additional information regarding copyright ownership.
6 Accellera licenses this file to you under the Apache License, Version 2.0
7 (the "License"); you may not use this file except in compliance with the
8 License. You may obtain a copy of the License at

--- 55 unchanged lines hidden (view full) ---

64#define __SYSTEMC_EXT_DT_INT_SC_NBUTILS_HH__
65
66#include <cmath>
67#include <ios>
68#include <limits>
69#include <ostream>
70
71#include "../../utils/sc_report_handler.hh"
72#include "sc_nbdefs.hh"
73
74namespace sc_dt
75{
76
77//-----------------------------------------------------------------------------
78//"sc_io_base"
79//

--- 435 unchanged lines hidden (view full) ---

515
516#endif
517
518template<class Type>
519inline void
520div_by_zero(Type s)
521{
522 if (s == 0) {
523 SC_REPORT_ERROR("operation failed",
524 "div_by_zero<Type>(Type) : division by zero");
525 sc_core::sc_abort(); // can't recover from here
526 }
527}
528
529
530// ----------------------------------------------------------------------------
531// Functions to check if a given vector is zero or make one.

--- 285 unchanged lines hidden (view full) ---

817 v == -std::numeric_limits<double>::infinity();
818}
819
820inline void
821is_bad_double(double v)
822{
823 // Windows throws exception.
824 if (is_nan(v) || is_inf(v))
825 SC_REPORT_ERROR("(E204) value is not valid",
826 "is_bad_double(double v) : "
827 "v is not finite - NaN or Inf");
828}
829
830} // namespace sc_dt
831
832#endif // __SYSTEMC_EXT_DT_INT_SC_NBUTILS_HH__