Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove IexMath as a library #962

Merged
merged 1 commit into from
Mar 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# Copyright (c) Contributors to the OpenEXR Project.

add_subdirectory( Iex )
add_subdirectory( IexMath )
add_subdirectory( IlmThread )

add_subdirectory( OpenEXR )
Expand Down
2 changes: 2 additions & 0 deletions src/lib/Iex/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ openexr_define_library(Iex
SOURCES
IexBaseExc.cpp
IexThrowErrnoExc.cpp
IexMathFloatExc.cpp
IexMathFpu.cpp
HEADERS
IexBaseExc.h
IexMathExc.h
Expand Down
20 changes: 12 additions & 8 deletions src/lib/Iex/IexExport.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,19 @@
#define IEXEXPORT_H

#if defined(OPENEXR_DLL)
#if defined(IEX_EXPORTS)
#define IEX_EXPORT __declspec(dllexport)
#else
#define IEX_EXPORT __declspec(dllimport)
#endif
#define IEX_EXPORT_CONST
# if defined(IEX_EXPORTS)
# define IEX_EXPORT __declspec(dllexport)
# else
# define IEX_EXPORT __declspec(dllimport)
# endif
#else
#define IEX_EXPORT
#define IEX_EXPORT_CONST const
# define IEX_EXPORT
#endif
#ifndef IEX_EXPORT_TYPE
# define IEX_EXPORT_TYPE
#endif
#ifndef IEX_EXPORT_ENUM
# define IEX_EXPORT_ENUM
#endif

#endif // #ifndef IEXEXPORT_H
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
//
//-----------------------------------------------------

#include <IexMathFloatExc.h>
#include <IexMacros.h>
#include <IexMathFpu.h>
#include "IexMathFloatExc.h"
#include "IexMacros.h"
#include "IexMathFpu.h"

#if 0
#include <iostream>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,9 @@
#ifndef INCLUDED_IEXMATHFLOATEXC_H
#define INCLUDED_IEXMATHFLOATEXC_H

#ifndef IEXMATH_EXPORT_H
#define IEXMATH_EXPORT_H

#if defined(OPENEXR_DLL)
#if defined(IEXMATH_EXPORTS)
#define IEXMATH_EXPORT __declspec(dllexport)
#else
#define IEXMATH_EXPORT __declspec(dllimport)
#endif
#define IEXMATH_EXPORT_CONST
#else
#define IEXMATH_EXPORT
#define IEXMATH_EXPORT_CONST const
#endif

#endif

#include "IexExport.h"
#include "IexNamespace.h"
#include "IexMathExc.h"
//#include <IexBaseExc.h>
#include "IexMathIeeeExc.h"

IEX_INTERNAL_NAMESPACE_HEADER_ENTER
Expand All @@ -37,7 +20,7 @@ IEX_INTERNAL_NAMESPACE_HEADER_ENTER
// will be trapped and converted to C++ exceptions.
//-------------------------------------------------------------

IEXMATH_EXPORT
IEX_EXPORT
void mathExcOn (int when = (IEEE_OVERFLOW | IEEE_DIVZERO | IEEE_INVALID));


Expand All @@ -46,7 +29,7 @@ void mathExcOn (int when = (IEEE_OVERFLOW | IEEE_DIVZERO | IEEE_INVALID));
// trapping and conversion to C++ exceptions is currently enabled.
//----------------------------------------------------------------------

IEXMATH_EXPORT
IEX_EXPORT
int getMathExcOn();


Expand All @@ -70,12 +53,12 @@ int getMathExcOn();
// // point exception settings
//------------------------------------------------------------------------

class MathExcOn
class IEX_EXPORT_TYPE MathExcOn
{
public:

IEXMATH_EXPORT MathExcOn (int when);
IEXMATH_EXPORT ~MathExcOn ();
IEX_EXPORT MathExcOn (int when);
IEX_EXPORT ~MathExcOn ();
MathExcOn (const MathExcOn&) = delete;
MathExcOn& operator= (const MathExcOn&) = delete;
MathExcOn (MathExcOn&&) = delete;
Expand All @@ -90,7 +73,7 @@ class MathExcOn
// It should be called wherever this class is commonly used where it has
// been found that certain floating point exceptions are not being thrown.

IEXMATH_EXPORT void handleOutstandingExceptions();
IEX_EXPORT void handleOutstandingExceptions();

private:

Expand Down
File renamed without changes.
12 changes: 7 additions & 5 deletions src/lib/IexMath/IexMathFpu.h → src/lib/Iex/IexMathFpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,27 @@
//
//------------------------------------------------------------------------

#include "IexMathIeeeExc.h"
#include "IexExport.h"
#include "IexNamespace.h"

#include "IexMathIeeeExc.h"

IEX_INTERNAL_NAMESPACE_HEADER_ENTER


//-----------------------------------------
// setFpExceptions() defines which floating
// point exceptions cause SIGFPE signals.
//-----------------------------------------

IEX_EXPORT
void setFpExceptions (int when = (IEEE_OVERFLOW | IEEE_DIVZERO | IEEE_INVALID));


//----------------------------------------
// fpExceptions() tells you which floating
// point exceptions cause SIGFPE signals.
//----------------------------------------

IEX_EXPORT
int fpExceptions ();


Expand All @@ -40,7 +42,7 @@ int fpExceptions ();
//------------------------------------------

extern "C" typedef void (* FpExceptionHandler) (int type, const char explanation[]);

IEX_EXPORT
void setFpExceptionHandler (FpExceptionHandler handler);

// -----------------------------------------
Expand All @@ -51,7 +53,7 @@ void setFpExceptionHandler (FpExceptionHandler handler);
// allow trapping of exception register states
// that can get set though no SIGFPE occurs.
// -----------------------------------------

IEX_EXPORT
void handleExceptionsSetInRegisters();


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,13 @@
//
//---------------------------------------------------------------------------

#include "IexExport.h"
#include "IexNamespace.h"

IEX_INTERNAL_NAMESPACE_HEADER_ENTER


enum IeeeExcType
enum IEX_EXPORT_ENUM IeeeExcType
{
IEEE_OVERFLOW = 1,
IEEE_UNDERFLOW = 2,
Expand Down
17 changes: 0 additions & 17 deletions src/lib/IexMath/CMakeLists.txt

This file was deleted.