Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions apps/medlda_release/README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Input data file format:

Each line represents 1 document, and consists of the following in order:

0 or more integer labels [0 to num_label) in a one-hot encoding.

num_xtra real values as constant extra predictors in the classifier matrix.

num_target real values as regression targets (each regression target is a separate "task" to predict a scalar).

any number of word:count pairs where word is an arbitrary string containing no spaces or ':'s and count is a positive integer.






93 changes: 93 additions & 0 deletions apps/medlda_release/dSFMT/CHANGE-LOG.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
ver 2.2.3
-------
change Makefile for nmake

ver 2.2.2
-------
fix MSC 2012 compile error.

ver 2.2.1
-------
The code for ALTIVEC is changed, to fit to the ISA manual.
This was reported by Tao Yao, thanks.

ver 2.2.0
-------
move do_recursion to dSFMT-common.h

ver 2.1.1
-------
The initialization of the constants for sse2 is changed.
Old version may cause trouble in parallel environment like OpenMP.

ver 2.1
-------
This version supports the periods from 2^521-1 to 2^216091-1.
We added new function dsfmt_genrand_uint32, which returns 32-bit
unsigned integer. If you need many floating point pseudo random
numbers and a few integers, you don't need to use another
integer generator.

ver 2.0
-------
The recursion formula of dSFMT is changed.
The supported periods are changed.
The output sequences are completely changed.
The generation speed is improved.
The variable for initialization check is removed, because it causes
an execution error in cygwin.

ver 1.3.1
-------
change dSFMT.h not to include dSFMT-params.h
change Makefile to clean test files.

