Skip to content
Snippets Groups Projects
Commit bb537285 authored by Mark Winter's avatar Mark Winter
Browse files

Debugging script command to test HydraConfig loader

parent 9480dcab
Branches
No related tags found
No related merge requests found
......@@ -103,6 +103,7 @@ copy $(OutDir)CudaMex.dll "$(ProjectDir)Mex.mexw64"</Command>
<ClInclude Include="mph\qualifier_helpers.h" />
<ClInclude Include="mph\tuple_helpers.h" />
<ClInclude Include="ScriptCmds\ArgConverter.h" />
<ClInclude Include="ScriptCmds\Commands\ScrCmdCheckConfig.h" />
<ClInclude Include="ScriptCmds\Commands\ScrCmdClosure.h" />
<ClInclude Include="ScriptCmds\Commands\ScrCmdDeviceCount.h" />
<ClInclude Include="ScriptCmds\Commands\ScrCmdDeviceStats.h" />
......
......@@ -159,6 +159,9 @@
<ClInclude Include="ScriptCmds\HydraConfig.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="ScriptCmds\Commands\ScrCmdCheckConfig.h">
<Filter>Header Files\Commands</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="Mex\CudaMex.cpp">
......
......@@ -33,6 +33,7 @@
<ClInclude Include="Python\PyIncludes.h" />
<ClInclude Include="Python\PyTypes.h" />
<ClInclude Include="ScriptCmds\ArgConverter.h" />
<ClInclude Include="ScriptCmds\Commands\ScrCmdCheckConfig.h" />
<ClInclude Include="ScriptCmds\Commands\ScrCmdClosure.h" />
<ClInclude Include="ScriptCmds\Commands\ScrCmdDeviceCount.h" />
<ClInclude Include="ScriptCmds\Commands\ScrCmdDeviceStats.h" />
......
......@@ -170,5 +170,8 @@
<ClInclude Include="ScriptCmds\HydraConfig.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="ScriptCmds\Commands\ScrCmdCheckConfig.h">
<Filter>Header Files\Commands</Filter>
</ClInclude>
</ItemGroup>
</Project>
\ No newline at end of file
#pragma once
#include "ScriptCommandImpl.h"
#include "ScriptCommandDefines.h"
#include "HydraConfig.h"
SCR_COMMAND_CLASSDEF(CheckConfig)
{
public:
SCR_HELP_STRING("Get Hydra library configuration information.\n"
"Returns hydraConfig structure with configuration information.\n");
static void execute(Script::ObjectType*& hydraConfig)
{
if ( !HydraConfig::validConfig() )
Script::errorMsg("Hydra Library configuration was not initialized correctly!");
hydraConfig = Script::Struct::create(1, {"UseProcessMutex"});
Script::Struct::setVal(hydraConfig, 0, "UseProcessMutex", Script::Converter::fromNumeric(HydraConfig::useProcessMutex()));
}
};
......@@ -47,7 +47,6 @@ public:
using CommandList = std::unordered_map<std::string, FuncPtrs>;
// TODO: Module initialization routines (and matlab dispatch)
inline static const FuncPtrs* findCommand(const std::string& command)
{
if ( m_commands.count(command) < 1 )
......
......@@ -36,6 +36,9 @@
#include "Commands/ScrCmdDeviceCount.h"
#include "Commands/ScrCmdDeviceStats.h"
// Debugging: Check Hydra library config from script
#include "Commands/ScrCmdCheckConfig.h"
// Cuda processing commands
#include "Commands/ScrCmdClosure.h"
#include "Commands/ScrCmdElementWiseDifference.h"
......
......@@ -25,6 +25,8 @@ SCR_BEGIN_COMMANDS
SCR_OUTPUT(SCR_STRUCT, memStats)))
SCR_CMD_NOPROC(DeviceStats, SCR_PARAMS(SCR_OUTPUT(SCR_STRUCT, deviceStatsArray)))
SCR_CMD_NOPROC(CheckConfig, SCR_PARAMS(SCR_OUTPUT(SCR_STRUCT, hydraConfig)))
SCR_CMD(Closure, SCR_PARAMS
(
SCR_INPUT(SCR_IMAGE(SCR_DYNAMIC), imageIn),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment