Browse Source

just getting the x86 native libraries to compile

pull/36/head
Marcus Cuda 17 years ago
parent
commit
4a8658fddc
  1. 3
      src/NativeWrappers/.gitignore
  2. 36
      src/NativeWrappers/ATLAS/ATLASWrapper.vcproj
  3. 4
      src/NativeWrappers/ATLAS/blas.h
  4. 10
      src/NativeWrappers/Common/WindowsDLL.cpp
  5. 23
      src/NativeWrappers/Common/blas.c
  6. 14
      src/NativeWrappers/Common/resource.h
  7. 103
      src/NativeWrappers/Common/resource.rc
  8. 36
      src/NativeWrappers/MKL/MKLWrapper.vcproj
  9. 4
      src/NativeWrappers/MKL/blas.h
  10. 12
      src/NativeWrappers/NativeWrappers.sln

3
src/NativeWrappers/.gitignore

@ -0,0 +1,3 @@
*.aps
Debug
Release

36
src/NativeWrappers/ATLAS/ATLASWrapper.vcproj

@ -19,7 +19,7 @@
Name="Debug|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="1"
ConfigurationType="2"
CharacterSet="2"
>
<Tool
@ -40,11 +40,14 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="&quot;C:\source\mathnet-marcus\src\NativeWrappers\ATLAS&quot;;C:\cygwin\tmp\ATLAS\include"
PreprocessorDefinitions="_WINDOWS"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
RuntimeLibrary="1"
WarningLevel="3"
DebugInformationFormat="4"
CompileAs="0"
/>
<Tool
Name="VCManagedResourceCompilerTool"
@ -57,6 +60,9 @@
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="libcblas.a libatlas.a liblapack.a"
OutputFile="$(OutDir)\MathNET.Numerics.ATLAS.dll"
AdditionalLibraryDirectories="C:\cygwin\tmp\ATLAS\parallel\lib"
GenerateDebugInformation="true"
TargetMachine="1"
/>
@ -86,7 +92,7 @@
Name="Release|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="1"
ConfigurationType="2"
CharacterSet="2"
WholeProgramOptimization="1"
>
@ -109,10 +115,13 @@
Name="VCCLCompilerTool"
Optimization="2"
EnableIntrinsicFunctions="true"
RuntimeLibrary="2"
AdditionalIncludeDirectories="&quot;C:\source\mathnet-marcus\src\NativeWrappers\ATLAS&quot;;C:\cygwin\tmp\ATLAS\include"
PreprocessorDefinitions="_WINDOWS"
RuntimeLibrary="0"
EnableFunctionLevelLinking="true"
WarningLevel="3"
DebugInformationFormat="3"
CompileAs="0"
/>
<Tool
Name="VCManagedResourceCompilerTool"
@ -125,6 +134,9 @@
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="libcblas.a libatlas.a liblapack.a"
OutputFile="$(OutDir)\MathNET.Numerics.ATLAS.dll"
AdditionalLibraryDirectories="C:\cygwin\tmp\ATLAS\parallel\lib"
GenerateDebugInformation="true"
OptimizeReferences="2"
EnableCOMDATFolding="2"
@ -161,18 +173,34 @@
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File
RelativePath="..\Common\blas.c"
>
</File>
<File
RelativePath="..\Common\WindowsDLL.cpp"
>
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
<File
RelativePath=".\blas.h"
>
</File>
</Filter>
<Filter
Name="Resource Files"
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
>
<File
RelativePath="..\Common\resource.rc"
>
</File>
</Filter>
</Files>
<Globals>

4
src/NativeWrappers/ATLAS/blas.h

@ -0,0 +1,4 @@
#include "cblas.h"
typedef struct { float real; float imag; } Complex8;
typedef struct { double real; double imag; } Complex16;

10
src/NativeWrappers/Common/WindowsDLL.cpp

@ -0,0 +1,10 @@
#ifdef _WINDOWS
#ifndef VC_EXTRALEAN
#define VC_EXTRALEAN
#endif
#include "windows.h"
BOOL APIENTRY DllMain( HANDLE, DWORD, LPVOID ){
return TRUE;
}
#endif

23
src/NativeWrappers/Common/blas.c

@ -0,0 +1,23 @@
#include "blas.h"
#ifdef _WINDOWS
#define DLLEXPORT __declspec( dllexport )
#else
#define DLLEXPORT
#endif
DLLEXPORT void s_axpy( const int n, const float alpha, const float x[], float y[]){
cblas_saxpy(n, alpha, x, 1, y, 1);
}
DLLEXPORT void d_axpy( const int n, const double alpha, const double x[], double y[]){
cblas_daxpy(n, alpha, x, 1, y, 1);
}
DLLEXPORT void c_axpy( const int n, const Complex8 alpha, const Complex8 x[], Complex8 y[]){
cblas_caxpy(n, &alpha, x, 1, y, 1);
}
DLLEXPORT void z_axpy( const int n, const Complex16 alpha, const Complex16 x[], Complex16 y[]){
cblas_zaxpy(n, &alpha, x, 1, y, 1);
}

14
src/NativeWrappers/Common/resource.h

@ -0,0 +1,14 @@
//{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
// Used by resource.rc
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 101
#define _APS_NEXT_COMMAND_VALUE 40001
#define _APS_NEXT_CONTROL_VALUE 1001
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif

103
src/NativeWrappers/Common/resource.rc

