Browse Source

Projucer: Add option to automatically set up oneMKL in VS exporters

v6.1.6
reuk 3 years ago
parent
commit
c49e18cad4
No known key found for this signature in database GPG Key ID: 9ADCD339CFC98A11
3 changed files with 23 additions and 8 deletions
  1. +17
    -4
      extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_MSVC.h
  2. +1
    -0
      extras/Projucer/Source/Utility/Helpers/jucer_PresetIDs.h
  3. +5
    -4
      modules/juce_dsp/juce_dsp.h

+ 17
- 4
extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_MSVC.h View File

@@ -42,6 +42,7 @@ public:
: ProjectExporter (p, t),
IPPLibraryValue (settings, Ids::IPPLibrary, getUndoManager()),
IPP1ALibraryValue (settings, Ids::IPP1ALibrary, getUndoManager()),
MKL1ALibraryValue (settings, Ids::MKL1ALibrary, getUndoManager()),
platformToolsetValue (settings, Ids::toolset, getUndoManager()),
targetPlatformVersion (settings, Ids::windowsTargetPlatformVersion, getUndoManager()),
manifestFileValue (settings, Ids::msvcManifestFile, getUndoManager())
@@ -59,6 +60,7 @@ public:
//==============================================================================
String getIPPLibrary() const { return IPPLibraryValue.get(); }
String getIPP1ALibrary() const { return IPP1ALibraryValue.get(); }
String getMKL1ALibrary() const { return MKL1ALibraryValue.get(); }
String getPlatformToolset() const { return platformToolsetValue.get(); }
String getWindowsTargetPlatformVersion() const { return targetPlatformVersion.get(); }
@@ -446,14 +448,15 @@ public:
addWindowsTargetPlatformToConfig (*e);
struct IPPLibraryInfo
struct IntelLibraryInfo
{
String libraryKind;
String configString;
};
for (const auto& info : { IPPLibraryInfo { owner.getIPPLibrary(), "UseIntelIPP" },
IPPLibraryInfo { owner.getIPP1ALibrary(), "UseIntelIPP1A" }})
for (const auto& info : { IntelLibraryInfo { owner.getIPPLibrary(), "UseIntelIPP" },
IntelLibraryInfo { owner.getIPP1ALibrary(), "UseIntelIPP1A" },
IntelLibraryInfo { owner.getMKL1ALibrary(), "UseInteloneMKL" } })
{
if (info.libraryKind.isNotEmpty())
e->createNewChildElement (info.configString)->addTextElement (info.libraryKind);
@@ -1501,6 +1504,11 @@ public:
{ var(), "true", "Static_Library", "Dynamic_Library" }),
"Enable this to use Intel's Integrated Performance Primitives library, supplied as part of the oneAPI toolkit.");
props.add (new ChoicePropertyComponent (MKL1ALibraryValue, "Use MKL Library (oneAPI)",
{ "No", "Parallel", "Sequential", "Cluster" },
{ var(), "Parallel", "Sequential", "Cluster" }),
"Enable this to use Intel's MKL library, supplied as part of the oneAPI toolkit.");
{
auto isWindows10SDK = getVisualStudioVersion() > 14;
@@ -1584,7 +1592,12 @@ protected:
mutable File rcFile, iconFile, packagesConfigFile;
OwnedArray<MSVCTargetBase> targets;
ValueWithDefault IPPLibraryValue, IPP1ALibraryValue, platformToolsetValue, targetPlatformVersion, manifestFileValue;
ValueWithDefault IPPLibraryValue,
IPP1ALibraryValue,
MKL1ALibraryValue,
platformToolsetValue,
targetPlatformVersion,
manifestFileValue;
File getProjectFile (const String& extension, const String& target) const
{


+ 1
- 0
extras/Projucer/Source/Utility/Helpers/jucer_PresetIDs.h View File

@@ -152,6 +152,7 @@ namespace Ids
DECLARE_ID (debugInformationFormat);
DECLARE_ID (IPPLibrary);
DECLARE_ID (IPP1ALibrary);
DECLARE_ID (MKL1ALibrary);
DECLARE_ID (msvcModuleDefinitionFile);
DECLARE_ID (bigIcon);
DECLARE_ID (smallIcon);


+ 5
- 4
modules/juce_dsp/juce_dsp.h View File

@@ -123,10 +123,11 @@
If this flag is set, then JUCE will use Intel's MKL for JUCE's FFT and
convolution classes.
The folder containing the mkl_dfti.h header must be in your header
search paths when using this flag. You also need to add all the necessary
intel mkl libraries to the "External Libraries to Link" field in the
Projucer.
If you're using the Projucer's Visual Studio exporter, you should also set
the "Use MKL Library (oneAPI)" option in the exporter settings to
"Sequential" or "Parallel". If you're not using the Visual Studio exporter,
the folder containing the mkl_dfti.h header must be in your header search
paths, and you must link against all the necessary MKL libraries.
*/
#ifndef JUCE_DSP_USE_INTEL_MKL
#define JUCE_DSP_USE_INTEL_MKL 0


Loading…
Cancel
Save