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 "../bit/messages.hh"
73#include "messages.hh"
74#include "sc_nbdefs.hh"
75
76namespace sc_dt
77{
78
79//-----------------------------------------------------------------------------
80//"sc_io_base"
81//

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

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

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

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