@ -0,0 +1,103 @@
// Microsoft Visual C++ generated resource script.
//
#include "resource.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "afxres.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
// English (U.S.) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
#endif //_WIN32
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE
BEGIN
"resource.h\0"
END
2 TEXTINCLUDE
BEGIN
"#include ""afxres.h""\r\n"
"\0"
END
3 TEXTINCLUDE
BEGIN
"\r\n"
"\0"
END
#endif // APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Version
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 0,2009,12,0
PRODUCTVERSION 0,2009,12,0
FILEFLAGSMASK 0x17L
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x4L
FILETYPE 0x2L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "Comments", "http://mathdotnet.com"
VALUE "CompanyName", "Math.NET"
VALUE "FileDescription", "MathNET Numerics Native Library"
VALUE "FileVersion", "0.2009.12"
VALUE "InternalName", "Math.NET"
VALUE "LegalCopyright", "Copyright (C) Math.NET 2009"
VALUE "OriginalFilename", "MathNET.Numerics"
VALUE "ProductName", "Math.NET"
VALUE "ProductVersion", "2009.12"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
#endif // English (U.S.) resources
/////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED

36
src/NativeWrappers/MKL/MKLWrapper.vcproj

@ -19,7 +19,7 @@
Name="Debug|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="1"
ConfigurationType="2"
CharacterSet="2"
>
<Tool
@ -40,11 +40,14 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="&quot;C:\source\mathnet-marcus\src\NativeWrappers\MKL&quot;;&quot;C:\Program Files (x86)\Intel\Compiler\11.1\046\mkl\include&quot;"
PreprocessorDefinitions="_WINDOWS"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
RuntimeLibrary="1"
WarningLevel="3"
DebugInformationFormat="4"
CompileAs="0"
/>
<Tool
Name="VCManagedResourceCompilerTool"
@ -57,6 +60,9 @@
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="mkl_intel_c.lib mkl_intel_thread.lib mkl_core.lib libiomp5md.lib"
OutputFile="$(OutDir)\MathNET.Numerics.MKL.dll"
AdditionalLibraryDirectories="&quot;C:\Program Files (x86)\Intel\Compiler\11.1\046\lib\ia32&quot;;&quot;C:\Program Files (x86)\Intel\Compiler\11.1\046\mkl\ia32\lib&quot;"
GenerateDebugInformation="true"
TargetMachine="1"
/>
@ -86,7 +92,7 @@
Name="Release|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="1"
ConfigurationType="2"
CharacterSet="2"
WholeProgramOptimization="1"
>
@ -109,10 +115,13 @@
Name="VCCLCompilerTool"
Optimization="2"
EnableIntrinsicFunctions="true"
RuntimeLibrary="2"
AdditionalIncludeDirectories="&quot;C:\source\mathnet-marcus\src\NativeWrappers\MKL&quot;;&quot;C:\Program Files (x86)\Intel\Compiler\11.1\046\mkl\include&quot;"
PreprocessorDefinitions="_WINDOWS"
RuntimeLibrary="0"
EnableFunctionLevelLinking="true"
WarningLevel="3"
DebugInformationFormat="3"
CompileAs="0"
/>
<Tool
Name="VCManagedResourceCompilerTool"
@ -125,6 +134,9 @@
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="mkl_intel_c.lib mkl_intel_thread.lib mkl_core.lib libiomp5md.lib"
OutputFile="$(OutDir)\MathNET.Numerics.MKL.dll"
AdditionalLibraryDirectories="&quot;C:\Program Files (x86)\Intel\Compiler\11.1\046\lib\ia32&quot;;&quot;C:\Program Files (x86)\Intel\Compiler\11.1\046\mkl\ia32\lib&quot;"
GenerateDebugInformation="true"
OptimizeReferences="2"
EnableCOMDATFolding="2"
@ -161,18 +173,34 @@
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File
RelativePath="..\Common\blas.c"
>
</File>
<File
RelativePath="..\Common\WindowsDLL.cpp"
>
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
<File
RelativePath=".\blas.h"
>
</File>
</Filter>
<Filter
Name="Resource Files"
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
>
<File
RelativePath="..\Common\resource.rc"
>
</File>
</Filter>
</Files>
<Globals>

4
src/NativeWrappers/MKL/blas.h

@ -0,0 +1,4 @@
#include "mkl_cblas.h"
typedef MKL_Complex8 Complex8;
typedef MKL_Complex16 Complex16;

12
src/NativeWrappers/NativeWrappers.sln

@ -2,9 +2,17 @@
Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Common", "Common", "{5A0892FF-82CE-40FC-BCE1-73810C615F52}"
ProjectSection(SolutionItems) = preProject
Common\blas.c = Common\blas.c
Common\resource.h = Common\resource.h
Common\resource.rc = Common\resource.rc
Common\WindowsDLL.cpp = Common\WindowsDLL.cpp
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ATLASWrapper", "ATLAS\ATLASWrapper.vcproj", "{A848B8C9-E72A-4716-A8F1-04104CC2422F}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MKLWrapper", "MKL\MKLWrapper.vcproj", "{C0B0DBA9-7FB0-4C87-BDB1-3EED19DC2B8F}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
@ -15,6 +23,10 @@ Global
{A848B8C9-E72A-4716-A8F1-04104CC2422F}.Debug|Win32.Build.0 = Debug|Win32
{A848B8C9-E72A-4716-A8F1-04104CC2422F}.Release|Win32.ActiveCfg = Release|Win32
{A848B8C9-E72A-4716-A8F1-04104CC2422F}.Release|Win32.Build.0 = Release|Win32
{C0B0DBA9-7FB0-4C87-BDB1-3EED19DC2B8F}.Debug|Win32.ActiveCfg = Debug|Win32
{C0B0DBA9-7FB0-4C87-BDB1-3EED19DC2B8F}.Debug|Win32.Build.0 = Debug|Win32
{C0B0DBA9-7FB0-4C87-BDB1-3EED19DC2B8F}.Release|Win32.ActiveCfg = Release|Win32
{C0B0DBA9-7FB0-4C87-BDB1-3EED19DC2B8F}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

Loading…
Cancel
Save