Merge branch 'master' of https://github.com/Microsoft/multiverso
This commit is contained in:
Коммит
84f49ae8aa
|
@ -72,8 +72,8 @@
|
|||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug|x64'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<IncludePath>$(ProjectDir);$(MSMPI_INC);$(ThirdPartyPath)\ZeroMQ 4.0.4\include;$(SolutionDir)/src;$(SolutionDir)/include;$(VC_IncludePath);$(WindowsSDK_IncludePath);D:\multiverso-next\lib</IncludePath>
|
||||
<LibraryPath>$(MSMPI_LIB64);$(SolutionDir)/x64/$(Configuration);$(VC_LibraryPath_x64);$(WindowsSDK_LibraryPath_x64);D:\multiverso-next\lib</LibraryPath>
|
||||
<IncludePath>$(ProjectDir);$(MSMPI_INC);$(ThirdPartyPath)\ZeroMQ 4.0.4\include;$(SolutionDir)/src;$(SolutionDir)/include;$(VC_IncludePath);$(WindowsSDK_IncludePath);D:\git_dictionary\multiverso-master_update\multiverso-master\include;</IncludePath>
|
||||
<LibraryPath>$(MSMPI_LIB64);$(SolutionDir)/x64/$(Configuration);$(VC_LibraryPath_x64);$(WindowsSDK_LibraryPath_x64);D:\git_dictionary\multiverso-master_update\multiverso-master\x64\debug;</LibraryPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_zmq|x64'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
#include <multiverso/updater/updater.h>
|
||||
#include <multiverso/table_factory.h>
|
||||
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
using namespace multiverso;
|
||||
|
|
|
@ -25,4 +25,5 @@
|
|||
# Executables
|
||||
*.exe
|
||||
*.out
|
||||
*.app
|
||||
*.app
|
||||
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
#ifndef MULTIVERSO_MATRIX_TABLE_H_
|
||||
#define MULTIVERSO_MATRIX_TABLE_H_
|
||||
|
||||
|
||||
#include "multiverso/multiverso.h"
|
||||
#include "multiverso/table_interface.h"
|
||||
|
||||
#include <vector>
|
||||
#include <random>
|
||||
|
||||
namespace multiverso {
|
||||
|
||||
|
@ -97,6 +99,7 @@ public:
|
|||
explicit MatrixServerTable(const MatrixTableOption<T>& option);
|
||||
|
||||
MatrixServerTable(integer_t num_row, integer_t num_col);
|
||||
MatrixServerTable(integer_t num_row, integer_t num_col, float min_value, float max_value);
|
||||
|
||||
void ProcessAdd(const std::vector<Blob>& data) override;
|
||||
|
||||
|
|
|
@ -84,8 +84,8 @@
|
|||
<LibraryPath>$(MSMPI_LIB64);$(VC_LibraryPath_x64);$(WindowsSDK_LibraryPath_x64);</LibraryPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_zmq|x64'">
|
||||
<IncludePath>$(ThirdPartyPath)\ZeroMQ 4.0.4\include;$(ProjectDir)\..\include;$(VC_IncludePath);$(WindowsSDK_IncludePath)</IncludePath>
|
||||
<LibraryPath>$(ThirdPartyPath)\ZeroMQ 4.0.4\lib;$(VC_LibraryPath_x64);$(WindowsSDK_LibraryPath_x64);D:\multiverso-next\lib;</LibraryPath>
|
||||
<IncludePath>D:\ZeroMQ\include;$(ProjectDir)\..\include;$(VC_IncludePath);$(WindowsSDK_IncludePath)</IncludePath>
|
||||
<LibraryPath>$(VC_LibraryPath_x64);$(WindowsSDK_LibraryPath_x64);D:\multiverso-next\lib;D:\ZeroMQ\lib;</LibraryPath>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug|x64'">
|
||||
<ClCompile>
|
||||
|
@ -154,7 +154,7 @@
|
|||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>MULTIVERSO_USE_MPI;WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<OpenMPSupport>true</OpenMPSupport>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
<TreatWarningAsError>false</TreatWarningAsError>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
|
@ -245,4 +245,4 @@
|
|||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
</Project>
|
||||
|
|
|
@ -368,6 +368,21 @@ MatrixServerTable<T>::MatrixServerTable(integer_t num_row, integer_t num_col) :
|
|||
server_id_, size, num_col, num_row, num_col);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
MatrixServerTable<T>::MatrixServerTable(integer_t num_row, integer_t num_col, float min_value,float max_value) :
|
||||
MatrixServerTable<T>::MatrixServerTable(num_row, num_col) {
|
||||
if (typeid(T) == typeid(float)){
|
||||
std::random_device rd;
|
||||
std::mt19937 gen(rd());
|
||||
std::uniform_real_distribution<float> dis(min_value,max_value);
|
||||
|
||||
for (int i = 0; i<storage_.size(); i++)
|
||||
{
|
||||
storage_[i] = dis(gen);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
void MatrixServerTable<T>::ProcessAdd(const std::vector<Blob>& data) {
|
||||
CHECK(data.size() == 2 || data.size() == 3);
|
||||
|
|
Загрузка…
Ссылка в новой задаче