Skip to content

Commit 4895b8b

Browse files
author
naka_t
committed
ソースコード整理,VSの64bitでコンパイルできるように修正
1 parent 389988e commit 4895b8b

16 files changed

+31
-122
lines changed

.gitignore

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
2+
mlda\.iobj
3+
4+
mlda\.ipdb
5+
6+
mlda\.pdb
7+
8+
msvc/mlda/mlda\.vcxproj\.filters
9+
10+
msvc/mlda/mlda\.vcxproj\.user

GibbsMLDA.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#define _CRT_SECURE_NO_WARNINGS 1
1+
#define _CRT_SECURE_NO_WARNINGS 1
22
#include "GibbsMLDA.h"
33
#include <string.h>
44
#include <stdio.h>

GibbsMLDA.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#pragma once
1+
#pragma once
22
#include <vector>
33
#include "Rand.h"
44
#include "AliasTable.h"

GibbsMLDATest.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// GibbsLDATest.cpp : コンソール アプリケーションのエントリ ポイントを定義します。
1+
// GibbsLDATest.cpp : コンソール アプリケーションのエントリ ポイントを定義します。
22
//
33
#define _CRT_SECURE_NO_WARNINGS 1
44
#include "array.h"

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ LightLDA[1]をマルチモーダル学習[2]へ拡張したモデルです.Wal
77

88

99
## インストール
10-
Windowsでは`msvc/mlda.sln`をVisual Studio 2015 (Release, x86)でコンパイルできることを確認しています
10+
Windowsでは`msvc/mlda.sln`をVisual Studio 2017でコンパイルできることを確認しています
1111
Mac, Ubuntuではmakeでコンパイルで確認しています.
1212

1313
```

Rand.h

+1-13
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,4 @@
1-
#pragma once
2-
/*******************************************************************
3-
4-
Rand.h developed by naka_t 2010.07.13
5-
6-
7-
 乱数生成クラス.
8-
あらかじめ乱数のテーブルを生成し、循環して使用することで高速化.
9-
rand_sがあまりにも遅かったので作成.
10-
11-
 *プログラム作成 naka_t 2010.07.13
12-
13-
*******************************************************************/
1+
#pragma once
142
#include <stdlib.h>
153

164
class CRand

array.h

+1-16
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,4 @@
1-
#pragma once
2-
/*******************************************************************
3-
Array.cpp developed by naka_t 2009.12.02
4-
5-
6-
多次元配列を扱うための関数
7-
8-
*オーバーロードで作成していたものを
9-
*テンプレート関数にしてみました naka_t 2008.07.08
10-
*fprintfVar,fscanfVarをMyIO.hへ移行
11-
 SaveVariableとLoadVariableの変数上書き保存機能追加 naka_t 2009.12.02
12-
*行列保存・読み込み関数(Load/SaveVariableMatrix)追加 naka_t 2011.01.31
13-
*ソースコードの整理 naka_t 2011.02.01
14-
*配列のスライス関数を追加 naka_t 2012.07.09
15-
16-
*******************************************************************/
1+
#pragma once
172
#include <string>
183
#include <vector>
194
#include <map>

mlda.exe

18.5 KB
Binary file not shown.

mlda.iobj

-2 MB
Binary file not shown.

mlda.ipdb

-415 KB
Binary file not shown.

mlda.pdb

-1.52 MB
Binary file not shown.

msvc/mlda/mlda.vcxproj

+11-5
Original file line numberDiff line numberDiff line change
@@ -37,32 +37,32 @@
3737
<PropertyGroup Label="Globals">
3838
<ProjectGuid>{DA2E0DD0-666D-439D-94B1-41CEEF0F4BDF}</ProjectGuid>
3939
<RootNamespace>mlda</RootNamespace>
40-
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
40+
<WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
4141
</PropertyGroup>
4242
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
4343
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
4444
<ConfigurationType>Application</ConfigurationType>
4545
<UseDebugLibraries>true</UseDebugLibraries>
46-
<PlatformToolset>v140</PlatformToolset>
46+
<PlatformToolset>v141</PlatformToolset>
4747
<CharacterSet>MultiByte</CharacterSet>
4848
</PropertyGroup>
4949
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
5050
<ConfigurationType>Application</ConfigurationType>
5151
<UseDebugLibraries>false</UseDebugLibraries>
52-
<PlatformToolset>v140</PlatformToolset>
52+
<PlatformToolset>v141</PlatformToolset>
5353
<WholeProgramOptimization>true</WholeProgramOptimization>
5454
<CharacterSet>MultiByte</CharacterSet>
5555
</PropertyGroup>
5656
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
5757
<ConfigurationType>Application</ConfigurationType>
5858
<UseDebugLibraries>true</UseDebugLibraries>
59-
<PlatformToolset>v140</PlatformToolset>
59+
<PlatformToolset>v141</PlatformToolset>
6060
<CharacterSet>MultiByte</CharacterSet>
6161
</PropertyGroup>
6262
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
6363
<ConfigurationType>Application</ConfigurationType>
6464
<UseDebugLibraries>false</UseDebugLibraries>
65-
<PlatformToolset>v140</PlatformToolset>
65+
<PlatformToolset>v141</PlatformToolset>
6666
<WholeProgramOptimization>true</WholeProgramOptimization>
6767
<CharacterSet>MultiByte</CharacterSet>
6868
</PropertyGroup>
@@ -90,6 +90,12 @@
9090
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
9191
<OutDir>..\..\</OutDir>
9292
</PropertyGroup>
93+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
94+
<OutDir>..\..\</OutDir>
95+
</PropertyGroup>
96+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
97+
<OutDir>..\..\</OutDir>
98+
</PropertyGroup>
9399
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
94100
<ClCompile>
95101
<WarningLevel>Level3</WarningLevel>

msvc/mlda/mlda.vcxproj.filters

-57
This file was deleted.

msvc/mlda/mlda.vcxproj.user

-4
This file was deleted.

myio.h

+4-14
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,4 @@
1-
/*********************************************************************
2-
3-
MyIO.h Copyright 2009.12.02 by naka_t
4-
5-
6-
last modified by naka_t 2009.12.02
7-
8-
*入出力関数 naka_t 2008.04.30
9-
*ファイルからの入出力を追加 naka_t 2009.12.02
10-
*std::string版のfgetsを追加 naka_t 2009.12.02
11-
*********************************************************************/
12-
#pragma once
1+
#pragma once
132
#include <time.h>
143
#include <stdio.h>
154
#include <string>
@@ -57,7 +46,6 @@ static int fprintfVar( const char *&val , FILE *fp ){ return fprintf( fp , "%s"
5746
// 戻り値:読み込んだ文字数
5847
// ファイルの終端の際は、string::nposを返します
5948
static size_t fgets( std::string &buff , FILE *fp ){
60-
6149
char c;
6250
buff.clear();
6351
while ( ( c = fgetc( fp ) ) != EOF && c != '\n' )
@@ -66,4 +54,6 @@ static size_t fgets( std::string &buff , FILE *fp ){
6654
if( c==EOF && buff.size()==0 ) return std::string::npos;
6755

6856
return buff.size();
69-
}
57+
}
58+
59+

mystl.h

-9
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,4 @@
11
#pragma once
2-
/*******************************************************************
3-
4-
MySTL.h developed by naka_t 2010.04.15
5-
6-
STL関係の関数とか
7-
8-
 *プログラム作成 naka_t 2010.04.15
9-
10-
*******************************************************************/
112
#include <vector>
123
#include <stdio.h>
134
#include <map>

0 commit comments

Comments
 (0)