ver 1.3
-------
add `dsfmt_' prefix to functions.
changed to structure base code.
put Intel Compiler into silence.
bug fix checking BIG_ENDIAN and BYTE_ORDER
change test.c not to include dSFMT.c
dSFMT-alti.h and dSFMT-sse2.h are marged into dSFMT.c

ver 1.2.1
-------
add #include <altivec.h> to dSFMT.c

ver 1.2
-------
The precision specifier of printf was too large in test.c
CAUTION! *.out.txt is changed.
add dSFMT-params216091.h
gcc compile option changed form -O9 to -O3.
add AltiVec parameter format for systems which are not OSX.
change Makefile for systems which are not OSX and support AltiVec.
change sample2 of howto-compile for Free BSD.
change period certification code more smart.
change source files for BORLANDC and Visual Studio.

ver 1.1.1
-------
BUG in dSFMT-sse2.h is fixed.
This bug didn't change the result.
Change test.c

ver 1.1
-------
add dSFMT-params132049.h
fix bug in period_certification. It's a bug but result is the same for
all parameter files.
change macro definition names and global variables. Thank you, Adam Piatyszek.
remove L suffix from floating point constants. It's Saito's misunderstanding.
fix bug of sfmt_idxof definition for BIG ENDIAN machine.

ver 1.0.1
-------
change name dSFMT-alti.c to SFMT-alti.h
change name dSFMT-sse2.c to SFMT-sse2.h
This version is not released.

ver 1.0
-------
The first version.
27 changes: 27 additions & 0 deletions apps/medlda_release/dSFMT/FILES.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
This archive contails following directories and files.

TOP DIRECTORY
FILES.txt: This file.
CHANGE-LOG.txt change log.
LICENSE.txt: License file.
Makefile: Makefile for test programs.
dSFMT.h: Header file.
dSFMT-common.h: Header file.
dSFMT-params.h: parameter file control for various Mersenne expornent
dSFMT-params521.h: parameters for period of 2^{521}-1
dSFMT-params1279.h: parameters for period of 2^{1279}-1
dSFMT-params2203.h: parameters for period of 2^{2203}-1
dSFMT-params4253.h: parameters for period of 2^{4253}-1
dSFMT-params11213.h: parameters for period of 2^{11213}-1
dSFMT-params19937.h: parameters for period of 2^{19937}-1
dSFMT.c: C code for standard C (c99) and unix like systems.
test.c: Test driver for standard C.
check.sh: Test shell script.
dSFMT.521.out.txt: correct output of dSFMT MEXP=521
dSFMT.1279.out.txt: correct output of dSFMT MEXP=1279
dSFMT.2203.out.txt: correct output of dSFMT MEXP=2203
dSFMT.4253.out.txt: correct output of dSFMT MEXP=4253
dSFMT.11213.out.txt: correct output of dSFMT MEXP=11213
dSFMT.19937.out.txt: correct output of dSFMT MEXP=19937

html DIRECTORY: The documents generated by doxygen.
32 changes: 32 additions & 0 deletions apps/medlda_release/dSFMT/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
Copyright (c) 2007, 2008, 2009 Mutsuo Saito, Makoto Matsumoto
and Hiroshima University.
Copyright (c) 2011, 2002 Mutsuo Saito, Makoto Matsumoto, Hiroshima
University and The University of Tokyo.
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
* Neither the name of the Hiroshima University nor the names of
its contributors may be used to endorse or promote products
derived from this software without specific prior written
permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
198 changes: 198 additions & 0 deletions apps/medlda_release/dSFMT/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,198 @@
# @file Makefile
# @brief Makefile
#
# @author Mutsuo Saito (Hiroshima University)
# @author Makoto Matsumoto (Hiroshima University)
#
# Copyright (C) 2007, 2008, 2013 Mutsuo Saito, Makoto Matsumoto and
# Hiroshima University. All rights reserved.
#
# The new BSD License is applied to this software.
# see LICENSE.txt
#
# @note
# We could comple test-sse2-Mxxx using gcc 3.4.4 of cygwin.
# We could comple test-sse2-Mxxx using gcc 4.0.1 of Linux.
# We coundn't comple test-sse2-Mxxx using gcc 3.3.2 of Linux.
# We could comple test-alti-Mxxx using gcc 3.3 of osx.
# We could comple test-alti-Mxxx using gcc 4.0 of osx.

WARN = -Wmissing-prototypes -Wall #-Winline
#WARN = -Wmissing-prototypes -Wall -W
#WARN = /Wall
OPTI = -O3 -finline-functions -fomit-frame-pointer -DNDEBUG \
-fno-strict-aliasing --param max-inline-insns-single=1800
#--param inline-unit-growth=500 --param large-function-growth=900 #for gcc 4
#OPTI = /Ot /Ob2 /Oy /Ox /Oi /GL /G6
#STD =
#STD = -std=c89 -pedantic
#STD = -std=c99 -pedantic
STD = -std=c99
CC = gcc
CCFLAGS = $(OPTI) $(WARN) $(STD)
ALTIFLAGS = -mabi=altivec -maltivec -DHAVE_ALTIVEC
OSXALTIFLAGS = -faltivec -maltivec -DHAVE_ALTIVEC
SSE2FLAGS = -msse2 -DHAVE_SSE2
#SSE2FLAGS = /arch:SSE2 /DHAVE_SSE2
STD_TARGET = test-std-M19937
ALL_STD_TARGET = test-std-M521 test-std-M1279 test-std-M2203 test-std-M4253 \
test-std-M11213 test-std-M19937 test-std-M44497 test-std-M86243 \
test-std-M132049 test-std-M216091
ALTI_TARGET = $(STD_TARGET) test-alti-M19937
ALL_ALTI_TARGET = test-alti-M521 test-alti-M1279 test-alti-M2203 \
test-alti-M4253 test-alti-M11213 test-alti-M19937 test-alti-M44497 \
test-alti-M86243 test-alti-M132049 test-alti-M216091
SSE2_TARGET = $(STD_TARGET) test-sse2-M19937
ALL_SSE2_TARGET = test-sse2-M521 test-sse2-M1279 test-sse2-M2203 \
test-sse2-M4253 test-sse2-M11213 test-sse2-M19937 test-sse2-M44497 \
test-sse2-M86243 test-sse2-M132049 test-sse2-M216091
# ==========================================================
# comment out or EDIT following lines to get max performance
# ==========================================================
# --------------------
# for gcc 4
# --------------------
CCFLAGS += --param inline-unit-growth=500 \
--param large-function-growth=900
# --------------------
# for icl
# --------------------
#CC = icl /Wcheck /O3 /QxB /Qprefetch
# --------------------
# for icc
# --------------------
#CC = icc
#OPTI = -O3 -finline-functions -fomit-frame-pointer -DNDEBUG \
#-fno-strict-aliasing
#CCFLAGS = $(OPTI) $(WARN) $(STD)
# -----------------
# for PowerPC
# -----------------
#CCFLAGS += -arch ppc
# -----------------
# for Pentium M
# -----------------
#CCFLAGS += -march=prescott
# -----------------
# for Athlon 64
# -----------------
#CCFLAGS += -march=athlon64

.PHONY: std-check sse2-check alti-check

std: $(STD_TARGET)

sse2: $(SSE2_TARGET)

alti: $(ALTI_TARGET)

osx-alti:
$(MAKE) "ALTIFLAGS=$(OSXALTIFLAGS)" alti

std-check: $(ALL_STD_TARGET)
./check.sh test-std

sse2-check: $(ALL_SSE2_TARGET)
./check.sh test-sse2

alti-check: $(ALL_ALTI_TARGET)
./check.sh test-alti

osx-alti-check:
make "ALTIFLAGS=$(OSXALTIFLAGS)" alti-check

test-std-M521: test.c dSFMT.c dSFMT.h
$(CC) $(CCFLAGS) -DDSFMT_MEXP=521 -o $@ dSFMT.c test.c

test-alti-M521: test.c dSFMT.c dSFMT.h
$(CC) $(CCFLAGS) $(ALTIFLAGS) -DDSFMT_MEXP=521 -o $@ dSFMT.c test.c

test-sse2-M521: test.c dSFMT.c dSFMT.h
$(CC) $(CCFLAGS) $(SSE2FLAGS) -DDSFMT_MEXP=521 -o $@ dSFMT.c test.c

test-std-M1279: test.c dSFMT.c dSFMT.h
$(CC) $(CCFLAGS) -DDSFMT_MEXP=1279 -o $@ dSFMT.c test.c

test-alti-M1279: test.c dSFMT.c dSFMT.h
$(CC) $(CCFLAGS) $(ALTIFLAGS) -DDSFMT_MEXP=1279 -o $@ dSFMT.c test.c

test-sse2-M1279: test.c dSFMT.c dSFMT.h
$(CC) $(CCFLAGS) $(SSE2FLAGS) -DDSFMT_MEXP=1279 -o $@ dSFMT.c test.c

test-std-M2203: test.c dSFMT.c dSFMT.h
$(CC) $(CCFLAGS) -DDSFMT_MEXP=2203 -o $@ dSFMT.c test.c

test-alti-M2203: test.c dSFMT.c dSFMT.h
$(CC) $(CCFLAGS) $(ALTIFLAGS) -DDSFMT_MEXP=2203 -o $@ dSFMT.c test.c

test-sse2-M2203: test.c dSFMT.c dSFMT.h
$(CC) $(CCFLAGS) $(SSE2FLAGS) -DDSFMT_MEXP=2203 -o $@ dSFMT.c test.c

test-std-M4253: test.c dSFMT.c dSFMT.h
$(CC) $(CCFLAGS) -DDSFMT_MEXP=4253 -o $@ dSFMT.c test.c

test-alti-M4253: test.c dSFMT.c dSFMT.h
$(CC) $(CCFLAGS) $(ALTIFLAGS) -DDSFMT_MEXP=4253 -o $@ dSFMT.c test.c

test-sse2-M4253: test.c dSFMT.c dSFMT.h
$(CC) $(CCFLAGS) $(SSE2FLAGS) -DDSFMT_MEXP=4253 -o $@ dSFMT.c test.c

test-std-M11213: test.c dSFMT.c dSFMT.h
$(CC) $(CCFLAGS) -DDSFMT_MEXP=11213 -o $@ dSFMT.c test.c

test-alti-M11213: test.c dSFMT.c dSFMT.h
$(CC) $(CCFLAGS) $(ALTIFLAGS) -DDSFMT_MEXP=11213 -o $@ dSFMT.c test.c

test-sse2-M11213: test.c dSFMT.c dSFMT.h
$(CC) $(CCFLAGS) $(SSE2FLAGS) -DDSFMT_MEXP=11213 -o $@ dSFMT.c test.c

test-std-M19937: test.c dSFMT.c dSFMT.h
$(CC) $(CCFLAGS) -DDSFMT_MEXP=19937 -o $@ dSFMT.c test.c

test-alti-M19937: test.c dSFMT.c dSFMT.h
$(CC) $(CCFLAGS) $(ALTIFLAGS) -DDSFMT_MEXP=19937 -o $@ dSFMT.c test.c

test-sse2-M19937: test.c dSFMT.c dSFMT.h
$(CC) $(CCFLAGS) $(SSE2FLAGS) -DDSFMT_MEXP=19937 -o $@ dSFMT.c test.c

test-std-M44497: test.c dSFMT.c dSFMT.h
$(CC) $(CCFLAGS) -DDSFMT_MEXP=44497 -o $@ dSFMT.c test.c

test-alti-M44497: test.c dSFMT.c dSFMT.h
$(CC) $(CCFLAGS) $(ALTIFLAGS) -DDSFMT_MEXP=44497 -o $@ dSFMT.c test.c

test-sse2-M44497: test.c dSFMT.c dSFMT.h
$(CC) $(CCFLAGS) $(SSE2FLAGS) -DDSFMT_MEXP=44497 -o $@ dSFMT.c test.c

test-std-M86243: test.c dSFMT.c dSFMT.h
$(CC) $(CCFLAGS) -DDSFMT_MEXP=86243 -o $@ dSFMT.c test.c

test-alti-M86243: test.c dSFMT.c dSFMT.h
$(CC) $(CCFLAGS) $(ALTIFLAGS) -DDSFMT_MEXP=86243 -o $@ dSFMT.c test.c

test-sse2-M86243: test.c dSFMT.c dSFMT.h
$(CC) $(CCFLAGS) $(SSE2FLAGS) -DDSFMT_MEXP=86243 -o $@ dSFMT.c test.c

test-std-M132049: test.c dSFMT.c dSFMT.h
$(CC) $(CCFLAGS) -DDSFMT_MEXP=132049 -o $@ dSFMT.c test.c

test-alti-M132049: test.c dSFMT.c dSFMT.h
$(CC) $(CCFLAGS) $(ALTIFLAGS) -DDSFMT_MEXP=132049 -o $@ dSFMT.c test.c

test-sse2-M132049: test.c dSFMT.c dSFMT.h
$(CC) $(CCFLAGS) $(SSE2FLAGS) -DDSFMT_MEXP=132049 -o $@ dSFMT.c test.c

test-std-M216091: test.c dSFMT.c dSFMT.h
$(CC) $(CCFLAGS) -DDSFMT_MEXP=216091 -o $@ dSFMT.c test.c

test-alti-M216091: test.c dSFMT.c dSFMT.h
$(CC) $(CCFLAGS) $(ALTIFLAGS) -DDSFMT_MEXP=216091 -o $@ dSFMT.c test.c

test-sse2-M216091: test.c dSFMT.c dSFMT.h
$(CC) $(CCFLAGS) $(SSE2FLAGS) -DDSFMT_MEXP=216091 -o $@ dSFMT.c test.c

.c.o:
$(CC) $(CCFLAGS) -c $<

clean:
rm -f *.o *~ test-*-M*
Loading