├── doc └── .doc ├── log └── .log ├── etc ├── .etc └── unicap.yaml ├── test └── .test ├── src ├── tools │ ├── lib │ │ └── lib.txt │ ├── include │ │ ├── Eigen │ │ │ ├── Eigen │ │ │ ├── src │ │ │ │ ├── Core │ │ │ │ │ ├── util │ │ │ │ │ │ ├── NonMPL2.h │ │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ │ ├── ReenableStupidWarnings.h │ │ │ │ │ │ └── DisableStupidWarnings.h │ │ │ │ │ ├── arch │ │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ │ ├── SSE │ │ │ │ │ │ │ └── CMakeLists.txt │ │ │ │ │ │ ├── NEON │ │ │ │ │ │ │ └── CMakeLists.txt │ │ │ │ │ │ ├── AltiVec │ │ │ │ │ │ │ └── CMakeLists.txt │ │ │ │ │ │ └── Default │ │ │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ │ │ └── Settings.h │ │ │ │ │ ├── products │ │ │ │ │ │ └── CMakeLists.txt │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ └── CoreIterators.h │ │ │ │ ├── QR │ │ │ │ │ └── CMakeLists.txt │ │ │ │ ├── SVD │ │ │ │ │ └── CMakeLists.txt │ │ │ │ ├── misc │ │ │ │ │ └── CMakeLists.txt │ │ │ │ ├── Jacobi │ │ │ │ │ └── CMakeLists.txt │ │ │ │ ├── Cholesky │ │ │ │ │ └── CMakeLists.txt │ │ │ │ ├── LU │ │ │ │ │ ├── arch │ │ │ │ │ │ └── CMakeLists.txt │ │ │ │ │ └── CMakeLists.txt │ │ │ │ ├── SparseLU │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ └── SparseLU_Utils.h │ │ │ │ ├── plugins │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ ├── MatrixCwiseUnaryOps.h │ │ │ │ │ └── CommonCwiseBinaryOps.h │ │ │ │ ├── SparseQR │ │ │ │ │ └── CMakeLists.txt │ │ │ │ ├── SparseCore │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ ├── SparseFuzzy.h │ │ │ │ │ └── SparseRedux.h │ │ │ │ ├── StlSupport │ │ │ │ │ └── CMakeLists.txt │ │ │ │ ├── Eigenvalues │ │ │ │ │ └── CMakeLists.txt │ │ │ │ ├── Householder │ │ │ │ │ └── CMakeLists.txt │ │ │ │ ├── SPQRSupport │ │ │ │ │ └── CMakeLists.txt │ │ │ │ ├── Geometry │ │ │ │ │ ├── arch │ │ │ │ │ │ └── CMakeLists.txt │ │ │ │ │ └── CMakeLists.txt │ │ │ │ ├── MetisSupport │ │ │ │ │ └── CMakeLists.txt │ │ │ │ ├── CholmodSupport │ │ │ │ │ └── CMakeLists.txt │ │ │ │ ├── PaStiXSupport │ │ │ │ │ └── CMakeLists.txt │ │ │ │ ├── PardisoSupport │ │ │ │ │ └── CMakeLists.txt │ │ │ │ ├── SparseCholesky │ │ │ │ │ └── CMakeLists.txt │ │ │ │ ├── SuperLUSupport │ │ │ │ │ └── CMakeLists.txt │ │ │ │ ├── UmfPackSupport │ │ │ │ │ └── CMakeLists.txt │ │ │ │ ├── OrderingMethods │ │ │ │ │ └── CMakeLists.txt │ │ │ │ ├── Eigen2Support │ │ │ │ │ ├── Geometry │ │ │ │ │ │ └── CMakeLists.txt │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ ├── Macros.h │ │ │ │ │ ├── TriangularSolver.h │ │ │ │ │ ├── Memory.h │ │ │ │ │ ├── QR.h │ │ │ │ │ └── Lazy.h │ │ │ │ ├── IterativeLinearSolvers │ │ │ │ │ └── CMakeLists.txt │ │ │ │ └── CMakeLists.txt │ │ │ ├── Dense │ │ │ ├── Array │ │ │ ├── Householder │ │ │ ├── CMakeLists.txt │ │ │ ├── Sparse │ │ │ ├── Jacobi │ │ │ ├── QtAlignedMalloc │ │ │ ├── StdList │ │ │ ├── MetisSupport │ │ │ ├── LeastSquares │ │ │ ├── StdDeque │ │ │ ├── StdVector │ │ │ ├── Cholesky │ │ │ ├── PardisoSupport │ │ │ ├── SVD │ │ │ ├── SPQRSupport │ │ │ ├── QR │ │ │ ├── SparseQR │ │ │ ├── LU │ │ │ ├── UmfPackSupport │ │ │ ├── Eigenvalues │ │ │ ├── SparseCholesky │ │ │ ├── PaStiXSupport │ │ │ ├── IterativeLinearSolvers │ │ │ ├── Geometry │ │ │ ├── CholmodSupport │ │ │ ├── SparseLU │ │ │ ├── SparseCore │ │ │ ├── SuperLUSupport │ │ │ └── OrderingMethods │ │ ├── opencv │ │ │ ├── cxmisc.h │ │ │ ├── cvwimage.h │ │ │ ├── ml.h │ │ │ ├── cxeigen.hpp │ │ │ ├── highgui.h │ │ │ ├── cvaux.hpp │ │ │ ├── cv.hpp │ │ │ ├── cxcore.hpp │ │ │ └── cxcore.h │ │ ├── opencv2 │ │ │ ├── flann │ │ │ │ ├── dummy.h │ │ │ │ ├── config.h │ │ │ │ └── general.h │ │ │ ├── opencv_modules.hpp │ │ │ ├── gpu │ │ │ │ ├── gpumat.hpp │ │ │ │ └── devmem2d.hpp │ │ │ ├── core │ │ │ │ └── devmem2d.hpp │ │ │ ├── videostab │ │ │ │ └── videostab.hpp │ │ │ ├── highgui │ │ │ │ └── ios.h │ │ │ ├── nonfree │ │ │ │ └── nonfree.hpp │ │ │ └── video │ │ │ │ └── video.hpp │ │ ├── yaml-cpp │ │ │ ├── anchor.h │ │ │ ├── node │ │ │ │ ├── type.h │ │ │ │ ├── emit.h │ │ │ │ ├── detail │ │ │ │ │ ├── iterator_fwd.h │ │ │ │ │ ├── bool_type.h │ │ │ │ │ ├── memory.h │ │ │ │ │ └── iterator.h │ │ │ │ ├── parse.h │ │ │ │ ├── ptr.h │ │ │ │ └── iterator.h │ │ │ ├── emitterdef.h │ │ │ ├── noncopyable.h │ │ │ ├── mark.h │ │ │ ├── null.h │ │ │ ├── yaml.h │ │ │ ├── contrib │ │ │ │ └── anchordict.h │ │ │ ├── eventhandler.h │ │ │ ├── parser.h │ │ │ ├── dll.h │ │ │ ├── emitfromevents.h │ │ │ ├── stlemitter.h │ │ │ ├── ostream_wrapper.h │ │ │ ├── traits.h │ │ │ └── binary.h │ │ ├── boost │ │ │ ├── threadpool.hpp │ │ │ └── threadpool │ │ │ │ ├── detail │ │ │ │ ├── scope_guard.hpp │ │ │ │ └── locking_ptr.hpp │ │ │ │ ├── pool_adaptors.hpp │ │ │ │ └── shutdown_policies.hpp │ │ └── leveldb │ │ │ ├── dumpfile.h │ │ │ ├── write_batch.h │ │ │ └── comparator.h │ └── package │ │ └── libhdfs3.tar.gz ├── storage │ ├── libStorage.a │ ├── CMakeLists.txt │ ├── storage_systems.h │ ├── lsm_key_value.h │ ├── image_key_value.h │ ├── in_memory_key_value.h │ ├── sparse_matrix.h │ ├── dense_matrix.h │ └── hdfs_key_value.h ├── gen │ ├── CMakeLists.txt │ ├── Unicap_constants.cpp │ └── Unicap_constants.h ├── common │ ├── CMakeLists.txt │ ├── storage_info.cpp │ ├── column_family.cpp │ ├── node_info.cpp │ ├── column_family.h │ ├── storage_info.h │ ├── table.h │ ├── node_info.h │ └── unicap_client.h ├── job_tracker │ ├── CMakeLists.txt │ ├── scheduler.h │ ├── job_tracker_handler.h │ └── stage.h ├── computing │ ├── CMakeLists.txt │ └── cpu_functions.h ├── task_tracker │ ├── CMakeLists.txt │ ├── cpu_worker.h │ └── cpu_networks.h └── thrift │ └── gen-cpp │ ├── Unicap_constants.cpp │ ├── Unicap_constants.h │ └── JobTracker_server.skeleton.cpp ├── app └── CMakeLists.txt └── CMakeLists.txt /doc/.doc: -------------------------------------------------------------------------------- 1 | doc 2 | -------------------------------------------------------------------------------- /log/.log: -------------------------------------------------------------------------------- 1 | log 2 | -------------------------------------------------------------------------------- /etc/.etc: -------------------------------------------------------------------------------- 1 | etc 2 | 3 | -------------------------------------------------------------------------------- /test/.test: -------------------------------------------------------------------------------- 1 | test 2 | -------------------------------------------------------------------------------- /src/tools/lib/lib.txt: -------------------------------------------------------------------------------- 1 | essential libs used 2 | -------------------------------------------------------------------------------- /src/tools/include/Eigen/Eigen: -------------------------------------------------------------------------------- 1 | #include "Dense" 2 | //#include "Sparse" 3 | -------------------------------------------------------------------------------- /src/storage/libStorage.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cap-ntu/UniCAP/HEAD/src/storage/libStorage.a -------------------------------------------------------------------------------- /src/gen/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | aux_source_directory(. DIR_LIB_SRCS) 2 | add_library (Gen STATIC ${DIR_LIB_SRCS}) 3 | 4 | -------------------------------------------------------------------------------- /src/tools/package/libhdfs3.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cap-ntu/UniCAP/HEAD/src/tools/package/libhdfs3.tar.gz -------------------------------------------------------------------------------- /src/common/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | aux_source_directory(. DIR_LIB_SRCS) 2 | add_library (Common STATIC ${DIR_LIB_SRCS}) 3 | 4 | -------------------------------------------------------------------------------- /src/job_tracker/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | aux_source_directory(. DIR_LIB_SRC) 2 | add_library(JobTracker STATIC ${DIR_LIB_SRC}) 3 | -------------------------------------------------------------------------------- /src/storage/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | aux_source_directory(. DIR_LIB_SRCS) 2 | add_library (Storage STATIC ${DIR_LIB_SRCS}) 3 | 4 | -------------------------------------------------------------------------------- /src/computing/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | aux_source_directory(. DIR_LIB_SRCS) 2 | add_library (Computing STATIC ${DIR_LIB_SRCS}) 3 | 4 | -------------------------------------------------------------------------------- /src/tools/include/Eigen/src/Core/util/NonMPL2.h: -------------------------------------------------------------------------------- 1 | #ifdef EIGEN_MPL2_ONLY 2 | #error Including non-MPL2 code in EIGEN_MPL2_ONLY mode 3 | #endif 4 | -------------------------------------------------------------------------------- /src/tools/include/Eigen/src/Core/arch/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ADD_SUBDIRECTORY(SSE) 2 | ADD_SUBDIRECTORY(AltiVec) 3 | ADD_SUBDIRECTORY(NEON) 4 | ADD_SUBDIRECTORY(Default) 5 | -------------------------------------------------------------------------------- /src/tools/include/opencv/cxmisc.h: -------------------------------------------------------------------------------- 1 | #ifndef __OPENCV_OLD_CXMISC_H__ 2 | #define __OPENCV_OLD_CXMISC_H__ 3 | 4 | #include "opencv2/core/internal.hpp" 5 | 6 | #endif 7 | -------------------------------------------------------------------------------- /src/tools/include/Eigen/Dense: -------------------------------------------------------------------------------- 1 | #include "Core" 2 | #include "LU" 3 | #include "Cholesky" 4 | #include "QR" 5 | #include "SVD" 6 | #include "Geometry" 7 | #include "Eigenvalues" 8 | -------------------------------------------------------------------------------- /src/tools/include/Eigen/src/QR/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_QR_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_QR_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/QR COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /src/tools/include/Eigen/src/SVD/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_SVD_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_SVD_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/SVD COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /src/tools/include/Eigen/src/misc/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_misc_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_misc_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/misc COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /src/tools/include/Eigen/src/Jacobi/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_Jacobi_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_Jacobi_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Jacobi COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /src/tools/include/Eigen/src/Cholesky/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_Cholesky_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_Cholesky_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Cholesky COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /src/tools/include/Eigen/src/LU/arch/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_LU_arch_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_LU_arch_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/LU/arch COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /src/tools/include/Eigen/src/SparseLU/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_SparseLU_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_SparseLU_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/SparseLU COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /src/tools/include/Eigen/src/plugins/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_plugins_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_plugins_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/plugins COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /src/tools/include/Eigen/src/Core/util/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_Core_util_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_Core_util_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Core/util COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /src/tools/include/Eigen/src/SparseQR/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_SparseQR_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_SparseQR_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/SparseQR/ COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /src/tools/include/Eigen/src/LU/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_LU_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_LU_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/LU COMPONENT Devel 6 | ) 7 | 8 | ADD_SUBDIRECTORY(arch) 9 | -------------------------------------------------------------------------------- /src/tools/include/Eigen/src/SparseCore/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_SparseCore_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_SparseCore_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/SparseCore COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /src/tools/include/Eigen/src/StlSupport/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_StlSupport_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_StlSupport_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/StlSupport COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /src/tools/include/Eigen/src/Eigenvalues/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_EIGENVALUES_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_EIGENVALUES_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Eigenvalues COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /src/tools/include/Eigen/src/Householder/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_Householder_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_Householder_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Householder COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /src/tools/include/Eigen/src/SPQRSupport/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_SPQRSupport_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_SPQRSupport_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/SPQRSupport/ COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /src/tools/include/Eigen/src/Core/arch/SSE/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_Core_arch_SSE_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_Core_arch_SSE_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Core/arch/SSE COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /src/tools/include/Eigen/src/Core/products/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_Core_Product_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_Core_Product_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Core/products COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /src/tools/include/Eigen/src/Geometry/arch/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_Geometry_arch_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_Geometry_arch_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Geometry/arch COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /src/tools/include/Eigen/src/MetisSupport/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_MetisSupport_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_MetisSupport_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/MetisSupport COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /src/tools/include/Eigen/src/CholmodSupport/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_CholmodSupport_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_CholmodSupport_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/CholmodSupport COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /src/tools/include/Eigen/src/Core/arch/NEON/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_Core_arch_NEON_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_Core_arch_NEON_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Core/arch/NEON COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /src/tools/include/Eigen/src/PaStiXSupport/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_PastixSupport_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_PastixSupport_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/PaStiXSupport COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /src/tools/include/Eigen/src/PardisoSupport/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_PardisoSupport_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_PardisoSupport_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/PardisoSupport COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /src/tools/include/Eigen/src/SparseCholesky/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_SparseCholesky_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_SparseCholesky_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/SparseCholesky COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /src/tools/include/Eigen/src/SuperLUSupport/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_SuperLUSupport_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_SuperLUSupport_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/SuperLUSupport COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /src/tools/include/Eigen/src/UmfPackSupport/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_UmfPackSupport_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_UmfPackSupport_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/UmfPackSupport COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /src/tools/include/Eigen/src/OrderingMethods/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_OrderingMethods_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_OrderingMethods_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/OrderingMethods COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /src/tools/include/Eigen/src/Core/arch/AltiVec/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_Core_arch_AltiVec_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_Core_arch_AltiVec_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Core/arch/AltiVec COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /src/tools/include/Eigen/src/Core/arch/Default/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_Core_arch_Default_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_Core_arch_Default_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Core/arch/Default COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /src/tools/include/Eigen/src/Geometry/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_Geometry_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_Geometry_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Geometry COMPONENT Devel 6 | ) 7 | 8 | ADD_SUBDIRECTORY(arch) 9 | -------------------------------------------------------------------------------- /src/tools/include/Eigen/src/Eigen2Support/Geometry/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_Eigen2Support_Geometry_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_Eigen2Support_Geometry_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Eigen2Support/Geometry 6 | ) 7 | -------------------------------------------------------------------------------- /src/tools/include/Eigen/src/Eigen2Support/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_Eigen2Support_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_Eigen2Support_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Eigen2Support COMPONENT Devel 6 | ) 7 | 8 | ADD_SUBDIRECTORY(Geometry) -------------------------------------------------------------------------------- /src/tools/include/Eigen/src/IterativeLinearSolvers/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_IterativeLinearSolvers_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_IterativeLinearSolvers_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/IterativeLinearSolvers COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /app/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | aux_source_directory(. DIR_LIB_SRCS) 2 | add_executable(uniCAPMaster job_tracker.cpp) 3 | target_link_libraries(uniCAPMaster JobTracker Computing Common Storage Gen ${libthrift} ${libglog} ${libleveldb} ${libsnappy} ${libhdfs} ${libyaml-cpp} ${OpenCV_LIBS} ${Boost_LIBRARIES}) 4 | -------------------------------------------------------------------------------- /etc/unicap.yaml: -------------------------------------------------------------------------------- 1 | application_name: test 2 | jobtracker_host: BDP-00 3 | jobtracker_port: 34000 4 | hdfs_namenode_host: BDP-00 5 | hdfs_namenode_port: 9000 6 | hdfs_output_dir: /unicap/ 7 | 8 | jobtracker_threads: 50 9 | 10 | tasktracker_worker_threads: 10 11 | tasktracker_network_threads: 50 12 | -------------------------------------------------------------------------------- /src/tools/include/Eigen/src/Core/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_Core_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_Core_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Core COMPONENT Devel 6 | ) 7 | 8 | ADD_SUBDIRECTORY(products) 9 | ADD_SUBDIRECTORY(util) 10 | ADD_SUBDIRECTORY(arch) 11 | -------------------------------------------------------------------------------- /src/task_tracker/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | aux_source_directory(. DIR_LIB_SRCS) 2 | #add_library (TaskTracker ${DIR_LIB_SRCS}) 3 | add_executable(uniCAPSlave ${DIR_LIB_SRCS}) 4 | target_link_libraries(uniCAPSlave Computing Common Storage Gen ${libthrift} ${libglog} ${libleveldb} ${libsnappy} ${libhdfs} ${libyaml-cpp} ${OpenCV_LIBS} ${Boost_LIBRARIES}) 5 | 6 | -------------------------------------------------------------------------------- /src/tools/include/opencv2/flann/dummy.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef OPENCV_FLANN_DUMMY_H_ 3 | #define OPENCV_FLANN_DUMMY_H_ 4 | 5 | namespace cvflann 6 | { 7 | 8 | #if (defined WIN32 || defined _WIN32 || defined WINCE) && defined CVAPI_EXPORTS 9 | __declspec(dllexport) 10 | #endif 11 | void dummyfunc(); 12 | 13 | } 14 | 15 | 16 | #endif /* OPENCV_FLANN_DUMMY_H_ */ 17 | -------------------------------------------------------------------------------- /src/tools/include/Eigen/src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | file(GLOB Eigen_src_subdirectories "*") 2 | escape_string_as_regex(ESCAPED_CMAKE_CURRENT_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}") 3 | foreach(f ${Eigen_src_subdirectories}) 4 | if(NOT f MATCHES "\\.txt" AND NOT f MATCHES "${ESCAPED_CMAKE_CURRENT_SOURCE_DIR}/[.].+" ) 5 | add_subdirectory(${f}) 6 | endif() 7 | endforeach() 8 | -------------------------------------------------------------------------------- /src/tools/include/Eigen/Array: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_ARRAY_MODULE_H 2 | #define EIGEN_ARRAY_MODULE_H 3 | 4 | // include Core first to handle Eigen2 support macros 5 | #include "Core" 6 | 7 | #ifndef EIGEN2_SUPPORT 8 | #error The Eigen/Array header does no longer exist in Eigen3. All that functionality has moved to Eigen/Core. 9 | #endif 10 | 11 | #endif // EIGEN_ARRAY_MODULE_H 12 | -------------------------------------------------------------------------------- /src/gen/Unicap_constants.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Autogenerated by Thrift Compiler (0.9.2) 3 | * 4 | * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING 5 | * @generated 6 | */ 7 | #include "Unicap_constants.h" 8 | 9 | namespace ntu { 10 | namespace cap { 11 | 12 | const UnicapConstants g_Unicap_constants; 13 | 14 | UnicapConstants::UnicapConstants() { 15 | } 16 | 17 | } 18 | } // namespace 19 | 20 | -------------------------------------------------------------------------------- /src/thrift/gen-cpp/Unicap_constants.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Autogenerated by Thrift Compiler (0.9.2) 3 | * 4 | * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING 5 | * @generated 6 | */ 7 | #include "Unicap_constants.h" 8 | 9 | namespace ntu { 10 | namespace cap { 11 | 12 | const UnicapConstants g_Unicap_constants; 13 | 14 | UnicapConstants::UnicapConstants() { 15 | } 16 | 17 | } 18 | } // namespace 19 | 20 | -------------------------------------------------------------------------------- /src/tools/include/Eigen/src/Core/util/ReenableStupidWarnings.h: -------------------------------------------------------------------------------- 1 | #ifdef EIGEN_WARNINGS_DISABLED 2 | #undef EIGEN_WARNINGS_DISABLED 3 | 4 | #ifndef EIGEN_PERMANENTLY_DISABLE_STUPID_WARNINGS 5 | #ifdef _MSC_VER 6 | #pragma warning( pop ) 7 | #elif defined __INTEL_COMPILER 8 | #pragma warning pop 9 | #elif defined __clang__ 10 | #pragma clang diagnostic pop 11 | #endif 12 | #endif 13 | 14 | #endif // EIGEN_WARNINGS_DISABLED 15 | -------------------------------------------------------------------------------- /src/gen/Unicap_constants.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Autogenerated by Thrift Compiler (0.9.2) 3 | * 4 | * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING 5 | * @generated 6 | */ 7 | #ifndef Unicap_CONSTANTS_H 8 | #define Unicap_CONSTANTS_H 9 | 10 | #include "Unicap_types.h" 11 | 12 | namespace ntu { 13 | namespace cap { 14 | 15 | class UnicapConstants { 16 | public: 17 | UnicapConstants(); 18 | 19 | }; 20 | 21 | extern const UnicapConstants g_Unicap_constants; 22 | 23 | } 24 | } // namespace 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /src/thrift/gen-cpp/Unicap_constants.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Autogenerated by Thrift Compiler (0.9.2) 3 | * 4 | * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING 5 | * @generated 6 | */ 7 | #ifndef Unicap_CONSTANTS_H 8 | #define Unicap_CONSTANTS_H 9 | 10 | #include "Unicap_types.h" 11 | 12 | namespace ntu { 13 | namespace cap { 14 | 15 | class UnicapConstants { 16 | public: 17 | UnicapConstants(); 18 | 19 | }; 20 | 21 | extern const UnicapConstants g_Unicap_constants; 22 | 23 | } 24 | } // namespace 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /src/tools/include/yaml-cpp/anchor.h: -------------------------------------------------------------------------------- 1 | #ifndef ANCHOR_H_62B23520_7C8E_11DE_8A39_0800200C9A66 2 | #define ANCHOR_H_62B23520_7C8E_11DE_8A39_0800200C9A66 3 | 4 | #if defined(_MSC_VER) || (defined(__GNUC__) && (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || (__GNUC__ >= 4)) // GCC supports "pragma once" correctly since 3.4 5 | #pragma once 6 | #endif 7 | 8 | #include 9 | 10 | namespace YAML 11 | { 12 | typedef std::size_t anchor_t; 13 | const anchor_t NullAnchor = 0; 14 | } 15 | 16 | #endif // ANCHOR_H_62B23520_7C8E_11DE_8A39_0800200C9A66 17 | -------------------------------------------------------------------------------- /src/tools/include/yaml-cpp/node/type.h: -------------------------------------------------------------------------------- 1 | #ifndef VALUE_TYPE_H_62B23520_7C8E_11DE_8A39_0800200C9A66 2 | #define VALUE_TYPE_H_62B23520_7C8E_11DE_8A39_0800200C9A66 3 | 4 | #if defined(_MSC_VER) || (defined(__GNUC__) && (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || (__GNUC__ >= 4)) // GCC supports "pragma once" correctly since 3.4 5 | #pragma once 6 | #endif 7 | 8 | 9 | namespace YAML 10 | { 11 | struct NodeType { enum value { Undefined, Null, Scalar, Sequence, Map }; }; 12 | } 13 | 14 | #endif // VALUE_TYPE_H_62B23520_7C8E_11DE_8A39_0800200C9A66 15 | -------------------------------------------------------------------------------- /src/tools/include/yaml-cpp/emitterdef.h: -------------------------------------------------------------------------------- 1 | #ifndef EMITTERDEF_H_62B23520_7C8E_11DE_8A39_0800200C9A66 2 | #define EMITTERDEF_H_62B23520_7C8E_11DE_8A39_0800200C9A66 3 | 4 | #if defined(_MSC_VER) || (defined(__GNUC__) && (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || (__GNUC__ >= 4)) // GCC supports "pragma once" correctly since 3.4 5 | #pragma once 6 | #endif 7 | 8 | namespace YAML 9 | { 10 | struct EmitterNodeType { enum value { None, Property, Scalar, FlowSeq, BlockSeq, FlowMap, BlockMap }; }; 11 | } 12 | 13 | #endif // EMITTERDEF_H_62B23520_7C8E_11DE_8A39_0800200C9A66 14 | -------------------------------------------------------------------------------- /src/tools/include/Eigen/Householder: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_HOUSEHOLDER_MODULE_H 2 | #define EIGEN_HOUSEHOLDER_MODULE_H 3 | 4 | #include "Core" 5 | 6 | #include "src/Core/util/DisableStupidWarnings.h" 7 | 8 | /** \defgroup Householder_Module Householder module 9 | * This module provides Householder transformations. 10 | * 11 | * \code 12 | * #include 13 | * \endcode 14 | */ 15 | 16 | #include "src/Householder/Householder.h" 17 | #include "src/Householder/HouseholderSequence.h" 18 | #include "src/Householder/BlockHouseholder.h" 19 | 20 | #include "src/Core/util/ReenableStupidWarnings.h" 21 | 22 | #endif // EIGEN_HOUSEHOLDER_MODULE_H 23 | /* vim: set filetype=cpp et sw=2 ts=2 ai: */ 24 | -------------------------------------------------------------------------------- /src/tools/include/Eigen/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include(RegexUtils) 2 | test_escape_string_as_regex() 3 | 4 | file(GLOB Eigen_directory_files "*") 5 | 6 | escape_string_as_regex(ESCAPED_CMAKE_CURRENT_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}") 7 | 8 | foreach(f ${Eigen_directory_files}) 9 | if(NOT f MATCHES "\\.txt" AND NOT f MATCHES "${ESCAPED_CMAKE_CURRENT_SOURCE_DIR}/[.].+" AND NOT f MATCHES "${ESCAPED_CMAKE_CURRENT_SOURCE_DIR}/src") 10 | list(APPEND Eigen_directory_files_to_install ${f}) 11 | endif() 12 | endforeach(f ${Eigen_directory_files}) 13 | 14 | install(FILES 15 | ${Eigen_directory_files_to_install} 16 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen COMPONENT Devel 17 | ) 18 | 19 | add_subdirectory(src) 20 | -------------------------------------------------------------------------------- /src/tools/include/yaml-cpp/node/emit.h: -------------------------------------------------------------------------------- 1 | #ifndef NODE_EMIT_H_62B23520_7C8E_11DE_8A39_0800200C9A66 2 | #define NODE_EMIT_H_62B23520_7C8E_11DE_8A39_0800200C9A66 3 | 4 | #if defined(_MSC_VER) || (defined(__GNUC__) && (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || (__GNUC__ >= 4)) // GCC supports "pragma once" correctly since 3.4 5 | #pragma once 6 | #endif 7 | 8 | #include 9 | #include 10 | 11 | namespace YAML 12 | { 13 | class Emitter; 14 | class Node; 15 | 16 | Emitter& operator << (Emitter& out, const Node& node); 17 | std::ostream& operator << (std::ostream& out, const Node& node); 18 | 19 | std::string Dump(const Node& node); 20 | } 21 | 22 | #endif // NODE_EMIT_H_62B23520_7C8E_11DE_8A39_0800200C9A66 23 | 24 | -------------------------------------------------------------------------------- /src/tools/include/Eigen/Sparse: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_SPARSE_MODULE_H 2 | #define EIGEN_SPARSE_MODULE_H 3 | 4 | /** \defgroup Sparse_Module Sparse meta-module 5 | * 6 | * Meta-module including all related modules: 7 | * - \ref SparseCore_Module 8 | * - \ref OrderingMethods_Module 9 | * - \ref SparseCholesky_Module 10 | * - \ref SparseLU_Module 11 | * - \ref SparseQR_Module 12 | * - \ref IterativeLinearSolvers_Module 13 | * 14 | * \code 15 | * #include 16 | * \endcode 17 | */ 18 | 19 | #include "SparseCore" 20 | #include "OrderingMethods" 21 | #include "SparseCholesky" 22 | #include "SparseLU" 23 | #include "SparseQR" 24 | #include "IterativeLinearSolvers" 25 | 26 | #endif // EIGEN_SPARSE_MODULE_H 27 | 28 | -------------------------------------------------------------------------------- /src/tools/include/Eigen/src/Eigen2Support/Macros.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2011 Benoit Jacob 5 | // 6 | // This Source Code Form is subject to the terms of the Mozilla 7 | // Public License v. 2.0. If a copy of the MPL was not distributed 8 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 9 | 10 | #ifndef EIGEN2_MACROS_H 11 | #define EIGEN2_MACROS_H 12 | 13 | #define ei_assert eigen_assert 14 | #define ei_internal_assert eigen_internal_assert 15 | 16 | #define EIGEN_ALIGN_128 EIGEN_ALIGN16 17 | 18 | #define EIGEN_ARCH_WANTS_ALIGNMENT EIGEN_ALIGN_STATICALLY 19 | 20 | #endif // EIGEN2_MACROS_H 21 | -------------------------------------------------------------------------------- /src/tools/include/Eigen/Jacobi: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_JACOBI_MODULE_H 2 | #define EIGEN_JACOBI_MODULE_H 3 | 4 | #include "Core" 5 | 6 | #include "src/Core/util/DisableStupidWarnings.h" 7 | 8 | /** \defgroup Jacobi_Module Jacobi module 9 | * This module provides Jacobi and Givens rotations. 10 | * 11 | * \code 12 | * #include 13 | * \endcode 14 | * 15 | * In addition to listed classes, it defines the two following MatrixBase methods to apply a Jacobi or Givens rotation: 16 | * - MatrixBase::applyOnTheLeft() 17 | * - MatrixBase::applyOnTheRight(). 18 | */ 19 | 20 | #include "src/Jacobi/Jacobi.h" 21 | 22 | #include "src/Core/util/ReenableStupidWarnings.h" 23 | 24 | #endif // EIGEN_JACOBI_MODULE_H 25 | /* vim: set filetype=cpp et sw=2 ts=2 ai: */ 26 | 27 | -------------------------------------------------------------------------------- /src/tools/include/yaml-cpp/noncopyable.h: -------------------------------------------------------------------------------- 1 | #ifndef NONCOPYABLE_H_62B23520_7C8E_11DE_8A39_0800200C9A66 2 | #define NONCOPYABLE_H_62B23520_7C8E_11DE_8A39_0800200C9A66 3 | 4 | #if defined(_MSC_VER) || (defined(__GNUC__) && (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || (__GNUC__ >= 4)) // GCC supports "pragma once" correctly since 3.4 5 | #pragma once 6 | #endif 7 | 8 | #include "yaml-cpp/dll.h" 9 | 10 | namespace YAML 11 | { 12 | // this is basically boost::noncopyable 13 | class YAML_CPP_API noncopyable 14 | { 15 | protected: 16 | noncopyable() {} 17 | ~noncopyable() {} 18 | 19 | private: 20 | noncopyable(const noncopyable&); 21 | const noncopyable& operator = (const noncopyable&); 22 | }; 23 | } 24 | 25 | #endif // NONCOPYABLE_H_62B23520_7C8E_11DE_8A39_0800200C9A66 26 | -------------------------------------------------------------------------------- /src/tools/include/yaml-cpp/mark.h: -------------------------------------------------------------------------------- 1 | #ifndef MARK_H_62B23520_7C8E_11DE_8A39_0800200C9A66 2 | #define MARK_H_62B23520_7C8E_11DE_8A39_0800200C9A66 3 | 4 | #if defined(_MSC_VER) || (defined(__GNUC__) && (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || (__GNUC__ >= 4)) // GCC supports "pragma once" correctly since 3.4 5 | #pragma once 6 | #endif 7 | 8 | 9 | #include "yaml-cpp/dll.h" 10 | 11 | namespace YAML 12 | { 13 | struct YAML_CPP_API Mark { 14 | Mark(): pos(0), line(0), column(0) {} 15 | 16 | static const Mark null_mark() { return Mark(-1, -1, -1); } 17 | 18 | int pos; 19 | int line, column; 20 | 21 | private: 22 | Mark(int pos_, int line_, int column_): pos(pos_), line(line_), column(column_) {} 23 | }; 24 | } 25 | 26 | #endif // MARK_H_62B23520_7C8E_11DE_8A39_0800200C9A66 27 | -------------------------------------------------------------------------------- /src/tools/include/yaml-cpp/null.h: -------------------------------------------------------------------------------- 1 | #ifndef NULL_H_62B23520_7C8E_11DE_8A39_0800200C9A66 2 | #define NULL_H_62B23520_7C8E_11DE_8A39_0800200C9A66 3 | 4 | #if defined(_MSC_VER) || (defined(__GNUC__) && (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || (__GNUC__ >= 4)) // GCC supports "pragma once" correctly since 3.4 5 | #pragma once 6 | #endif 7 | 8 | 9 | #include "yaml-cpp/dll.h" 10 | 11 | namespace YAML 12 | { 13 | class Node; 14 | 15 | struct YAML_CPP_API _Null {}; 16 | inline bool operator == (const _Null&, const _Null&) { return true; } 17 | inline bool operator != (const _Null&, const _Null&) { return false; } 18 | 19 | YAML_CPP_API bool IsNull(const Node& node); // old API only 20 | 21 | extern YAML_CPP_API _Null Null; 22 | } 23 | 24 | #endif // NULL_H_62B23520_7C8E_11DE_8A39_0800200C9A66 25 | 26 | -------------------------------------------------------------------------------- /src/tools/include/boost/threadpool.hpp: -------------------------------------------------------------------------------- 1 | /*! \file 2 | * \brief Main include. 3 | * 4 | * This is the only file you have to include in order to use the 5 | * complete threadpool library. 6 | * 7 | * Copyright (c) 2005-2007 Philipp Henkel 8 | * 9 | * Use, modification, and distribution are subject to the 10 | * Boost Software License, Version 1.0. (See accompanying file 11 | * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 12 | * 13 | * http://threadpool.sourceforge.net 14 | * 15 | */ 16 | 17 | #ifndef THREADPOOL_HPP_INCLUDED 18 | #define THREADPOOL_HPP_INCLUDED 19 | 20 | #include "./threadpool/future.hpp" 21 | #include "./threadpool/pool.hpp" 22 | 23 | #include "./threadpool/pool_adaptors.hpp" 24 | #include "./threadpool/task_adaptors.hpp" 25 | 26 | 27 | #endif // THREADPOOL_HPP_INCLUDED 28 | 29 | -------------------------------------------------------------------------------- /src/tools/include/yaml-cpp/yaml.h: -------------------------------------------------------------------------------- 1 | #ifndef YAML_H_62B23520_7C8E_11DE_8A39_0800200C9A66 2 | #define YAML_H_62B23520_7C8E_11DE_8A39_0800200C9A66 3 | 4 | #if defined(_MSC_VER) || (defined(__GNUC__) && (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || (__GNUC__ >= 4)) // GCC supports "pragma once" correctly since 3.4 5 | #pragma once 6 | #endif 7 | 8 | #include "yaml-cpp/parser.h" 9 | #include "yaml-cpp/emitter.h" 10 | #include "yaml-cpp/stlemitter.h" 11 | #include "yaml-cpp/exceptions.h" 12 | 13 | #include "yaml-cpp/node/node.h" 14 | #include "yaml-cpp/node/impl.h" 15 | #include "yaml-cpp/node/convert.h" 16 | #include "yaml-cpp/node/iterator.h" 17 | #include "yaml-cpp/node/detail/impl.h" 18 | #include "yaml-cpp/node/parse.h" 19 | #include "yaml-cpp/node/emit.h" 20 | 21 | #endif // YAML_H_62B23520_7C8E_11DE_8A39_0800200C9A66 22 | -------------------------------------------------------------------------------- /src/tools/include/Eigen/QtAlignedMalloc: -------------------------------------------------------------------------------- 1 | 2 | #ifndef EIGEN_QTMALLOC_MODULE_H 3 | #define EIGEN_QTMALLOC_MODULE_H 4 | 5 | #include "Core" 6 | 7 | #if (!EIGEN_MALLOC_ALREADY_ALIGNED) 8 | 9 | #include "src/Core/util/DisableStupidWarnings.h" 10 | 11 | void *qMalloc(size_t size) 12 | { 13 | return Eigen::internal::aligned_malloc(size); 14 | } 15 | 16 | void qFree(void *ptr) 17 | { 18 | Eigen::internal::aligned_free(ptr); 19 | } 20 | 21 | void *qRealloc(void *ptr, size_t size) 22 | { 23 | void* newPtr = Eigen::internal::aligned_malloc(size); 24 | memcpy(newPtr, ptr, size); 25 | Eigen::internal::aligned_free(ptr); 26 | return newPtr; 27 | } 28 | 29 | #include "src/Core/util/ReenableStupidWarnings.h" 30 | 31 | #endif 32 | 33 | #endif // EIGEN_QTMALLOC_MODULE_H 34 | /* vim: set filetype=cpp et sw=2 ts=2 ai: */ 35 | -------------------------------------------------------------------------------- /src/tools/include/Eigen/StdList: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2009 Hauke Heibel 5 | // 6 | // This Source Code Form is subject to the terms of the Mozilla 7 | // Public License v. 2.0. If a copy of the MPL was not distributed 8 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 9 | 10 | #ifndef EIGEN_STDLIST_MODULE_H 11 | #define EIGEN_STDLIST_MODULE_H 12 | 13 | #include "Core" 14 | #include 15 | 16 | #if (defined(_MSC_VER) && defined(_WIN64)) /* MSVC auto aligns in 64 bit builds */ 17 | 18 | #define EIGEN_DEFINE_STL_LIST_SPECIALIZATION(...) 19 | 20 | #else 21 | 22 | #include "src/StlSupport/StdList.h" 23 | 24 | #endif 25 | 26 | #endif // EIGEN_STDLIST_MODULE_H 27 | -------------------------------------------------------------------------------- /src/tools/include/opencv2/opencv_modules.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * ** File generated automatically, do not modify ** 3 | * 4 | * This file defines the list of modules available in current build configuration 5 | * 6 | * 7 | */ 8 | 9 | #define HAVE_OPENCV_CALIB3D 10 | #define HAVE_OPENCV_CONTRIB 11 | #define HAVE_OPENCV_CORE 12 | #define HAVE_OPENCV_FEATURES2D 13 | #define HAVE_OPENCV_FLANN 14 | #define HAVE_OPENCV_GPU 15 | #define HAVE_OPENCV_HIGHGUI 16 | #define HAVE_OPENCV_IMGPROC 17 | #define HAVE_OPENCV_LEGACY 18 | #define HAVE_OPENCV_ML 19 | #define HAVE_OPENCV_NONFREE 20 | #define HAVE_OPENCV_OBJDETECT 21 | #define HAVE_OPENCV_OCL 22 | #define HAVE_OPENCV_PHOTO 23 | #define HAVE_OPENCV_STITCHING 24 | #define HAVE_OPENCV_SUPERRES 25 | #define HAVE_OPENCV_TS 26 | #define HAVE_OPENCV_VIDEO 27 | #define HAVE_OPENCV_VIDEOSTAB 28 | 29 | 30 | -------------------------------------------------------------------------------- /src/tools/include/Eigen/MetisSupport: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_METISSUPPORT_MODULE_H 2 | #define EIGEN_METISSUPPORT_MODULE_H 3 | 4 | #include "SparseCore" 5 | 6 | #include "src/Core/util/DisableStupidWarnings.h" 7 | 8 | extern "C" { 9 | #include 10 | } 11 | 12 | 13 | /** \ingroup Support_modules 14 | * \defgroup MetisSupport_Module MetisSupport module 15 | * 16 | * \code 17 | * #include 18 | * \endcode 19 | * This module defines an interface to the METIS reordering package (http://glaros.dtc.umn.edu/gkhome/views/metis). 20 | * It can be used just as any other built-in method as explained in \link OrderingMethods_Module here. \endlink 21 | */ 22 | 23 | 24 | #include "src/MetisSupport/MetisSupport.h" 25 | 26 | #include "src/Core/util/ReenableStupidWarnings.h" 27 | 28 | #endif // EIGEN_METISSUPPORT_MODULE_H 29 | -------------------------------------------------------------------------------- /src/tools/include/Eigen/LeastSquares: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_REGRESSION_MODULE_H 2 | #define EIGEN_REGRESSION_MODULE_H 3 | 4 | #ifndef EIGEN2_SUPPORT 5 | #error LeastSquares is only available in Eigen2 support mode (define EIGEN2_SUPPORT) 6 | #endif 7 | 8 | // exclude from normal eigen3-only documentation 9 | #ifdef EIGEN2_SUPPORT 10 | 11 | #include "Core" 12 | 13 | #include "src/Core/util/DisableStupidWarnings.h" 14 | 15 | #include "Eigenvalues" 16 | #include "Geometry" 17 | 18 | /** \defgroup LeastSquares_Module LeastSquares module 19 | * This module provides linear regression and related features. 20 | * 21 | * \code 22 | * #include 23 | * \endcode 24 | */ 25 | 26 | #include "src/Eigen2Support/LeastSquares.h" 27 | 28 | #include "src/Core/util/ReenableStupidWarnings.h" 29 | 30 | #endif // EIGEN2_SUPPORT 31 | 32 | #endif // EIGEN_REGRESSION_MODULE_H 33 | -------------------------------------------------------------------------------- /src/tools/include/Eigen/StdDeque: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2009 Gael Guennebaud 5 | // Copyright (C) 2009 Hauke Heibel 6 | // 7 | // This Source Code Form is subject to the terms of the Mozilla 8 | // Public License v. 2.0. If a copy of the MPL was not distributed 9 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 10 | 11 | #ifndef EIGEN_STDDEQUE_MODULE_H 12 | #define EIGEN_STDDEQUE_MODULE_H 13 | 14 | #include "Core" 15 | #include 16 | 17 | #if (defined(_MSC_VER) && defined(_WIN64)) /* MSVC auto aligns in 64 bit builds */ 18 | 19 | #define EIGEN_DEFINE_STL_DEQUE_SPECIALIZATION(...) 20 | 21 | #else 22 | 23 | #include "src/StlSupport/StdDeque.h" 24 | 25 | #endif 26 | 27 | #endif // EIGEN_STDDEQUE_MODULE_H 28 | -------------------------------------------------------------------------------- /src/tools/include/Eigen/StdVector: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2009 Gael Guennebaud 5 | // Copyright (C) 2009 Hauke Heibel 6 | // 7 | // This Source Code Form is subject to the terms of the Mozilla 8 | // Public License v. 2.0. If a copy of the MPL was not distributed 9 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 10 | 11 | #ifndef EIGEN_STDVECTOR_MODULE_H 12 | #define EIGEN_STDVECTOR_MODULE_H 13 | 14 | #include "Core" 15 | #include 16 | 17 | #if (defined(_MSC_VER) && defined(_WIN64)) /* MSVC auto aligns in 64 bit builds */ 18 | 19 | #define EIGEN_DEFINE_STL_VECTOR_SPECIALIZATION(...) 20 | 21 | #else 22 | 23 | #include "src/StlSupport/StdVector.h" 24 | 25 | #endif 26 | 27 | #endif // EIGEN_STDVECTOR_MODULE_H 28 | -------------------------------------------------------------------------------- /src/tools/include/yaml-cpp/node/detail/iterator_fwd.h: -------------------------------------------------------------------------------- 1 | #ifndef VALUE_DETAIL_ITERATOR_FWD_H_62B23520_7C8E_11DE_8A39_0800200C9A66 2 | #define VALUE_DETAIL_ITERATOR_FWD_H_62B23520_7C8E_11DE_8A39_0800200C9A66 3 | 4 | #if defined(_MSC_VER) || (defined(__GNUC__) && (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || (__GNUC__ >= 4)) // GCC supports "pragma once" correctly since 3.4 5 | #pragma once 6 | #endif 7 | 8 | 9 | #include "yaml-cpp/dll.h" 10 | #include 11 | #include 12 | #include 13 | 14 | namespace YAML 15 | { 16 | class node; 17 | 18 | namespace detail { 19 | struct iterator_value; 20 | template class iterator_base; 21 | } 22 | 23 | typedef detail::iterator_base iterator; 24 | typedef detail::iterator_base const_iterator; 25 | } 26 | 27 | #endif // VALUE_DETAIL_ITERATOR_FWD_H_62B23520_7C8E_11DE_8A39_0800200C9A66 28 | -------------------------------------------------------------------------------- /src/tools/include/yaml-cpp/node/detail/bool_type.h: -------------------------------------------------------------------------------- 1 | #ifndef NODE_DETAIL_BOOL_TYPE_H_62B23520_7C8E_11DE_8A39_0800200C9A66 2 | #define NODE_DETAIL_BOOL_TYPE_H_62B23520_7C8E_11DE_8A39_0800200C9A66 3 | 4 | #if defined(_MSC_VER) || (defined(__GNUC__) && (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || (__GNUC__ >= 4)) // GCC supports "pragma once" correctly since 3.4 5 | #pragma once 6 | #endif 7 | 8 | namespace YAML 9 | { 10 | namespace detail 11 | { 12 | struct unspecified_bool { 13 | struct NOT_ALLOWED; 14 | static void true_value(NOT_ALLOWED*) {} 15 | }; 16 | typedef void (*unspecified_bool_type)(unspecified_bool::NOT_ALLOWED*); 17 | } 18 | } 19 | 20 | #define YAML_CPP_OPERATOR_BOOL()\ 21 | operator YAML::detail::unspecified_bool_type() const\ 22 | {\ 23 | return this->operator!() ? 0 : &YAML::detail::unspecified_bool::true_value;\ 24 | } 25 | 26 | #endif // NODE_DETAIL_BOOL_TYPE_H_62B23520_7C8E_11DE_8A39_0800200C9A66 27 | -------------------------------------------------------------------------------- /src/tools/include/Eigen/Cholesky: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_CHOLESKY_MODULE_H 2 | #define EIGEN_CHOLESKY_MODULE_H 3 | 4 | #include "Core" 5 | 6 | #include "src/Core/util/DisableStupidWarnings.h" 7 | 8 | /** \defgroup Cholesky_Module Cholesky module 9 | * 10 | * 11 | * 12 | * This module provides two variants of the Cholesky decomposition for selfadjoint (hermitian) matrices. 13 | * Those decompositions are accessible via the following MatrixBase methods: 14 | * - MatrixBase::llt(), 15 | * - MatrixBase::ldlt() 16 | * 17 | * \code 18 | * #include 19 | * \endcode 20 | */ 21 | 22 | #include "src/misc/Solve.h" 23 | #include "src/Cholesky/LLT.h" 24 | #include "src/Cholesky/LDLT.h" 25 | #ifdef EIGEN_USE_LAPACKE 26 | #include "src/Cholesky/LLT_MKL.h" 27 | #endif 28 | 29 | #include "src/Core/util/ReenableStupidWarnings.h" 30 | 31 | #endif // EIGEN_CHOLESKY_MODULE_H 32 | /* vim: set filetype=cpp et sw=2 ts=2 ai: */ 33 | -------------------------------------------------------------------------------- /src/common/storage_info.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | *Copyright 2015 NTU (http://www.ntu.edu.sg/) 3 | *Licensed under the Apache License, Version 2.0 (the "License"); 4 | *you may not use this file except in compliance with the License. 5 | *You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | *Unless required by applicable law or agreed to in writing, software 10 | *distributed under the License is distributed on an "AS IS" BASIS, 11 | *WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | *See the License for the specific language governing permissions and 13 | *limitations under the License. 14 | */ 15 | #include "storage_info.h" 16 | namespace ntu { 17 | namespace cap { 18 | 19 | StorageInfo::StorageInfo() { 20 | } 21 | 22 | StorageInfo& StorageInfo::singleton() { 23 | static StorageInfo storage_info; 24 | return storage_info; 25 | } 26 | 27 | } 28 | } 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /src/tools/include/yaml-cpp/node/parse.h: -------------------------------------------------------------------------------- 1 | #ifndef VALUE_PARSE_H_62B23520_7C8E_11DE_8A39_0800200C9A66 2 | #define VALUE_PARSE_H_62B23520_7C8E_11DE_8A39_0800200C9A66 3 | 4 | #if defined(_MSC_VER) || (defined(__GNUC__) && (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || (__GNUC__ >= 4)) // GCC supports "pragma once" correctly since 3.4 5 | #pragma once 6 | #endif 7 | 8 | #include 9 | #include 10 | #include 11 | 12 | namespace YAML 13 | { 14 | class Node; 15 | 16 | Node Load(const std::string& input); 17 | Node Load(const char *input); 18 | Node Load(std::istream& input); 19 | Node LoadFile(const std::string& filename); 20 | 21 | std::vector LoadAll(const std::string& input); 22 | std::vector LoadAll(const char *input); 23 | std::vector LoadAll(std::istream& input); 24 | std::vector LoadAllFromFile(const std::string& filename); 25 | } 26 | 27 | #endif // VALUE_PARSE_H_62B23520_7C8E_11DE_8A39_0800200C9A66 28 | 29 | -------------------------------------------------------------------------------- /src/tools/include/yaml-cpp/node/ptr.h: -------------------------------------------------------------------------------- 1 | #ifndef VALUE_PTR_H_62B23520_7C8E_11DE_8A39_0800200C9A66 2 | #define VALUE_PTR_H_62B23520_7C8E_11DE_8A39_0800200C9A66 3 | 4 | #if defined(_MSC_VER) || (defined(__GNUC__) && (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || (__GNUC__ >= 4)) // GCC supports "pragma once" correctly since 3.4 5 | #pragma once 6 | #endif 7 | 8 | 9 | #include "yaml-cpp/dll.h" 10 | #include 11 | 12 | namespace YAML 13 | { 14 | namespace detail { 15 | class node; 16 | class node_ref; 17 | class node_data; 18 | class memory; 19 | class memory_holder; 20 | 21 | typedef boost::shared_ptr shared_node; 22 | typedef boost::shared_ptr shared_node_ref; 23 | typedef boost::shared_ptr shared_node_data; 24 | typedef boost::shared_ptr shared_memory_holder; 25 | typedef boost::shared_ptr shared_memory; 26 | } 27 | } 28 | 29 | #endif // VALUE_PTR_H_62B23520_7C8E_11DE_8A39_0800200C9A66 30 | -------------------------------------------------------------------------------- /src/tools/include/leveldb/dumpfile.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The LevelDB Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. See the AUTHORS file for names of contributors. 4 | 5 | #ifndef STORAGE_LEVELDB_INCLUDE_DUMPFILE_H_ 6 | #define STORAGE_LEVELDB_INCLUDE_DUMPFILE_H_ 7 | 8 | #include 9 | #include "leveldb/env.h" 10 | #include "leveldb/status.h" 11 | 12 | namespace leveldb { 13 | 14 | // Dump the contents of the file named by fname in text format to 15 | // *dst. Makes a sequence of dst->Append() calls; each call is passed 16 | // the newline-terminated text corresponding to a single item found 17 | // in the file. 18 | // 19 | // Returns a non-OK result if fname does not name a leveldb storage 20 | // file, or if the file cannot be read. 21 | Status DumpFile(Env* env, const std::string& fname, WritableFile* dst); 22 | 23 | } // namespace leveldb 24 | 25 | #endif // STORAGE_LEVELDB_INCLUDE_DUMPFILE_H_ 26 | -------------------------------------------------------------------------------- /src/tools/include/Eigen/PardisoSupport: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_PARDISOSUPPORT_MODULE_H 2 | #define EIGEN_PARDISOSUPPORT_MODULE_H 3 | 4 | #include "SparseCore" 5 | 6 | #include "src/Core/util/DisableStupidWarnings.h" 7 | 8 | #include 9 | 10 | #include 11 | 12 | /** \ingroup Support_modules 13 | * \defgroup PardisoSupport_Module PardisoSupport module 14 | * 15 | * This module brings support for the Intel(R) MKL PARDISO direct sparse solvers. 16 | * 17 | * \code 18 | * #include 19 | * \endcode 20 | * 21 | * In order to use this module, the MKL headers must be accessible from the include paths, and your binary must be linked to the MKL library and its dependencies. 22 | * See this \ref TopicUsingIntelMKL "page" for more information on MKL-Eigen integration. 23 | * 24 | */ 25 | 26 | #include "src/PardisoSupport/PardisoSupport.h" 27 | 28 | #include "src/Core/util/ReenableStupidWarnings.h" 29 | 30 | #endif // EIGEN_PARDISOSUPPORT_MODULE_H 31 | -------------------------------------------------------------------------------- /src/tools/include/Eigen/SVD: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_SVD_MODULE_H 2 | #define EIGEN_SVD_MODULE_H 3 | 4 | #include "QR" 5 | #include "Householder" 6 | #include "Jacobi" 7 | 8 | #include "src/Core/util/DisableStupidWarnings.h" 9 | 10 | /** \defgroup SVD_Module SVD module 11 | * 12 | * 13 | * 14 | * This module provides SVD decomposition for matrices (both real and complex). 15 | * This decomposition is accessible via the following MatrixBase method: 16 | * - MatrixBase::jacobiSvd() 17 | * 18 | * \code 19 | * #include 20 | * \endcode 21 | */ 22 | 23 | #include "src/misc/Solve.h" 24 | #include "src/SVD/JacobiSVD.h" 25 | #if defined(EIGEN_USE_LAPACKE) && !defined(EIGEN_USE_LAPACKE_STRICT) 26 | #include "src/SVD/JacobiSVD_MKL.h" 27 | #endif 28 | #include "src/SVD/UpperBidiagonalization.h" 29 | 30 | #ifdef EIGEN2_SUPPORT 31 | #include "src/Eigen2Support/SVD.h" 32 | #endif 33 | 34 | #include "src/Core/util/ReenableStupidWarnings.h" 35 | 36 | #endif // EIGEN_SVD_MODULE_H 37 | /* vim: set filetype=cpp et sw=2 ts=2 ai: */ 38 | -------------------------------------------------------------------------------- /src/storage/storage_systems.h: -------------------------------------------------------------------------------- 1 | /* 2 | *Copyright 2015 NTU (http://www.ntu.edu.sg/) 3 | *Licensed under the Apache License, Version 2.0 (the "License"); 4 | *you may not use this file except in compliance with the License. 5 | *You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | *Unless required by applicable law or agreed to in writing, software 10 | *distributed under the License is distributed on an "AS IS" BASIS, 11 | *WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | *See the License for the specific language governing permissions and 13 | *limitations under the License. 14 | */ 15 | 16 | #ifndef NTU_CAP_UNICAP_STORAGE_STORAGE_SYSTEMS_H_ 17 | #define NTU_CAP_UNICAP_STORAGE_STORAGE_SYSTEMS_H_ 18 | 19 | #include "./kv_base.h" 20 | #include "./in_memory_key_value.h" 21 | #include "./lsm_key_value.h" 22 | #include "./hdfs_key_value.h" 23 | #include "./image_key_value.h" 24 | #include "./dense_matrix.h" 25 | #include "./sparse_matrix.h" 26 | 27 | #endif /* UNICAP_STORAGE_STORAGE_SYSTEMS_H_ */ 28 | -------------------------------------------------------------------------------- /src/tools/include/Eigen/SPQRSupport: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_SPQRSUPPORT_MODULE_H 2 | #define EIGEN_SPQRSUPPORT_MODULE_H 3 | 4 | #include "SparseCore" 5 | 6 | #include "src/Core/util/DisableStupidWarnings.h" 7 | 8 | #include "SuiteSparseQR.hpp" 9 | 10 | /** \ingroup Support_modules 11 | * \defgroup SPQRSupport_Module SuiteSparseQR module 12 | * 13 | * This module provides an interface to the SPQR library, which is part of the suitesparse package. 14 | * 15 | * \code 16 | * #include 17 | * \endcode 18 | * 19 | * In order to use this module, the SPQR headers must be accessible from the include paths, and your binary must be linked to the SPQR library and its dependencies (Cholmod, AMD, COLAMD,...). 20 | * For a cmake based project, you can use our FindSPQR.cmake and FindCholmod.Cmake modules 21 | * 22 | */ 23 | 24 | #include "src/misc/Solve.h" 25 | #include "src/misc/SparseSolve.h" 26 | #include "src/CholmodSupport/CholmodSupport.h" 27 | #include "src/SPQRSupport/SuiteSparseQRSupport.h" 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /src/tools/include/yaml-cpp/node/iterator.h: -------------------------------------------------------------------------------- 1 | #ifndef VALUE_ITERATOR_H_62B23520_7C8E_11DE_8A39_0800200C9A66 2 | #define VALUE_ITERATOR_H_62B23520_7C8E_11DE_8A39_0800200C9A66 3 | 4 | #if defined(_MSC_VER) || (defined(__GNUC__) && (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || (__GNUC__ >= 4)) // GCC supports "pragma once" correctly since 3.4 5 | #pragma once 6 | #endif 7 | 8 | 9 | #include "yaml-cpp/dll.h" 10 | #include "yaml-cpp/node/node.h" 11 | #include "yaml-cpp/node/detail/iterator_fwd.h" 12 | #include "yaml-cpp/node/detail/iterator.h" 13 | #include 14 | #include 15 | #include 16 | 17 | namespace YAML 18 | { 19 | namespace detail { 20 | struct iterator_value: public Node, std::pair { 21 | iterator_value() {} 22 | explicit iterator_value(const Node& rhs): Node(rhs), std::pair(Node(Node::ZombieNode), Node(Node::ZombieNode)) {} 23 | explicit iterator_value(const Node& key, const Node& value): Node(Node::ZombieNode), std::pair(key, value) {} 24 | }; 25 | } 26 | } 27 | 28 | #endif // VALUE_ITERATOR_H_62B23520_7C8E_11DE_8A39_0800200C9A66 29 | -------------------------------------------------------------------------------- /src/tools/include/yaml-cpp/node/detail/memory.h: -------------------------------------------------------------------------------- 1 | #ifndef VALUE_DETAIL_MEMORY_H_62B23520_7C8E_11DE_8A39_0800200C9A66 2 | #define VALUE_DETAIL_MEMORY_H_62B23520_7C8E_11DE_8A39_0800200C9A66 3 | 4 | #if defined(_MSC_VER) || (defined(__GNUC__) && (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || (__GNUC__ >= 4)) // GCC supports "pragma once" correctly since 3.4 5 | #pragma once 6 | #endif 7 | 8 | #include "yaml-cpp/node/ptr.h" 9 | #include 10 | #include 11 | 12 | namespace YAML 13 | { 14 | namespace detail 15 | { 16 | class memory { 17 | public: 18 | node& create_node(); 19 | void merge(const memory& rhs); 20 | 21 | private: 22 | typedef std::set Nodes; 23 | Nodes m_nodes; 24 | }; 25 | 26 | class memory_holder { 27 | public: 28 | memory_holder(): m_pMemory(new memory) {} 29 | 30 | node& create_node() { return m_pMemory->create_node(); } 31 | void merge(memory_holder& rhs); 32 | 33 | private: 34 | boost::shared_ptr m_pMemory; 35 | }; 36 | } 37 | } 38 | 39 | #endif // VALUE_DETAIL_MEMORY_H_62B23520_7C8E_11DE_8A39_0800200C9A66 40 | -------------------------------------------------------------------------------- /src/tools/include/Eigen/src/SparseCore/SparseFuzzy.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2008 Gael Guennebaud 5 | // 6 | // This Source Code Form is subject to the terms of the Mozilla 7 | // Public License v. 2.0. If a copy of the MPL was not distributed 8 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 9 | 10 | #ifndef EIGEN_SPARSE_FUZZY_H 11 | #define EIGEN_SPARSE_FUZZY_H 12 | 13 | // template 14 | // template 15 | // bool SparseMatrixBase::isApprox( 16 | // const OtherDerived& other, 17 | // typename NumTraits::Real prec 18 | // ) const 19 | // { 20 | // const typename internal::nested::type nested(derived()); 21 | // const typename internal::nested::type otherNested(other.derived()); 22 | // return (nested - otherNested).cwise().abs2().sum() 23 | // <= prec * prec * (std::min)(nested.cwise().abs2().sum(), otherNested.cwise().abs2().sum()); 24 | // } 25 | 26 | #endif // EIGEN_SPARSE_FUZZY_H 27 | -------------------------------------------------------------------------------- /src/tools/include/Eigen/QR: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_QR_MODULE_H 2 | #define EIGEN_QR_MODULE_H 3 | 4 | #include "Core" 5 | 6 | #include "src/Core/util/DisableStupidWarnings.h" 7 | 8 | #include "Cholesky" 9 | #include "Jacobi" 10 | #include "Householder" 11 | 12 | /** \defgroup QR_Module QR module 13 | * 14 | * 15 | * 16 | * This module provides various QR decompositions 17 | * This module also provides some MatrixBase methods, including: 18 | * - MatrixBase::qr(), 19 | * 20 | * \code 21 | * #include 22 | * \endcode 23 | */ 24 | 25 | #include "src/misc/Solve.h" 26 | #include "src/QR/HouseholderQR.h" 27 | #include "src/QR/FullPivHouseholderQR.h" 28 | #include "src/QR/ColPivHouseholderQR.h" 29 | #ifdef EIGEN_USE_LAPACKE 30 | #include "src/QR/HouseholderQR_MKL.h" 31 | #include "src/QR/ColPivHouseholderQR_MKL.h" 32 | #endif 33 | 34 | #ifdef EIGEN2_SUPPORT 35 | #include "src/Eigen2Support/QR.h" 36 | #endif 37 | 38 | #include "src/Core/util/ReenableStupidWarnings.h" 39 | 40 | #ifdef EIGEN2_SUPPORT 41 | #include "Eigenvalues" 42 | #endif 43 | 44 | #endif // EIGEN_QR_MODULE_H 45 | /* vim: set filetype=cpp et sw=2 ts=2 ai: */ 46 | -------------------------------------------------------------------------------- /src/tools/include/Eigen/SparseQR: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_SPARSEQR_MODULE_H 2 | #define EIGEN_SPARSEQR_MODULE_H 3 | 4 | #include "SparseCore" 5 | #include "OrderingMethods" 6 | #include "src/Core/util/DisableStupidWarnings.h" 7 | 8 | /** \defgroup SparseQR_Module SparseQR module 9 | * \brief Provides QR decomposition for sparse matrices 10 | * 11 | * This module provides a simplicial version of the left-looking Sparse QR decomposition. 12 | * The columns of the input matrix should be reordered to limit the fill-in during the 13 | * decomposition. Built-in methods (COLAMD, AMD) or external methods (METIS) can be used to this end. 14 | * See the \link OrderingMethods_Module OrderingMethods\endlink module for the list 15 | * of built-in and external ordering methods. 16 | * 17 | * \code 18 | * #include 19 | * \endcode 20 | * 21 | * 22 | */ 23 | 24 | #include "src/misc/Solve.h" 25 | #include "src/misc/SparseSolve.h" 26 | 27 | #include "OrderingMethods" 28 | #include "src/SparseCore/SparseColEtree.h" 29 | #include "src/SparseQR/SparseQR.h" 30 | 31 | #include "src/Core/util/ReenableStupidWarnings.h" 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /src/tools/include/Eigen/LU: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_LU_MODULE_H 2 | #define EIGEN_LU_MODULE_H 3 | 4 | #include "Core" 5 | 6 | #include "src/Core/util/DisableStupidWarnings.h" 7 | 8 | /** \defgroup LU_Module LU module 9 | * This module includes %LU decomposition and related notions such as matrix inversion and determinant. 10 | * This module defines the following MatrixBase methods: 11 | * - MatrixBase::inverse() 12 | * - MatrixBase::determinant() 13 | * 14 | * \code 15 | * #include 16 | * \endcode 17 | */ 18 | 19 | #include "src/misc/Solve.h" 20 | #include "src/misc/Kernel.h" 21 | #include "src/misc/Image.h" 22 | #include "src/LU/FullPivLU.h" 23 | #include "src/LU/PartialPivLU.h" 24 | #ifdef EIGEN_USE_LAPACKE 25 | #include "src/LU/PartialPivLU_MKL.h" 26 | #endif 27 | #include "src/LU/Determinant.h" 28 | #include "src/LU/Inverse.h" 29 | 30 | #if defined EIGEN_VECTORIZE_SSE 31 | #include "src/LU/arch/Inverse_SSE.h" 32 | #endif 33 | 34 | #ifdef EIGEN2_SUPPORT 35 | #include "src/Eigen2Support/LU.h" 36 | #endif 37 | 38 | #include "src/Core/util/ReenableStupidWarnings.h" 39 | 40 | #endif // EIGEN_LU_MODULE_H 41 | /* vim: set filetype=cpp et sw=2 ts=2 ai: */ 42 | -------------------------------------------------------------------------------- /src/tools/include/yaml-cpp/contrib/anchordict.h: -------------------------------------------------------------------------------- 1 | #ifndef ANCHORDICT_H_62B23520_7C8E_11DE_8A39_0800200C9A66 2 | #define ANCHORDICT_H_62B23520_7C8E_11DE_8A39_0800200C9A66 3 | 4 | #if defined(_MSC_VER) || (defined(__GNUC__) && (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || (__GNUC__ >= 4)) // GCC supports "pragma once" correctly since 3.4 5 | #pragma once 6 | #endif 7 | 8 | #include 9 | 10 | #include "../anchor.h" 11 | 12 | namespace YAML 13 | { 14 | /// AnchorDict 15 | /// . An object that stores and retrieves values correlating to anchor_t 16 | /// values. 17 | /// . Efficient implementation that can make assumptions about how anchor_t 18 | /// values are assigned by the Parser class. 19 | template 20 | class AnchorDict 21 | { 22 | public: 23 | void Register(anchor_t anchor, T value) 24 | { 25 | if (anchor > m_data.size()) 26 | { 27 | m_data.resize(anchor); 28 | } 29 | m_data[anchor - 1] = value; 30 | } 31 | 32 | T Get(anchor_t anchor) const 33 | { 34 | return m_data[anchor - 1]; 35 | } 36 | 37 | private: 38 | std::vector m_data; 39 | }; 40 | } 41 | 42 | #endif // ANCHORDICT_H_62B23520_7C8E_11DE_8A39_0800200C9A66 43 | -------------------------------------------------------------------------------- /src/tools/include/yaml-cpp/eventhandler.h: -------------------------------------------------------------------------------- 1 | #ifndef EVENTHANDLER_H_62B23520_7C8E_11DE_8A39_0800200C9A66 2 | #define EVENTHANDLER_H_62B23520_7C8E_11DE_8A39_0800200C9A66 3 | 4 | #if defined(_MSC_VER) || (defined(__GNUC__) && (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || (__GNUC__ >= 4)) // GCC supports "pragma once" correctly since 3.4 5 | #pragma once 6 | #endif 7 | 8 | #include "yaml-cpp/anchor.h" 9 | #include 10 | 11 | namespace YAML 12 | { 13 | struct Mark; 14 | 15 | class EventHandler 16 | { 17 | public: 18 | virtual ~EventHandler() {} 19 | 20 | virtual void OnDocumentStart(const Mark& mark) = 0; 21 | virtual void OnDocumentEnd() = 0; 22 | 23 | virtual void OnNull(const Mark& mark, anchor_t anchor) = 0; 24 | virtual void OnAlias(const Mark& mark, anchor_t anchor) = 0; 25 | virtual void OnScalar(const Mark& mark, const std::string& tag, anchor_t anchor, const std::string& value) = 0; 26 | 27 | virtual void OnSequenceStart(const Mark& mark, const std::string& tag, anchor_t anchor) = 0; 28 | virtual void OnSequenceEnd() = 0; 29 | 30 | virtual void OnMapStart(const Mark& mark, const std::string& tag, anchor_t anchor) = 0; 31 | virtual void OnMapEnd() = 0; 32 | }; 33 | } 34 | 35 | #endif // EVENTHANDLER_H_62B23520_7C8E_11DE_8A39_0800200C9A66 36 | 37 | -------------------------------------------------------------------------------- /src/tools/include/yaml-cpp/parser.h: -------------------------------------------------------------------------------- 1 | #ifndef PARSER_H_62B23520_7C8E_11DE_8A39_0800200C9A66 2 | #define PARSER_H_62B23520_7C8E_11DE_8A39_0800200C9A66 3 | 4 | #if defined(_MSC_VER) || (defined(__GNUC__) && (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || (__GNUC__ >= 4)) // GCC supports "pragma once" correctly since 3.4 5 | #pragma once 6 | #endif 7 | 8 | 9 | #include "yaml-cpp/dll.h" 10 | #include "yaml-cpp/noncopyable.h" 11 | #include 12 | #include 13 | 14 | namespace YAML 15 | { 16 | struct Directives; 17 | struct Token; 18 | class EventHandler; 19 | class Scanner; 20 | 21 | class YAML_CPP_API Parser: private noncopyable 22 | { 23 | public: 24 | Parser(); 25 | Parser(std::istream& in); 26 | ~Parser(); 27 | 28 | operator bool() const; 29 | 30 | void Load(std::istream& in); 31 | bool HandleNextDocument(EventHandler& eventHandler); 32 | 33 | void PrintTokens(std::ostream& out); 34 | 35 | private: 36 | void ParseDirectives(); 37 | void HandleDirective(const Token& token); 38 | void HandleYamlDirective(const Token& token); 39 | void HandleTagDirective(const Token& token); 40 | 41 | private: 42 | std::auto_ptr m_pScanner; 43 | std::auto_ptr m_pDirectives; 44 | }; 45 | } 46 | 47 | #endif // PARSER_H_62B23520_7C8E_11DE_8A39_0800200C9A66 48 | -------------------------------------------------------------------------------- /src/tools/include/Eigen/UmfPackSupport: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_UMFPACKSUPPORT_MODULE_H 2 | #define EIGEN_UMFPACKSUPPORT_MODULE_H 3 | 4 | #include "SparseCore" 5 | 6 | #include "src/Core/util/DisableStupidWarnings.h" 7 | 8 | extern "C" { 9 | #include 10 | } 11 | 12 | /** \ingroup Support_modules 13 | * \defgroup UmfPackSupport_Module UmfPackSupport module 14 | * 15 | * This module provides an interface to the UmfPack library which is part of the suitesparse package. 16 | * It provides the following factorization class: 17 | * - class UmfPackLU: a multifrontal sequential LU factorization. 18 | * 19 | * \code 20 | * #include 21 | * \endcode 22 | * 23 | * In order to use this module, the umfpack headers must be accessible from the include paths, and your binary must be linked to the umfpack library and its dependencies. 24 | * The dependencies depend on how umfpack has been compiled. 25 | * For a cmake based project, you can use our FindUmfPack.cmake module to help you in this task. 26 | * 27 | */ 28 | 29 | #include "src/misc/Solve.h" 30 | #include "src/misc/SparseSolve.h" 31 | 32 | #include "src/UmfPackSupport/UmfPackSupport.h" 33 | 34 | #include "src/Core/util/ReenableStupidWarnings.h" 35 | 36 | #endif // EIGEN_UMFPACKSUPPORT_MODULE_H 37 | -------------------------------------------------------------------------------- /src/common/column_family.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | *Copyright 2015 NTU (http://www.ntu.edu.sg/) 3 | *Licensed under the Apache License, Version 2.0 (the "License"); 4 | *you may not use this file except in compliance with the License. 5 | *You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | *Unless required by applicable law or agreed to in writing, software 10 | *distributed under the License is distributed on an "AS IS" BASIS, 11 | *WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | *See the License for the specific language governing permissions and 13 | *limitations under the License. 14 | */ 15 | #include "column_family.h" 16 | 17 | namespace ntu { 18 | namespace cap { 19 | 20 | ColumnFamily::ColumnFamily() { 21 | } 22 | 23 | ColumnFamily::ColumnFamily(const ColumnFamilyProperty& cf_property) { 24 | _cf_property = cf_property; 25 | } 26 | 27 | ColumnFamily::ColumnFamily(const std::string& cf_name, 28 | const StorageType::type storage_type) { 29 | _cf_property.cf_name = cf_name; 30 | _cf_property.storage_type = storage_type; 31 | _cf_property.block_size.clear(); 32 | } 33 | 34 | int64_t ColumnFamily::set_storage_type(const StorageType::type storage_type) { 35 | _cf_property.storage_type = storage_type; 36 | return 1; 37 | } 38 | 39 | } 40 | } 41 | 42 | 43 | -------------------------------------------------------------------------------- /src/tools/include/boost/threadpool/detail/scope_guard.hpp: -------------------------------------------------------------------------------- 1 | /*! \file 2 | * \brief TODO. 3 | * 4 | * TODO. 5 | * 6 | * Copyright (c) 2005-2007 Philipp Henkel 7 | * 8 | * Use, modification, and distribution are subject to the 9 | * Boost Software License, Version 1.0. (See accompanying file 10 | * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 11 | * 12 | * http://threadpool.sourceforge.net 13 | * 14 | */ 15 | 16 | 17 | #ifndef THREADPOOL_DETAIL_SCOPE_GUARD_HPP_INCLUDED 18 | #define THREADPOOL_DETAIL_SCOPE_GUARD_HPP_INCLUDED 19 | 20 | 21 | 22 | #include 23 | 24 | 25 | namespace boost { 26 | namespace threadpool { 27 | namespace detail { 28 | 29 | // TODO documentation 30 | class scope_guard 31 | : private boost::noncopyable { 32 | function0 const m_function; 33 | bool m_is_active; 34 | 35 | public: 36 | scope_guard(function0 const & call_on_exit) 37 | : m_function(call_on_exit) 38 | , m_is_active(true) { 39 | } 40 | 41 | ~scope_guard() { 42 | if(m_is_active && m_function) { 43 | m_function(); 44 | } 45 | } 46 | 47 | void disable() { 48 | m_is_active = false; 49 | } 50 | }; 51 | 52 | 53 | 54 | 55 | 56 | 57 | } 58 | } 59 | } // namespace boost::threadpool::detail 60 | 61 | #endif // THREADPOOL_DETAIL_SCOPE_GUARD_HPP_INCLUDED 62 | 63 | 64 | -------------------------------------------------------------------------------- /src/common/node_info.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | *Copyright 2015 NTU (http://www.ntu.edu.sg/) 3 | *Licensed under the Apache License, Version 2.0 (the "License"); 4 | *you may not use this file except in compliance with the License. 5 | *You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | *Unless required by applicable law or agreed to in writing, software 10 | *distributed under the License is distributed on an "AS IS" BASIS, 11 | *WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | *See the License for the specific language governing permissions and 13 | *limitations under the License. 14 | */ 15 | #include "node_info.h" 16 | namespace ntu { 17 | namespace cap { 18 | 19 | NodeInfo::NodeInfo() { 20 | _task_tracker_number = 0; 21 | _ready_task_tracker_number = 0; 22 | _node_id = 0; 23 | _node_num = 0; 24 | _name_length = 0; 25 | _port = 0; 26 | _storage_weight = 1; 27 | _master_port = 9010; 28 | 29 | time_t rawtime; 30 | struct tm * timeinfo; 31 | char buffer[80]; 32 | time (&rawtime); 33 | timeinfo = localtime(&rawtime); 34 | 35 | strftime(buffer,80,"%d%m%Y%I%M%S", timeinfo); 36 | _app_name = std::string(buffer); 37 | _root_dir = "/unicap/"; 38 | } 39 | 40 | NodeInfo& NodeInfo::singleton() { 41 | static NodeInfo node_info; 42 | return node_info; 43 | } 44 | 45 | } 46 | } 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /src/common/column_family.h: -------------------------------------------------------------------------------- 1 | /* 2 | *Copyright 2015 NTU (http://www.ntu.edu.sg/) 3 | *Licensed under the Apache License, Version 2.0 (the "License"); 4 | *you may not use this file except in compliance with the License. 5 | *You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | *Unless required by applicable law or agreed to in writing, software 10 | *distributed under the License is distributed on an "AS IS" BASIS, 11 | *WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | *See the License for the specific language governing permissions and 13 | *limitations under the License. 14 | */ 15 | #ifndef NTU_CAP_UNICAP_COMMON_COLUMN_FAMILY_H_ 16 | #define NTU_CAP_UNICAP_COMMON_COLUMN_FAMILY_H_ 17 | 18 | #include 19 | #include 20 | #include 21 | #include "../gen/JobTracker.h" 22 | #include "../gen/TaskTracker.h" 23 | #include "node_info.h" 24 | #include "table.h" 25 | 26 | namespace ntu { 27 | namespace cap { 28 | 29 | class ColumnFamily { 30 | public: 31 | ColumnFamily(); 32 | 33 | ColumnFamily(const ColumnFamilyProperty& cf_property); 34 | 35 | ColumnFamily(const std::string& cf_name, 36 | const StorageType::type storage_type); 37 | 38 | int64_t set_storage_type(const StorageType::type storage_type); 39 | 40 | ColumnFamilyProperty _cf_property; 41 | }; 42 | 43 | } 44 | } 45 | #endif /* UNICAP_COMMON_COLUMN_FAMILY_H_ */ 46 | -------------------------------------------------------------------------------- /src/tools/include/yaml-cpp/dll.h: -------------------------------------------------------------------------------- 1 | #ifndef DLL_H_62B23520_7C8E_11DE_8A39_0800200C9A66 2 | #define DLL_H_62B23520_7C8E_11DE_8A39_0800200C9A66 3 | 4 | #if defined(_MSC_VER) || (defined(__GNUC__) && (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || (__GNUC__ >= 4)) // GCC supports "pragma once" correctly since 3.4 5 | #pragma once 6 | #endif 7 | 8 | // The following ifdef block is the standard way of creating macros which make exporting 9 | // from a DLL simpler. All files within this DLL are compiled with the yaml_cpp_EXPORTS 10 | // symbol defined on the command line. this symbol should not be defined on any project 11 | // that uses this DLL. This way any other project whose source files include this file see 12 | // YAML_CPP_API functions as being imported from a DLL, whereas this DLL sees symbols 13 | // defined with this macro as being exported. 14 | #undef YAML_CPP_API 15 | 16 | #ifdef YAML_CPP_DLL // Using or Building YAML-CPP DLL (definition defined manually) 17 | #ifdef yaml_cpp_EXPORTS // Building YAML-CPP DLL (definition created by CMake or defined manually) 18 | // #pragma message( "Defining YAML_CPP_API for DLL export" ) 19 | #define YAML_CPP_API __declspec(dllexport) 20 | #else // yaml_cpp_EXPORTS 21 | // #pragma message( "Defining YAML_CPP_API for DLL import" ) 22 | #define YAML_CPP_API __declspec(dllimport) 23 | #endif // yaml_cpp_EXPORTS 24 | #else //YAML_CPP_DLL 25 | #define YAML_CPP_API 26 | #endif // YAML_CPP_DLL 27 | 28 | #endif // DLL_H_62B23520_7C8E_11DE_8A39_0800200C9A66 29 | -------------------------------------------------------------------------------- /src/tools/include/yaml-cpp/emitfromevents.h: -------------------------------------------------------------------------------- 1 | #ifndef EMITFROMEVENTS_H_62B23520_7C8E_11DE_8A39_0800200C9A66 2 | #define EMITFROMEVENTS_H_62B23520_7C8E_11DE_8A39_0800200C9A66 3 | 4 | #if defined(_MSC_VER) || (defined(__GNUC__) && (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || (__GNUC__ >= 4)) // GCC supports "pragma once" correctly since 3.4 5 | #pragma once 6 | #endif 7 | 8 | #include "yaml-cpp/eventhandler.h" 9 | #include 10 | 11 | namespace YAML 12 | { 13 | class Emitter; 14 | 15 | class EmitFromEvents: public EventHandler 16 | { 17 | public: 18 | EmitFromEvents(Emitter& emitter); 19 | 20 | virtual void OnDocumentStart(const Mark& mark); 21 | virtual void OnDocumentEnd(); 22 | 23 | virtual void OnNull(const Mark& mark, anchor_t anchor); 24 | virtual void OnAlias(const Mark& mark, anchor_t anchor); 25 | virtual void OnScalar(const Mark& mark, const std::string& tag, anchor_t anchor, const std::string& value); 26 | 27 | virtual void OnSequenceStart(const Mark& mark, const std::string& tag, anchor_t anchor); 28 | virtual void OnSequenceEnd(); 29 | 30 | virtual void OnMapStart(const Mark& mark, const std::string& tag, anchor_t anchor); 31 | virtual void OnMapEnd(); 32 | 33 | private: 34 | void BeginNode(); 35 | void EmitProps(const std::string& tag, anchor_t anchor); 36 | 37 | private: 38 | Emitter& m_emitter; 39 | 40 | struct State { enum value { WaitingForSequenceEntry, WaitingForKey, WaitingForValue }; }; 41 | std::stack m_stateStack; 42 | }; 43 | } 44 | 45 | #endif // EMITFROMEVENTS_H_62B23520_7C8E_11DE_8A39_0800200C9A66 46 | -------------------------------------------------------------------------------- /src/tools/include/Eigen/Eigenvalues: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_EIGENVALUES_MODULE_H 2 | #define EIGEN_EIGENVALUES_MODULE_H 3 | 4 | #include "Core" 5 | 6 | #include "src/Core/util/DisableStupidWarnings.h" 7 | 8 | #include "Cholesky" 9 | #include "Jacobi" 10 | #include "Householder" 11 | #include "LU" 12 | #include "Geometry" 13 | 14 | /** \defgroup Eigenvalues_Module Eigenvalues module 15 | * 16 | * 17 | * 18 | * This module mainly provides various eigenvalue solvers. 19 | * This module also provides some MatrixBase methods, including: 20 | * - MatrixBase::eigenvalues(), 21 | * - MatrixBase::operatorNorm() 22 | * 23 | * \code 24 | * #include 25 | * \endcode 26 | */ 27 | 28 | #include "src/Eigenvalues/Tridiagonalization.h" 29 | #include "src/Eigenvalues/RealSchur.h" 30 | #include "src/Eigenvalues/EigenSolver.h" 31 | #include "src/Eigenvalues/SelfAdjointEigenSolver.h" 32 | #include "src/Eigenvalues/GeneralizedSelfAdjointEigenSolver.h" 33 | #include "src/Eigenvalues/HessenbergDecomposition.h" 34 | #include "src/Eigenvalues/ComplexSchur.h" 35 | #include "src/Eigenvalues/ComplexEigenSolver.h" 36 | #include "src/Eigenvalues/RealQZ.h" 37 | #include "src/Eigenvalues/GeneralizedEigenSolver.h" 38 | #include "src/Eigenvalues/MatrixBaseEigenvalues.h" 39 | #ifdef EIGEN_USE_LAPACKE 40 | #include "src/Eigenvalues/RealSchur_MKL.h" 41 | #include "src/Eigenvalues/ComplexSchur_MKL.h" 42 | #include "src/Eigenvalues/SelfAdjointEigenSolver_MKL.h" 43 | #endif 44 | 45 | #include "src/Core/util/ReenableStupidWarnings.h" 46 | 47 | #endif // EIGEN_EIGENVALUES_MODULE_H 48 | /* vim: set filetype=cpp et sw=2 ts=2 ai: */ 49 | -------------------------------------------------------------------------------- /src/tools/include/yaml-cpp/stlemitter.h: -------------------------------------------------------------------------------- 1 | #ifndef STLEMITTER_H_62B23520_7C8E_11DE_8A39_0800200C9A66 2 | #define STLEMITTER_H_62B23520_7C8E_11DE_8A39_0800200C9A66 3 | 4 | #if defined(_MSC_VER) || (defined(__GNUC__) && (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || (__GNUC__ >= 4)) // GCC supports "pragma once" correctly since 3.4 5 | #pragma once 6 | #endif 7 | 8 | 9 | #include 10 | #include 11 | #include 12 | #include 13 | 14 | namespace YAML 15 | { 16 | template 17 | inline Emitter& EmitSeq(Emitter& emitter, const Seq& seq) { 18 | emitter << BeginSeq; 19 | for(typename Seq::const_iterator it=seq.begin();it!=seq.end();++it) 20 | emitter << *it; 21 | emitter << EndSeq; 22 | return emitter; 23 | } 24 | 25 | template 26 | inline Emitter& operator << (Emitter& emitter, const std::vector& v) { 27 | return EmitSeq(emitter, v); 28 | } 29 | 30 | template 31 | inline Emitter& operator << (Emitter& emitter, const std::list& v) { 32 | return EmitSeq(emitter, v); 33 | } 34 | 35 | template 36 | inline Emitter& operator << (Emitter& emitter, const std::set& v) { 37 | return EmitSeq(emitter, v); 38 | } 39 | 40 | template 41 | inline Emitter& operator << (Emitter& emitter, const std::map& m) { 42 | typedef typename std::map map; 43 | emitter << BeginMap; 44 | for(typename map::const_iterator it=m.begin();it!=m.end();++it) 45 | emitter << Key << it->first << Value << it->second; 46 | emitter << EndMap; 47 | return emitter; 48 | } 49 | } 50 | 51 | #endif // STLEMITTER_H_62B23520_7C8E_11DE_8A39_0800200C9A66 52 | -------------------------------------------------------------------------------- /src/tools/include/Eigen/SparseCholesky: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2008-2013 Gael Guennebaud 5 | // 6 | // This Source Code Form is subject to the terms of the Mozilla 7 | // Public License v. 2.0. If a copy of the MPL was not distributed 8 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 9 | 10 | #ifndef EIGEN_SPARSECHOLESKY_MODULE_H 11 | #define EIGEN_SPARSECHOLESKY_MODULE_H 12 | 13 | #include "SparseCore" 14 | #include "OrderingMethods" 15 | 16 | #include "src/Core/util/DisableStupidWarnings.h" 17 | 18 | /** 19 | * \defgroup SparseCholesky_Module SparseCholesky module 20 | * 21 | * This module currently provides two variants of the direct sparse Cholesky decomposition for selfadjoint (hermitian) matrices. 22 | * Those decompositions are accessible via the following classes: 23 | * - SimplicialLLt, 24 | * - SimplicialLDLt 25 | * 26 | * Such problems can also be solved using the ConjugateGradient solver from the IterativeLinearSolvers module. 27 | * 28 | * \code 29 | * #include 30 | * \endcode 31 | */ 32 | 33 | #ifdef EIGEN_MPL2_ONLY 34 | #error The SparseCholesky module has nothing to offer in MPL2 only mode 35 | #endif 36 | 37 | #include "src/misc/Solve.h" 38 | #include "src/misc/SparseSolve.h" 39 | #include "src/SparseCholesky/SimplicialCholesky.h" 40 | 41 | #ifndef EIGEN_MPL2_ONLY 42 | #include "src/SparseCholesky/SimplicialCholesky_impl.h" 43 | #endif 44 | 45 | #include "src/Core/util/ReenableStupidWarnings.h" 46 | 47 | #endif // EIGEN_SPARSECHOLESKY_MODULE_H 48 | -------------------------------------------------------------------------------- /src/tools/include/Eigen/PaStiXSupport: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_PASTIXSUPPORT_MODULE_H 2 | #define EIGEN_PASTIXSUPPORT_MODULE_H 3 | 4 | #include "SparseCore" 5 | 6 | #include "src/Core/util/DisableStupidWarnings.h" 7 | 8 | #include 9 | extern "C" { 10 | #include 11 | #include 12 | } 13 | 14 | #ifdef complex 15 | #undef complex 16 | #endif 17 | 18 | /** \ingroup Support_modules 19 | * \defgroup PaStiXSupport_Module PaStiXSupport module 20 | * 21 | * This module provides an interface to the PaSTiX library. 22 | * PaSTiX is a general \b supernodal, \b parallel and \b opensource sparse solver. 23 | * It provides the two following main factorization classes: 24 | * - class PastixLLT : a supernodal, parallel LLt Cholesky factorization. 25 | * - class PastixLDLT: a supernodal, parallel LDLt Cholesky factorization. 26 | * - class PastixLU : a supernodal, parallel LU factorization (optimized for a symmetric pattern). 27 | * 28 | * \code 29 | * #include 30 | * \endcode 31 | * 32 | * In order to use this module, the PaSTiX headers must be accessible from the include paths, and your binary must be linked to the PaSTiX library and its dependencies. 33 | * The dependencies depend on how PaSTiX has been compiled. 34 | * For a cmake based project, you can use our FindPaSTiX.cmake module to help you in this task. 35 | * 36 | */ 37 | 38 | #include "src/misc/Solve.h" 39 | #include "src/misc/SparseSolve.h" 40 | 41 | #include "src/PaStiXSupport/PaStiXSupport.h" 42 | 43 | 44 | #include "src/Core/util/ReenableStupidWarnings.h" 45 | 46 | #endif // EIGEN_PASTIXSUPPORT_MODULE_H 47 | -------------------------------------------------------------------------------- /src/task_tracker/cpu_worker.h: -------------------------------------------------------------------------------- 1 | /* 2 | *Copyright 2015 NTU (http://www.ntu.edu.sg/) 3 | *Licensed under the Apache License, Version 2.0 (the "License"); 4 | *you may not use this file except in compliance with the License. 5 | *You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | *Unless required by applicable law or agreed to in writing, software 10 | *distributed under the License is distributed on an "AS IS" BASIS, 11 | *WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | *See the License for the specific language governing permissions and 13 | *limitations under the License. 14 | */ 15 | 16 | #ifndef NTU_CAP_UNICAP_CPU_WORKER_H_ 17 | #define NTU_CAP_UNICAP_CPU_WORKER_H_ 18 | 19 | #include 20 | #include "../common/unicap_client.h" 21 | #include "../common/storage_info.h" 22 | #include "../tools/include/boost/threadpool.hpp" 23 | #include "../computing/cpu_functions.h" 24 | #include "../../app/user_cpu_functions.h" 25 | #include "cpu_networks.h" 26 | 27 | namespace ntu { 28 | namespace cap { 29 | 30 | class CPUWorker { 31 | 32 | public: 33 | 34 | static CPUWorker& singleton() { 35 | static CPUWorker client; 36 | return client; 37 | } 38 | 39 | CPUWorker(); 40 | 41 | CPUWorker(int64_t worker_number); 42 | 43 | static int64_t cpu_execute_tasks(int64_t worker_number); 44 | 45 | static int64_t functions(std::string function_name, TaskNode task); 46 | 47 | std::thread cpu_worker_start(); 48 | 49 | static int64_t create_network(); 50 | 51 | int64_t _worker_number; 52 | 53 | }; 54 | 55 | } 56 | } 57 | 58 | #endif /* NTU_CAP_UNICAP_CPU_WORKER_H_ */ 59 | -------------------------------------------------------------------------------- /src/tools/include/Eigen/src/Eigen2Support/TriangularSolver.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2010 Gael Guennebaud 5 | // 6 | // This Source Code Form is subject to the terms of the Mozilla 7 | // Public License v. 2.0. If a copy of the MPL was not distributed 8 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 9 | 10 | #ifndef EIGEN_TRIANGULAR_SOLVER2_H 11 | #define EIGEN_TRIANGULAR_SOLVER2_H 12 | 13 | namespace Eigen { 14 | 15 | const unsigned int UnitDiagBit = UnitDiag; 16 | const unsigned int SelfAdjointBit = SelfAdjoint; 17 | const unsigned int UpperTriangularBit = Upper; 18 | const unsigned int LowerTriangularBit = Lower; 19 | 20 | const unsigned int UpperTriangular = Upper; 21 | const unsigned int LowerTriangular = Lower; 22 | const unsigned int UnitUpperTriangular = UnitUpper; 23 | const unsigned int UnitLowerTriangular = UnitLower; 24 | 25 | template 26 | template 27 | typename ExpressionType::PlainObject 28 | Flagged::solveTriangular(const MatrixBase& other) const 29 | { 30 | return m_matrix.template triangularView().solve(other.derived()); 31 | } 32 | 33 | template 34 | template 35 | void Flagged::solveTriangularInPlace(const MatrixBase& other) const 36 | { 37 | m_matrix.template triangularView().solveInPlace(other.derived()); 38 | } 39 | 40 | } // end namespace Eigen 41 | 42 | #endif // EIGEN_TRIANGULAR_SOLVER2_H 43 | -------------------------------------------------------------------------------- /src/common/storage_info.h: -------------------------------------------------------------------------------- 1 | /* 2 | *Copyright 2015 NTU (http://www.ntu.edu.sg/) 3 | *Licensed under the Apache License, Version 2.0 (the "License"); 4 | *you may not use this file except in compliance with the License. 5 | *You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | *Unless required by applicable law or agreed to in writing, software 10 | *distributed under the License is distributed on an "AS IS" BASIS, 11 | *WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | *See the License for the specific language governing permissions and 13 | *limitations under the License. 14 | */ 15 | 16 | #ifndef NTU_CAP_UNICAP_COMMON_STORAGE_INFO_H_ 17 | #define NTU_CAP_UNICAP_COMMON_STORAGE_INFO_H_ 18 | 19 | #include 20 | #include 21 | #include "table.h" 22 | #include "column_family.h" 23 | #include "../gen/JobTracker.h" 24 | #include "../gen/TaskTracker.h" 25 | #include "../storage/storage_systems.h" 26 | 27 | namespace ntu { 28 | namespace cap { 29 | 30 | class StorageInfo { 31 | public: 32 | 33 | StorageInfo(); 34 | 35 | static StorageInfo& singleton(); 36 | 37 | std::unordered_map _table_info; 38 | typedef std::map CfPool; 39 | std::unordered_map _cf_info; 40 | 41 | typedef std::shared_ptr StoragePtr; 42 | typedef std::unordered_map CfStorage; 43 | typedef std::unordered_map ShardPtr; 44 | typedef std::unordered_map TablePtr; 45 | //table_name -> shard_id -> cf_name -> ptr 46 | TablePtr _cf_ptr; 47 | private: 48 | 49 | }; 50 | 51 | } 52 | } 53 | 54 | #endif /* UNICAP_COMMON_STORAGE_INFO_H_ */ 55 | -------------------------------------------------------------------------------- /src/tools/include/Eigen/src/SparseCore/SparseRedux.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2008 Gael Guennebaud 5 | // 6 | // This Source Code Form is subject to the terms of the Mozilla 7 | // Public License v. 2.0. If a copy of the MPL was not distributed 8 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 9 | 10 | #ifndef EIGEN_SPARSEREDUX_H 11 | #define EIGEN_SPARSEREDUX_H 12 | 13 | namespace Eigen { 14 | 15 | template 16 | typename internal::traits::Scalar 17 | SparseMatrixBase::sum() const 18 | { 19 | eigen_assert(rows()>0 && cols()>0 && "you are using a non initialized matrix"); 20 | Scalar res(0); 21 | for (Index j=0; j 28 | typename internal::traits >::Scalar 29 | SparseMatrix<_Scalar,_Options,_Index>::sum() const 30 | { 31 | eigen_assert(rows()>0 && cols()>0 && "you are using a non initialized matrix"); 32 | return Matrix::Map(&m_data.value(0), m_data.size()).sum(); 33 | } 34 | 35 | template 36 | typename internal::traits >::Scalar 37 | SparseVector<_Scalar,_Options,_Index>::sum() const 38 | { 39 | eigen_assert(rows()>0 && cols()>0 && "you are using a non initialized matrix"); 40 | return Matrix::Map(&m_data.value(0), m_data.size()).sum(); 41 | } 42 | 43 | } // end namespace Eigen 44 | 45 | #endif // EIGEN_SPARSEREDUX_H 46 | -------------------------------------------------------------------------------- /src/tools/include/Eigen/IterativeLinearSolvers: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_ITERATIVELINEARSOLVERS_MODULE_H 2 | #define EIGEN_ITERATIVELINEARSOLVERS_MODULE_H 3 | 4 | #include "SparseCore" 5 | #include "OrderingMethods" 6 | 7 | #include "src/Core/util/DisableStupidWarnings.h" 8 | 9 | /** 10 | * \defgroup IterativeLinearSolvers_Module IterativeLinearSolvers module 11 | * 12 | * This module currently provides iterative methods to solve problems of the form \c A \c x = \c b, where \c A is a squared matrix, usually very large and sparse. 13 | * Those solvers are accessible via the following classes: 14 | * - ConjugateGradient for selfadjoint (hermitian) matrices, 15 | * - BiCGSTAB for general square matrices. 16 | * 17 | * These iterative solvers are associated with some preconditioners: 18 | * - IdentityPreconditioner - not really useful 19 | * - DiagonalPreconditioner - also called JAcobi preconditioner, work very well on diagonal dominant matrices. 20 | * - IncompleteILUT - incomplete LU factorization with dual thresholding 21 | * 22 | * Such problems can also be solved using the direct sparse decomposition modules: SparseCholesky, CholmodSupport, UmfPackSupport, SuperLUSupport. 23 | * 24 | * \code 25 | * #include 26 | * \endcode 27 | */ 28 | 29 | #include "src/misc/Solve.h" 30 | #include "src/misc/SparseSolve.h" 31 | 32 | #include "src/IterativeLinearSolvers/IterativeSolverBase.h" 33 | #include "src/IterativeLinearSolvers/BasicPreconditioners.h" 34 | #include "src/IterativeLinearSolvers/ConjugateGradient.h" 35 | #include "src/IterativeLinearSolvers/BiCGSTAB.h" 36 | #include "src/IterativeLinearSolvers/IncompleteLUT.h" 37 | 38 | #include "src/Core/util/ReenableStupidWarnings.h" 39 | 40 | #endif // EIGEN_ITERATIVELINEARSOLVERS_MODULE_H 41 | -------------------------------------------------------------------------------- /src/common/table.h: -------------------------------------------------------------------------------- 1 | /* 2 | *Copyright 2015 NTU (http://www.ntu.edu.sg/) 3 | *Licensed under the Apache License, Version 2.0 (the "License"); 4 | *you may not use this file except in compliance with the License. 5 | *You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | *Unless required by applicable law or agreed to in writing, software 10 | *distributed under the License is distributed on an "AS IS" BASIS, 11 | *WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | *See the License for the specific language governing permissions and 13 | *limitations under the License. 14 | */ 15 | #ifndef NTU_CAP_UNICAP_COMMON_TABLE_H_ 16 | #define NTU_CAP_UNICAP_COMMON_TABLE_H_ 17 | 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include "../gen/JobTracker.h" 23 | #include "../gen/TaskTracker.h" 24 | #include "node_info.h" 25 | 26 | namespace ntu { 27 | namespace cap { 28 | 29 | class Table { 30 | public: 31 | 32 | Table(); 33 | 34 | Table(const std::string& table_name, const Table &base_table); 35 | 36 | Table(const TableProperty& table_property); 37 | 38 | Table(const std::string& table_name, const int64_t shard_num, const KeyPartition partition); 39 | 40 | int64_t set_table_name(const std::string& table_name); 41 | 42 | int64_t set_shard_num(const int64_t shard_num); 43 | 44 | int64_t allocate_shard(); 45 | 46 | int64_t replicate_shard(); 47 | 48 | TableProperty _table_property; 49 | // std::string _table_name; 50 | // int64_t _shard_num; 51 | // std::map _shard_location; 52 | // std::map> _node_info; 53 | // KeyPartition _partition; 54 | }; 55 | 56 | } 57 | } 58 | 59 | #endif /* UNICAP_COMMON_TABLE_H_ */ 60 | -------------------------------------------------------------------------------- /src/tools/include/Eigen/src/Eigen2Support/Memory.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2011 Benoit Jacob 5 | // 6 | // This Source Code Form is subject to the terms of the Mozilla 7 | // Public License v. 2.0. If a copy of the MPL was not distributed 8 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 9 | 10 | #ifndef EIGEN2_MEMORY_H 11 | #define EIGEN2_MEMORY_H 12 | 13 | namespace Eigen { 14 | 15 | inline void* ei_aligned_malloc(size_t size) { return internal::aligned_malloc(size); } 16 | inline void ei_aligned_free(void *ptr) { internal::aligned_free(ptr); } 17 | inline void* ei_aligned_realloc(void *ptr, size_t new_size, size_t old_size) { return internal::aligned_realloc(ptr, new_size, old_size); } 18 | inline void* ei_handmade_aligned_malloc(size_t size) { return internal::handmade_aligned_malloc(size); } 19 | inline void ei_handmade_aligned_free(void *ptr) { internal::handmade_aligned_free(ptr); } 20 | 21 | template inline void* ei_conditional_aligned_malloc(size_t size) 22 | { 23 | return internal::conditional_aligned_malloc(size); 24 | } 25 | template inline void ei_conditional_aligned_free(void *ptr) 26 | { 27 | internal::conditional_aligned_free(ptr); 28 | } 29 | template inline void* ei_conditional_aligned_realloc(void* ptr, size_t new_size, size_t old_size) 30 | { 31 | return internal::conditional_aligned_realloc(ptr, new_size, old_size); 32 | } 33 | 34 | template inline T* ei_aligned_new(size_t size) 35 | { 36 | return internal::aligned_new(size); 37 | } 38 | template inline void ei_aligned_delete(T *ptr, size_t size) 39 | { 40 | return internal::aligned_delete(ptr, size); 41 | } 42 | 43 | } // end namespace Eigen 44 | 45 | #endif // EIGEN2_MACROS_H 46 | -------------------------------------------------------------------------------- /src/tools/include/Eigen/Geometry: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_GEOMETRY_MODULE_H 2 | #define EIGEN_GEOMETRY_MODULE_H 3 | 4 | #include "Core" 5 | 6 | #include "src/Core/util/DisableStupidWarnings.h" 7 | 8 | #include "SVD" 9 | #include "LU" 10 | #include 11 | 12 | #ifndef M_PI 13 | #define M_PI 3.14159265358979323846 14 | #endif 15 | 16 | /** \defgroup Geometry_Module Geometry module 17 | * 18 | * 19 | * 20 | * This module provides support for: 21 | * - fixed-size homogeneous transformations 22 | * - translation, scaling, 2D and 3D rotations 23 | * - quaternions 24 | * - \ref MatrixBase::cross() "cross product" 25 | * - \ref MatrixBase::unitOrthogonal() "orthognal vector generation" 26 | * - some linear components: parametrized-lines and hyperplanes 27 | * 28 | * \code 29 | * #include 30 | * \endcode 31 | */ 32 | 33 | #include "src/Geometry/OrthoMethods.h" 34 | #include "src/Geometry/EulerAngles.h" 35 | 36 | #if EIGEN2_SUPPORT_STAGE > STAGE20_RESOLVE_API_CONFLICTS 37 | #include "src/Geometry/Homogeneous.h" 38 | #include "src/Geometry/RotationBase.h" 39 | #include "src/Geometry/Rotation2D.h" 40 | #include "src/Geometry/Quaternion.h" 41 | #include "src/Geometry/AngleAxis.h" 42 | #include "src/Geometry/Transform.h" 43 | #include "src/Geometry/Translation.h" 44 | #include "src/Geometry/Scaling.h" 45 | #include "src/Geometry/Hyperplane.h" 46 | #include "src/Geometry/ParametrizedLine.h" 47 | #include "src/Geometry/AlignedBox.h" 48 | #include "src/Geometry/Umeyama.h" 49 | 50 | #if defined EIGEN_VECTORIZE_SSE 51 | #include "src/Geometry/arch/Geometry_SSE.h" 52 | #endif 53 | #endif 54 | 55 | #ifdef EIGEN2_SUPPORT 56 | #include "src/Eigen2Support/Geometry/All.h" 57 | #endif 58 | 59 | #include "src/Core/util/ReenableStupidWarnings.h" 60 | 61 | #endif // EIGEN_GEOMETRY_MODULE_H 62 | /* vim: set filetype=cpp et sw=2 ts=2 ai: */ 63 | 64 | -------------------------------------------------------------------------------- /src/tools/include/Eigen/CholmodSupport: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_CHOLMODSUPPORT_MODULE_H 2 | #define EIGEN_CHOLMODSUPPORT_MODULE_H 3 | 4 | #include "SparseCore" 5 | 6 | #include "src/Core/util/DisableStupidWarnings.h" 7 | 8 | extern "C" { 9 | #include 10 | } 11 | 12 | /** \ingroup Support_modules 13 | * \defgroup CholmodSupport_Module CholmodSupport module 14 | * 15 | * This module provides an interface to the Cholmod library which is part of the suitesparse package. 16 | * It provides the two following main factorization classes: 17 | * - class CholmodSupernodalLLT: a supernodal LLT Cholesky factorization. 18 | * - class CholmodDecomposiiton: a general L(D)LT Cholesky factorization with automatic or explicit runtime selection of the underlying factorization method (supernodal or simplicial). 19 | * 20 | * For the sake of completeness, this module also propose the two following classes: 21 | * - class CholmodSimplicialLLT 22 | * - class CholmodSimplicialLDLT 23 | * Note that these classes does not bring any particular advantage compared to the built-in 24 | * SimplicialLLT and SimplicialLDLT factorization classes. 25 | * 26 | * \code 27 | * #include 28 | * \endcode 29 | * 30 | * In order to use this module, the cholmod headers must be accessible from the include paths, and your binary must be linked to the cholmod library and its dependencies. 31 | * The dependencies depend on how cholmod has been compiled. 32 | * For a cmake based project, you can use our FindCholmod.cmake module to help you in this task. 33 | * 34 | */ 35 | 36 | #include "src/misc/Solve.h" 37 | #include "src/misc/SparseSolve.h" 38 | 39 | #include "src/CholmodSupport/CholmodSupport.h" 40 | 41 | 42 | #include "src/Core/util/ReenableStupidWarnings.h" 43 | 44 | #endif // EIGEN_CHOLMODSUPPORT_MODULE_H 45 | 46 | -------------------------------------------------------------------------------- /src/tools/include/opencv2/flann/config.h: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | * Software License Agreement (BSD License) 3 | * 4 | * Copyright 2008-2011 Marius Muja (mariusm@cs.ubc.ca). All rights reserved. 5 | * Copyright 2008-2011 David G. Lowe (lowe@cs.ubc.ca). All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions 9 | * are met: 10 | * 11 | * 1. Redistributions of source code must retain the above copyright 12 | * notice, this list of conditions and the following disclaimer. 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 18 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 19 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 20 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 21 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 22 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | *************************************************************************/ 28 | 29 | 30 | #ifndef OPENCV_FLANN_CONFIG_H_ 31 | #define OPENCV_FLANN_CONFIG_H_ 32 | 33 | #ifdef FLANN_VERSION_ 34 | #undef FLANN_VERSION_ 35 | #endif 36 | #define FLANN_VERSION_ "1.6.10" 37 | 38 | #endif /* OPENCV_FLANN_CONFIG_H_ */ 39 | -------------------------------------------------------------------------------- /src/computing/cpu_functions.h: -------------------------------------------------------------------------------- 1 | /* 2 | *Copyright 2015 NTU (http://www.ntu.edu.sg/) 3 | *Licensed under the Apache License, Version 2.0 (the "License"); 4 | *you may not use this file except in compliance with the License. 5 | *You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | *Unless required by applicable law or agreed to in writing, software 10 | *distributed under the License is distributed on an "AS IS" BASIS, 11 | *WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | *See the License for the specific language governing permissions and 13 | *limitations under the License. 14 | */ 15 | #ifndef NTU_CAP_UNICAP_COMPUTING_CPU_FUNCTIONS_H_ 16 | #define NTU_CAP_UNICAP_COMPUTING_CPU_FUNCTIONS_H_ 17 | 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | #include "../gen/JobTracker.h" 25 | #include "../gen/TaskTracker.h" 26 | #include "../common/storage_info.h" 27 | #include "../common/storage.h" 28 | #include "../common/intermediate_result.h" 29 | #include "../task_tracker/cpu_networks.h" 30 | #include "../tools/include/hdfs/hdfs.h" 31 | 32 | namespace ntu { 33 | namespace cap { 34 | 35 | typedef int64_t (*cpu_function_p)(TaskNode); 36 | 37 | class CPUFunctions { 38 | public: 39 | 40 | static CPUFunctions& singleton() { 41 | static CPUFunctions cpu_function; 42 | return cpu_function; 43 | } 44 | 45 | CPUFunctions(); 46 | 47 | static int64_t test (TaskNode new_task); 48 | 49 | static int64_t load_hdfs (TaskNode new_task); 50 | 51 | static int64_t save_hdfs (TaskNode new_task); 52 | 53 | static int64_t load_distributed_cache (TaskNode new_task); 54 | 55 | static int64_t load_hdfs_image(TaskNode new_task); 56 | 57 | std::map _cpu_functions_p; 58 | }; 59 | 60 | } 61 | } 62 | 63 | #endif /* NTU_CAPUNICAP_COMPUTING_CPU_FUNCTIONS_H_ */ 64 | -------------------------------------------------------------------------------- /src/tools/include/Eigen/src/Core/arch/Default/Settings.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2008-2010 Gael Guennebaud 5 | // Copyright (C) 2006-2008 Benoit Jacob 6 | // 7 | // This Source Code Form is subject to the terms of the Mozilla 8 | // Public License v. 2.0. If a copy of the MPL was not distributed 9 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 10 | 11 | 12 | /* All the parameters defined in this file can be specialized in the 13 | * architecture specific files, and/or by the user. 14 | * More to come... */ 15 | 16 | #ifndef EIGEN_DEFAULT_SETTINGS_H 17 | #define EIGEN_DEFAULT_SETTINGS_H 18 | 19 | /** Defines the maximal loop size to enable meta unrolling of loops. 20 | * Note that the value here is expressed in Eigen's own notion of "number of FLOPS", 21 | * it does not correspond to the number of iterations or the number of instructions 22 | */ 23 | #ifndef EIGEN_UNROLLING_LIMIT 24 | #define EIGEN_UNROLLING_LIMIT 100 25 | #endif 26 | 27 | /** Defines the threshold between a "small" and a "large" matrix. 28 | * This threshold is mainly used to select the proper product implementation. 29 | */ 30 | #ifndef EIGEN_CACHEFRIENDLY_PRODUCT_THRESHOLD 31 | #define EIGEN_CACHEFRIENDLY_PRODUCT_THRESHOLD 8 32 | #endif 33 | 34 | /** Defines the maximal width of the blocks used in the triangular product and solver 35 | * for vectors (level 2 blas xTRMV and xTRSV). The default is 8. 36 | */ 37 | #ifndef EIGEN_TUNE_TRIANGULAR_PANEL_WIDTH 38 | #define EIGEN_TUNE_TRIANGULAR_PANEL_WIDTH 8 39 | #endif 40 | 41 | 42 | /** Defines the default number of registers available for that architecture. 43 | * Currently it must be 8 or 16. Other values will fail. 44 | */ 45 | #ifndef EIGEN_ARCH_DEFAULT_NUMBER_OF_REGISTERS 46 | #define EIGEN_ARCH_DEFAULT_NUMBER_OF_REGISTERS 8 47 | #endif 48 | 49 | #endif // EIGEN_DEFAULT_SETTINGS_H 50 | -------------------------------------------------------------------------------- /src/tools/include/Eigen/SparseLU: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2012 Désiré Nuentsa-Wakam 5 | // Copyright (C) 2012 Gael Guennebaud 6 | // 7 | // This Source Code Form is subject to the terms of the Mozilla 8 | // Public License v. 2.0. If a copy of the MPL was not distributed 9 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 10 | 11 | #ifndef EIGEN_SPARSELU_MODULE_H 12 | #define EIGEN_SPARSELU_MODULE_H 13 | 14 | #include "SparseCore" 15 | 16 | /** 17 | * \defgroup SparseLU_Module SparseLU module 18 | * This module defines a supernodal factorization of general sparse matrices. 19 | * The code is fully optimized for supernode-panel updates with specialized kernels. 20 | * Please, see the documentation of the SparseLU class for more details. 21 | */ 22 | 23 | #include "src/misc/Solve.h" 24 | #include "src/misc/SparseSolve.h" 25 | 26 | // Ordering interface 27 | #include "OrderingMethods" 28 | 29 | #include "src/SparseLU/SparseLU_gemm_kernel.h" 30 | 31 | #include "src/SparseLU/SparseLU_Structs.h" 32 | #include "src/SparseLU/SparseLU_SupernodalMatrix.h" 33 | #include "src/SparseLU/SparseLUImpl.h" 34 | #include "src/SparseCore/SparseColEtree.h" 35 | #include "src/SparseLU/SparseLU_Memory.h" 36 | #include "src/SparseLU/SparseLU_heap_relax_snode.h" 37 | #include "src/SparseLU/SparseLU_relax_snode.h" 38 | #include "src/SparseLU/SparseLU_pivotL.h" 39 | #include "src/SparseLU/SparseLU_panel_dfs.h" 40 | #include "src/SparseLU/SparseLU_kernel_bmod.h" 41 | #include "src/SparseLU/SparseLU_panel_bmod.h" 42 | #include "src/SparseLU/SparseLU_column_dfs.h" 43 | #include "src/SparseLU/SparseLU_column_bmod.h" 44 | #include "src/SparseLU/SparseLU_copy_to_ucol.h" 45 | #include "src/SparseLU/SparseLU_pruneL.h" 46 | #include "src/SparseLU/SparseLU_Utils.h" 47 | #include "src/SparseLU/SparseLU.h" 48 | 49 | #endif // EIGEN_SPARSELU_MODULE_H 50 | -------------------------------------------------------------------------------- /src/tools/include/Eigen/src/Eigen2Support/QR.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2008 Gael Guennebaud 5 | // Copyright (C) 2011 Benoit Jacob 6 | // 7 | // This Source Code Form is subject to the terms of the Mozilla 8 | // Public License v. 2.0. If a copy of the MPL was not distributed 9 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 10 | 11 | #ifndef EIGEN2_QR_H 12 | #define EIGEN2_QR_H 13 | 14 | namespace Eigen { 15 | 16 | template 17 | class QR : public HouseholderQR 18 | { 19 | public: 20 | 21 | typedef HouseholderQR Base; 22 | typedef Block MatrixRBlockType; 23 | 24 | QR() : Base() {} 25 | 26 | template 27 | explicit QR(const T& t) : Base(t) {} 28 | 29 | template 30 | bool solve(const MatrixBase& b, ResultType *result) const 31 | { 32 | *result = static_cast(this)->solve(b); 33 | return true; 34 | } 35 | 36 | MatrixType matrixQ(void) const { 37 | MatrixType ret = MatrixType::Identity(this->rows(), this->cols()); 38 | ret = this->householderQ() * ret; 39 | return ret; 40 | } 41 | 42 | bool isFullRank() const { 43 | return true; 44 | } 45 | 46 | const TriangularView 47 | matrixR(void) const 48 | { 49 | int cols = this->cols(); 50 | return MatrixRBlockType(this->matrixQR(), 0, 0, cols, cols).template triangularView(); 51 | } 52 | }; 53 | 54 | /** \return the QR decomposition of \c *this. 55 | * 56 | * \sa class QR 57 | */ 58 | template 59 | const QR::PlainObject> 60 | MatrixBase::qr() const 61 | { 62 | return QR(eval()); 63 | } 64 | 65 | } // end namespace Eigen 66 | 67 | #endif // EIGEN2_QR_H 68 | -------------------------------------------------------------------------------- /src/tools/include/Eigen/src/plugins/MatrixCwiseUnaryOps.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2008-2009 Gael Guennebaud 5 | // Copyright (C) 2006-2008 Benoit Jacob 6 | // 7 | // This Source Code Form is subject to the terms of the Mozilla 8 | // Public License v. 2.0. If a copy of the MPL was not distributed 9 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 10 | 11 | // This file is a base class plugin containing matrix specifics coefficient wise functions. 12 | 13 | /** \returns an expression of the coefficient-wise absolute value of \c *this 14 | * 15 | * Example: \include MatrixBase_cwiseAbs.cpp 16 | * Output: \verbinclude MatrixBase_cwiseAbs.out 17 | * 18 | * \sa cwiseAbs2() 19 | */ 20 | EIGEN_STRONG_INLINE const CwiseUnaryOp, const Derived> 21 | cwiseAbs() const { return derived(); } 22 | 23 | /** \returns an expression of the coefficient-wise squared absolute value of \c *this 24 | * 25 | * Example: \include MatrixBase_cwiseAbs2.cpp 26 | * Output: \verbinclude MatrixBase_cwiseAbs2.out 27 | * 28 | * \sa cwiseAbs() 29 | */ 30 | EIGEN_STRONG_INLINE const CwiseUnaryOp, const Derived> 31 | cwiseAbs2() const { return derived(); } 32 | 33 | /** \returns an expression of the coefficient-wise square root of *this. 34 | * 35 | * Example: \include MatrixBase_cwiseSqrt.cpp 36 | * Output: \verbinclude MatrixBase_cwiseSqrt.out 37 | * 38 | * \sa cwisePow(), cwiseSquare() 39 | */ 40 | inline const CwiseUnaryOp, const Derived> 41 | cwiseSqrt() const { return derived(); } 42 | 43 | /** \returns an expression of the coefficient-wise inverse of *this. 44 | * 45 | * Example: \include MatrixBase_cwiseInverse.cpp 46 | * Output: \verbinclude MatrixBase_cwiseInverse.out 47 | * 48 | * \sa cwiseProduct() 49 | */ 50 | inline const CwiseUnaryOp, const Derived> 51 | cwiseInverse() const { return derived(); } 52 | 53 | -------------------------------------------------------------------------------- /src/tools/include/Eigen/SparseCore: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_SPARSECORE_MODULE_H 2 | #define EIGEN_SPARSECORE_MODULE_H 3 | 4 | #include "Core" 5 | 6 | #include "src/Core/util/DisableStupidWarnings.h" 7 | 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | 14 | /** 15 | * \defgroup SparseCore_Module SparseCore module 16 | * 17 | * This module provides a sparse matrix representation, and basic associatd matrix manipulations 18 | * and operations. 19 | * 20 | * See the \ref TutorialSparse "Sparse tutorial" 21 | * 22 | * \code 23 | * #include 24 | * \endcode 25 | * 26 | * This module depends on: Core. 27 | */ 28 | 29 | namespace Eigen { 30 | 31 | /** The type used to identify a general sparse storage. */ 32 | struct Sparse {}; 33 | 34 | } 35 | 36 | #include "src/SparseCore/SparseUtil.h" 37 | #include "src/SparseCore/SparseMatrixBase.h" 38 | #include "src/SparseCore/CompressedStorage.h" 39 | #include "src/SparseCore/AmbiVector.h" 40 | #include "src/SparseCore/SparseMatrix.h" 41 | #include "src/SparseCore/MappedSparseMatrix.h" 42 | #include "src/SparseCore/SparseVector.h" 43 | #include "src/SparseCore/SparseBlock.h" 44 | #include "src/SparseCore/SparseTranspose.h" 45 | #include "src/SparseCore/SparseCwiseUnaryOp.h" 46 | #include "src/SparseCore/SparseCwiseBinaryOp.h" 47 | #include "src/SparseCore/SparseDot.h" 48 | #include "src/SparseCore/SparsePermutation.h" 49 | #include "src/SparseCore/SparseRedux.h" 50 | #include "src/SparseCore/SparseFuzzy.h" 51 | #include "src/SparseCore/ConservativeSparseSparseProduct.h" 52 | #include "src/SparseCore/SparseSparseProductWithPruning.h" 53 | #include "src/SparseCore/SparseProduct.h" 54 | #include "src/SparseCore/SparseDenseProduct.h" 55 | #include "src/SparseCore/SparseDiagonalProduct.h" 56 | #include "src/SparseCore/SparseTriangularView.h" 57 | #include "src/SparseCore/SparseSelfAdjointView.h" 58 | #include "src/SparseCore/TriangularSolver.h" 59 | #include "src/SparseCore/SparseView.h" 60 | 61 | #include "src/Core/util/ReenableStupidWarnings.h" 62 | 63 | #endif // EIGEN_SPARSECORE_MODULE_H 64 | 65 | -------------------------------------------------------------------------------- /src/tools/include/yaml-cpp/ostream_wrapper.h: -------------------------------------------------------------------------------- 1 | #ifndef OSTREAM_WRAPPER_H_62B23520_7C8E_11DE_8A39_0800200C9A66 2 | #define OSTREAM_WRAPPER_H_62B23520_7C8E_11DE_8A39_0800200C9A66 3 | 4 | #if defined(_MSC_VER) || (defined(__GNUC__) && (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || (__GNUC__ >= 4)) // GCC supports "pragma once" correctly since 3.4 5 | #pragma once 6 | #endif 7 | 8 | 9 | #include 10 | #include 11 | 12 | namespace YAML 13 | { 14 | class ostream_wrapper 15 | { 16 | public: 17 | ostream_wrapper(); 18 | explicit ostream_wrapper(std::ostream& stream); 19 | ~ostream_wrapper(); 20 | 21 | void write(const std::string& str); 22 | void write(const char *str, std::size_t size); 23 | 24 | void set_comment() { m_comment = true; } 25 | 26 | const char *str() const { 27 | if(m_pStream) { 28 | return 0; 29 | } else { 30 | m_buffer[m_pos] = '\0'; 31 | return &m_buffer[0]; 32 | } 33 | } 34 | 35 | std::size_t row() const { return m_row; } 36 | std::size_t col() const { return m_col; } 37 | std::size_t pos() const { return m_pos; } 38 | bool comment() const { return m_comment; } 39 | 40 | private: 41 | void update_pos(char ch); 42 | 43 | private: 44 | mutable std::vector m_buffer; 45 | std::ostream *m_pStream; 46 | 47 | std::size_t m_pos; 48 | std::size_t m_row, m_col; 49 | bool m_comment; 50 | }; 51 | 52 | template 53 | inline ostream_wrapper& operator << (ostream_wrapper& stream, const char (&str)[N]) { 54 | stream.write(str, N-1); 55 | return stream; 56 | } 57 | 58 | inline ostream_wrapper& operator << (ostream_wrapper& stream, const std::string& str) { 59 | stream.write(str); 60 | return stream; 61 | } 62 | 63 | inline ostream_wrapper& operator << (ostream_wrapper& stream, char ch) { 64 | stream.write(&ch, 1); 65 | return stream; 66 | } 67 | } 68 | 69 | #endif // OSTREAM_WRAPPER_H_62B23520_7C8E_11DE_8A39_0800200C9A66 70 | -------------------------------------------------------------------------------- /src/tools/include/Eigen/src/plugins/CommonCwiseBinaryOps.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2008-2009 Gael Guennebaud 5 | // Copyright (C) 2006-2008 Benoit Jacob 6 | // 7 | // This Source Code Form is subject to the terms of the Mozilla 8 | // Public License v. 2.0. If a copy of the MPL was not distributed 9 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 10 | 11 | // This file is a base class plugin containing common coefficient wise functions. 12 | 13 | /** \returns an expression of the difference of \c *this and \a other 14 | * 15 | * \note If you want to substract a given scalar from all coefficients, see Cwise::operator-(). 16 | * 17 | * \sa class CwiseBinaryOp, operator-=() 18 | */ 19 | EIGEN_MAKE_CWISE_BINARY_OP(operator-,internal::scalar_difference_op) 20 | 21 | /** \returns an expression of the sum of \c *this and \a other 22 | * 23 | * \note If you want to add a given scalar to all coefficients, see Cwise::operator+(). 24 | * 25 | * \sa class CwiseBinaryOp, operator+=() 26 | */ 27 | EIGEN_MAKE_CWISE_BINARY_OP(operator+,internal::scalar_sum_op) 28 | 29 | /** \returns an expression of a custom coefficient-wise operator \a func of *this and \a other 30 | * 31 | * The template parameter \a CustomBinaryOp is the type of the functor 32 | * of the custom operator (see class CwiseBinaryOp for an example) 33 | * 34 | * Here is an example illustrating the use of custom functors: 35 | * \include class_CwiseBinaryOp.cpp 36 | * Output: \verbinclude class_CwiseBinaryOp.out 37 | * 38 | * \sa class CwiseBinaryOp, operator+(), operator-(), cwiseProduct() 39 | */ 40 | template 41 | EIGEN_STRONG_INLINE const CwiseBinaryOp 42 | binaryExpr(const EIGEN_CURRENT_STORAGE_BASE_CLASS &other, const CustomBinaryOp& func = CustomBinaryOp()) const 43 | { 44 | return CwiseBinaryOp(derived(), other.derived(), func); 45 | } 46 | 47 | -------------------------------------------------------------------------------- /src/tools/include/Eigen/SuperLUSupport: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_SUPERLUSUPPORT_MODULE_H 2 | #define EIGEN_SUPERLUSUPPORT_MODULE_H 3 | 4 | #include "SparseCore" 5 | 6 | #include "src/Core/util/DisableStupidWarnings.h" 7 | 8 | #ifdef EMPTY 9 | #define EIGEN_EMPTY_WAS_ALREADY_DEFINED 10 | #endif 11 | 12 | typedef int int_t; 13 | #include 14 | #include 15 | #include 16 | 17 | // slu_util.h defines a preprocessor token named EMPTY which is really polluting, 18 | // so we remove it in favor of a SUPERLU_EMPTY token. 19 | // If EMPTY was already defined then we don't undef it. 20 | 21 | #if defined(EIGEN_EMPTY_WAS_ALREADY_DEFINED) 22 | # undef EIGEN_EMPTY_WAS_ALREADY_DEFINED 23 | #elif defined(EMPTY) 24 | # undef EMPTY 25 | #endif 26 | 27 | #define SUPERLU_EMPTY (-1) 28 | 29 | namespace Eigen { struct SluMatrix; } 30 | 31 | /** \ingroup Support_modules 32 | * \defgroup SuperLUSupport_Module SuperLUSupport module 33 | * 34 | * This module provides an interface to the SuperLU library. 35 | * It provides the following factorization class: 36 | * - class SuperLU: a supernodal sequential LU factorization. 37 | * - class SuperILU: a supernodal sequential incomplete LU factorization (to be used as a preconditioner for iterative methods). 38 | * 39 | * \warning When including this module, you have to use SUPERLU_EMPTY instead of EMPTY which is no longer defined because it is too polluting. 40 | * 41 | * \code 42 | * #include 43 | * \endcode 44 | * 45 | * In order to use this module, the superlu headers must be accessible from the include paths, and your binary must be linked to the superlu library and its dependencies. 46 | * The dependencies depend on how superlu has been compiled. 47 | * For a cmake based project, you can use our FindSuperLU.cmake module to help you in this task. 48 | * 49 | */ 50 | 51 | #include "src/misc/Solve.h" 52 | #include "src/misc/SparseSolve.h" 53 | 54 | #include "src/SuperLUSupport/SuperLUSupport.h" 55 | 56 | 57 | #include "src/Core/util/ReenableStupidWarnings.h" 58 | 59 | #endif // EIGEN_SUPERLUSUPPORT_MODULE_H 60 | -------------------------------------------------------------------------------- /src/job_tracker/scheduler.h: -------------------------------------------------------------------------------- 1 | /* 2 | *Copyright 2015 NTU (http://www.ntu.edu.sg/) 3 | *Licensed under the Apache License, Version 2.0 (the "License"); 4 | *you may not use this file except in compliance with the License. 5 | *You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | *Unless required by applicable law or agreed to in writing, software 10 | *distributed under the License is distributed on an "AS IS" BASIS, 11 | *WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | *See the License for the specific language governing permissions and 13 | *limitations under the License. 14 | */ 15 | 16 | #ifndef NTU_CAP_UNICAP_JOB_TRACKER_SCHEDULER_H_ 17 | #define NTU_CAP_UNICAP_JOB_TRACKER_SCHEDULER_H_ 18 | 19 | #include 20 | #include 21 | #include "stage.h" 22 | 23 | namespace ntu { 24 | namespace cap { 25 | 26 | class Scheduler { 27 | public: 28 | 29 | static Scheduler& singleton() { 30 | static Scheduler scheduler; 31 | return scheduler; 32 | } 33 | 34 | int64_t push_back(std::shared_ptr new_stage) { 35 | int64_t id = _stage_pool.size(); 36 | new_stage->_stage_id = id; 37 | _stage_pool.push_back(new_stage); 38 | _stage_num = _stage_pool.size(); 39 | return id; 40 | } 41 | 42 | int64_t fetch_cpu_task(TaskNode& _return, const int64_t task_tracker_id) { 43 | for (int64_t i = 0; i < _stage_num; ++i) { 44 | if (_stage_pool[i]->_complete_task.size() != _stage_pool[i]->size()) { 45 | _stage_pool[i]->fetch_task(task_tracker_id, _return); 46 | break; 47 | } 48 | } 49 | return 1; 50 | } 51 | 52 | bool check_status(int64_t id) { 53 | if (_stage_pool[id]->_complete_task.size() != _stage_pool[id]->size()) { 54 | return false; 55 | } else { 56 | return true; 57 | } 58 | } 59 | 60 | //stage_id stage 61 | std::vector> _stage_pool; 62 | int64_t _stage_num; 63 | }; 64 | 65 | } 66 | } 67 | 68 | #endif /* UNICAP_JOB_TRACKER_SCHEDULER_H_ */ 69 | -------------------------------------------------------------------------------- /src/tools/include/leveldb/write_batch.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2011 The LevelDB Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. See the AUTHORS file for names of contributors. 4 | // 5 | // WriteBatch holds a collection of updates to apply atomically to a DB. 6 | // 7 | // The updates are applied in the order in which they are added 8 | // to the WriteBatch. For example, the value of "key" will be "v3" 9 | // after the following batch is written: 10 | // 11 | // batch.Put("key", "v1"); 12 | // batch.Delete("key"); 13 | // batch.Put("key", "v2"); 14 | // batch.Put("key", "v3"); 15 | // 16 | // Multiple threads can invoke const methods on a WriteBatch without 17 | // external synchronization, but if any of the threads may call a 18 | // non-const method, all threads accessing the same WriteBatch must use 19 | // external synchronization. 20 | 21 | #ifndef STORAGE_LEVELDB_INCLUDE_WRITE_BATCH_H_ 22 | #define STORAGE_LEVELDB_INCLUDE_WRITE_BATCH_H_ 23 | 24 | #include 25 | #include "leveldb/status.h" 26 | 27 | namespace leveldb { 28 | 29 | class Slice; 30 | 31 | class WriteBatch { 32 | public: 33 | WriteBatch(); 34 | ~WriteBatch(); 35 | 36 | // Store the mapping "key->value" in the database. 37 | void Put(const Slice& key, const Slice& value); 38 | 39 | // If the database contains a mapping for "key", erase it. Else do nothing. 40 | void Delete(const Slice& key); 41 | 42 | // Clear all updates buffered in this batch. 43 | void Clear(); 44 | 45 | // Support for iterating over the contents of a batch. 46 | class Handler { 47 | public: 48 | virtual ~Handler(); 49 | virtual void Put(const Slice& key, const Slice& value) = 0; 50 | virtual void Delete(const Slice& key) = 0; 51 | }; 52 | Status Iterate(Handler* handler) const; 53 | 54 | private: 55 | friend class WriteBatchInternal; 56 | 57 | std::string rep_; // See comment in write_batch.cc for the format of rep_ 58 | 59 | // Intentionally copyable 60 | }; 61 | 62 | } // namespace leveldb 63 | 64 | #endif // STORAGE_LEVELDB_INCLUDE_WRITE_BATCH_H_ 65 | -------------------------------------------------------------------------------- /src/job_tracker/job_tracker_handler.h: -------------------------------------------------------------------------------- 1 | /* 2 | *Copyright 2015 NTU (http://www.ntu.edu.sg/) 3 | *Licensed under the Apache License, Version 2.0 (the "License"); 4 | *you may not use this file except in compliance with the License. 5 | *You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | *Unless required by applicable law or agreed to in writing, software 10 | *distributed under the License is distributed on an "AS IS" BASIS, 11 | *WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | *See the License for the specific language governing permissions and 13 | *limitations under the License. 14 | */ 15 | 16 | #ifndef NTU_CAP_UNICAP_JOB_TRACKER_JOB_TRACKER_HANDLER_H_ 17 | #define NTU_CAP_UNICAP_JOB_TRACKER_JOB_TRACKER_HANDLER_H_ 18 | 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | #include "../gen/JobTracker.h" 25 | #include "../common/node_info.h" 26 | #include "../common/storage_info.h" 27 | #include "../computing/cpu_functions.h" 28 | #include "../../app/user_cpu_functions.h" 29 | #include "scheduler.h" 30 | 31 | namespace ntu { 32 | namespace cap { 33 | 34 | class JobTrackerHandler : virtual public JobTrackerIf { 35 | public: 36 | JobTrackerHandler(); 37 | 38 | int64_t register_task_tracker(const int64_t node_id, 39 | const std::string& node_name, 40 | const int64_t storage_weight); 41 | 42 | void get_all_task_tracker_info(std::map & _return); 44 | 45 | void fetch_cpu_task(TaskNode& _return, const int64_t task_tracker_id); 46 | 47 | void fetch_gpu_task(TaskNode& _return, const int64_t task_tracker_id); 48 | 49 | int64_t complete_cpu_task(const int64_t stage_id, const int64_t task_id); 50 | 51 | int64_t complete_gpu_task(const int64_t stage_id, const int64_t task_id); 52 | 53 | private: 54 | std::mutex _register_lock; 55 | int64_t _base_port = NodeInfo::singleton()._master_port + 100; 56 | }; 57 | 58 | } 59 | } 60 | #endif /* UNICAP_JOB_TRACKER_JOB_TRACKER_HANDLER_H_ */ 61 | -------------------------------------------------------------------------------- /src/tools/include/boost/threadpool/pool_adaptors.hpp: -------------------------------------------------------------------------------- 1 | /*! \file 2 | * \brief Pool adaptors. 3 | * 4 | * This file contains an easy-to-use adaptor similar to a smart 5 | * pointer for the pool class. 6 | * 7 | * Copyright (c) 2005-2007 Philipp Henkel 8 | * 9 | * Use, modification, and distribution are subject to the 10 | * Boost Software License, Version 1.0. (See accompanying file 11 | * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 12 | * 13 | * http://threadpool.sourceforge.net 14 | * 15 | */ 16 | 17 | 18 | #ifndef THREADPOOL_POOL_ADAPTORS_HPP_INCLUDED 19 | #define THREADPOOL_POOL_ADAPTORS_HPP_INCLUDED 20 | 21 | #include 22 | 23 | 24 | namespace boost { 25 | namespace threadpool { 26 | 27 | 28 | // TODO convenience scheduling function 29 | /*! Schedules a Runnable for asynchronous execution. A Runnable is an arbitrary class with a run() 30 | * member function. This a convenience shorthand for pool->schedule(bind(&Runnable::run, task_object)). 31 | * \param 32 | * \param obj The Runnable object. The member function run() will be exectued and should not throw execeptions. 33 | * \return true, if the task could be scheduled and false otherwise. 34 | */ 35 | template 36 | bool schedule(Pool& pool, shared_ptr const & obj) { 37 | return pool->schedule(bind(&Runnable::run, obj)); 38 | } 39 | 40 | /*! Schedules a task for asynchronous execution. The task will be executed once only. 41 | * \param task The task function object. 42 | */ 43 | template 44 | typename enable_if < 45 | is_void< typename result_of< typename Pool::task_type() >::type >, 46 | bool 47 | >::type 48 | schedule(Pool& pool, typename Pool::task_type const & task) { 49 | return pool.schedule(task); 50 | } 51 | 52 | 53 | template 54 | typename enable_if < 55 | is_void< typename result_of< typename Pool::task_type() >::type >, 56 | bool 57 | >::type 58 | schedule(shared_ptr const pool, typename Pool::task_type const & task) { 59 | return pool->schedule(task); 60 | } 61 | 62 | 63 | } 64 | } // namespace boost::threadpool 65 | 66 | #endif // THREADPOOL_POOL_ADAPTORS_HPP_INCLUDED 67 | 68 | 69 | -------------------------------------------------------------------------------- /src/tools/include/yaml-cpp/node/detail/iterator.h: -------------------------------------------------------------------------------- 1 | #ifndef VALUE_DETAIL_ITERATOR_H_62B23520_7C8E_11DE_8A39_0800200C9A66 2 | #define VALUE_DETAIL_ITERATOR_H_62B23520_7C8E_11DE_8A39_0800200C9A66 3 | 4 | #if defined(_MSC_VER) || (defined(__GNUC__) && (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || (__GNUC__ >= 4)) // GCC supports "pragma once" correctly since 3.4 5 | #pragma once 6 | #endif 7 | 8 | 9 | #include "yaml-cpp/dll.h" 10 | #include "yaml-cpp/node/ptr.h" 11 | #include "yaml-cpp/node/detail/node_iterator.h" 12 | #include 13 | #include 14 | 15 | namespace YAML 16 | { 17 | namespace detail 18 | { 19 | struct iterator_value; 20 | 21 | template 22 | class iterator_base: public boost::iterator_adaptor< 23 | iterator_base, 24 | node_iterator, 25 | V, 26 | std::forward_iterator_tag, 27 | V> 28 | { 29 | private: 30 | template friend class iterator_base; 31 | struct enabler {}; 32 | typedef typename iterator_base::base_type base_type; 33 | 34 | public: 35 | typedef typename iterator_base::value_type value_type; 36 | 37 | public: 38 | iterator_base() {} 39 | explicit iterator_base(base_type rhs, shared_memory_holder pMemory): iterator_base::iterator_adaptor_(rhs), m_pMemory(pMemory) {} 40 | 41 | template 42 | iterator_base(const iterator_base& rhs, typename boost::enable_if, enabler>::type = enabler()): iterator_base::iterator_adaptor_(rhs.base()), m_pMemory(rhs.m_pMemory) {} 43 | 44 | private: 45 | friend class boost::iterator_core_access; 46 | 47 | void increment() { this->base_reference() = boost::next(this->base()); } 48 | 49 | value_type dereference() const { 50 | const typename base_type::value_type& v = *this->base(); 51 | if(v.pNode) 52 | return value_type(Node(*v, m_pMemory)); 53 | if(v.first && v.second) 54 | return value_type(Node(*v.first, m_pMemory), Node(*v.second, m_pMemory)); 55 | return value_type(); 56 | } 57 | 58 | private: 59 | shared_memory_holder m_pMemory; 60 | }; 61 | } 62 | } 63 | 64 | #endif // VALUE_DETAIL_ITERATOR_H_62B23520_7C8E_11DE_8A39_0800200C9A66 65 | -------------------------------------------------------------------------------- /src/tools/include/Eigen/src/Core/CoreIterators.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2008-2010 Gael Guennebaud 5 | // 6 | // This Source Code Form is subject to the terms of the Mozilla 7 | // Public License v. 2.0. If a copy of the MPL was not distributed 8 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 9 | 10 | #ifndef EIGEN_COREITERATORS_H 11 | #define EIGEN_COREITERATORS_H 12 | 13 | namespace Eigen { 14 | 15 | /* This file contains the respective InnerIterator definition of the expressions defined in Eigen/Core 16 | */ 17 | 18 | /** \ingroup SparseCore_Module 19 | * \class InnerIterator 20 | * \brief An InnerIterator allows to loop over the element of a sparse (or dense) matrix or expression 21 | * 22 | * todo 23 | */ 24 | 25 | // generic version for dense matrix and expressions 26 | template class DenseBase::InnerIterator 27 | { 28 | protected: 29 | typedef typename Derived::Scalar Scalar; 30 | typedef typename Derived::Index Index; 31 | 32 | enum { IsRowMajor = (Derived::Flags&RowMajorBit)==RowMajorBit }; 33 | public: 34 | EIGEN_STRONG_INLINE InnerIterator(const Derived& expr, Index outer) 35 | : m_expression(expr), m_inner(0), m_outer(outer), m_end(expr.innerSize()) 36 | {} 37 | 38 | EIGEN_STRONG_INLINE Scalar value() const 39 | { 40 | return (IsRowMajor) ? m_expression.coeff(m_outer, m_inner) 41 | : m_expression.coeff(m_inner, m_outer); 42 | } 43 | 44 | EIGEN_STRONG_INLINE InnerIterator& operator++() { m_inner++; return *this; } 45 | 46 | EIGEN_STRONG_INLINE Index index() const { return m_inner; } 47 | inline Index row() const { return IsRowMajor ? m_outer : index(); } 48 | inline Index col() const { return IsRowMajor ? index() : m_outer; } 49 | 50 | EIGEN_STRONG_INLINE operator bool() const { return m_inner < m_end && m_inner>=0; } 51 | 52 | protected: 53 | const Derived& m_expression; 54 | Index m_inner; 55 | const Index m_outer; 56 | const Index m_end; 57 | }; 58 | 59 | } // end namespace Eigen 60 | 61 | #endif // EIGEN_COREITERATORS_H 62 | -------------------------------------------------------------------------------- /src/tools/include/opencv2/flann/general.h: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | * Software License Agreement (BSD License) 3 | * 4 | * Copyright 2008-2009 Marius Muja (mariusm@cs.ubc.ca). All rights reserved. 5 | * Copyright 2008-2009 David G. Lowe (lowe@cs.ubc.ca). All rights reserved. 6 | * 7 | * THE BSD LICENSE 8 | * 9 | * Redistribution and use in source and binary forms, with or without 10 | * modification, are permitted provided that the following conditions 11 | * are met: 12 | * 13 | * 1. Redistributions of source code must retain the above copyright 14 | * notice, this list of conditions and the following disclaimer. 15 | * 2. Redistributions in binary form must reproduce the above copyright 16 | * notice, this list of conditions and the following disclaimer in the 17 | * documentation and/or other materials provided with the distribution. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 20 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 21 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 22 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 23 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 24 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 28 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | *************************************************************************/ 30 | 31 | #ifndef OPENCV_FLANN_GENERAL_H_ 32 | #define OPENCV_FLANN_GENERAL_H_ 33 | 34 | #include "defines.h" 35 | #include 36 | #include 37 | 38 | namespace cvflann 39 | { 40 | 41 | class FLANNException : public std::runtime_error 42 | { 43 | public: 44 | FLANNException(const char* message) : std::runtime_error(message) { } 45 | 46 | FLANNException(const std::string& message) : std::runtime_error(message) { } 47 | }; 48 | 49 | } 50 | 51 | 52 | #endif /* OPENCV_FLANN_GENERAL_H_ */ 53 | -------------------------------------------------------------------------------- /src/tools/include/boost/threadpool/shutdown_policies.hpp: -------------------------------------------------------------------------------- 1 | /*! \file 2 | * \brief Shutdown policies. 3 | * 4 | * This file contains shutdown policies for thread_pool. 5 | * A shutdown policy controls the pool's behavior from the time 6 | * when the pool is not referenced any longer. 7 | * 8 | * Copyright (c) 2005-2007 Philipp Henkel 9 | * 10 | * Use, modification, and distribution are subject to the 11 | * Boost Software License, Version 1.0. (See accompanying file 12 | * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 13 | * 14 | * http://threadpool.sourceforge.net 15 | * 16 | */ 17 | 18 | 19 | #ifndef THREADPOOL_SHUTDOWN_POLICIES_HPP_INCLUDED 20 | #define THREADPOOL_SHUTDOWN_POLICIES_HPP_INCLUDED 21 | 22 | 23 | 24 | /// The namespace threadpool contains a thread pool and related utility classes. 25 | namespace boost { 26 | namespace threadpool { 27 | 28 | 29 | /*! \brief ShutdownPolicy which waits for the completion of all tasks 30 | * and the worker termination afterwards. 31 | * 32 | * \param Pool The pool's core type. 33 | */ 34 | template 35 | class wait_for_all_tasks { 36 | public: 37 | static void shutdown(Pool& pool) { 38 | pool.wait(); 39 | pool.terminate_all_workers(true); 40 | } 41 | }; 42 | 43 | 44 | /*! \brief ShutdownPolicy which waits for the completion of all active tasks 45 | * and the worker termination afterwards. 46 | * 47 | * \param Pool The pool's core type. 48 | */ 49 | template 50 | class wait_for_active_tasks { 51 | public: 52 | static void shutdown(Pool& pool) { 53 | pool.clear(); 54 | pool.wait(); 55 | pool.terminate_all_workers(true); 56 | } 57 | }; 58 | 59 | 60 | /*! \brief ShutdownPolicy which does not wait for any tasks or worker termination. 61 | * 62 | * This policy does not wait for any tasks. Nevertheless all active tasks will be processed completely. 63 | * 64 | * \param Pool The pool's core type. 65 | */ 66 | template 67 | class immediately { 68 | public: 69 | static void shutdown(Pool& pool) { 70 | pool.clear(); 71 | pool.terminate_all_workers(false); 72 | } 73 | }; 74 | 75 | } 76 | } // namespace boost::threadpool 77 | 78 | #endif // THREADPOOL_SHUTDOWN_POLICIES_HPP_INCLUDED 79 | -------------------------------------------------------------------------------- /src/tools/include/Eigen/src/Core/util/DisableStupidWarnings.h: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_WARNINGS_DISABLED 2 | #define EIGEN_WARNINGS_DISABLED 3 | 4 | #ifdef _MSC_VER 5 | // 4100 - unreferenced formal parameter (occurred e.g. in aligned_allocator::destroy(pointer p)) 6 | // 4101 - unreferenced local variable 7 | // 4127 - conditional expression is constant 8 | // 4181 - qualifier applied to reference type ignored 9 | // 4211 - nonstandard extension used : redefined extern to static 10 | // 4244 - 'argument' : conversion from 'type1' to 'type2', possible loss of data 11 | // 4273 - QtAlignedMalloc, inconsistent DLL linkage 12 | // 4324 - structure was padded due to declspec(align()) 13 | // 4512 - assignment operator could not be generated 14 | // 4522 - 'class' : multiple assignment operators specified 15 | // 4700 - uninitialized local variable 'xyz' used 16 | // 4717 - 'function' : recursive on all control paths, function will cause runtime stack overflow 17 | #ifndef EIGEN_PERMANENTLY_DISABLE_STUPID_WARNINGS 18 | #pragma warning( push ) 19 | #endif 20 | #pragma warning( disable : 4100 4101 4127 4181 4211 4244 4273 4324 4512 4522 4700 4717 ) 21 | #elif defined __INTEL_COMPILER 22 | // 2196 - routine is both "inline" and "noinline" ("noinline" assumed) 23 | // ICC 12 generates this warning even without any inline keyword, when defining class methods 'inline' i.e. inside of class body 24 | // typedef that may be a reference type. 25 | // 279 - controlling expression is constant 26 | // ICC 12 generates this warning on assert(constant_expression_depending_on_template_params) and frankly this is a legitimate use case. 27 | #ifndef EIGEN_PERMANENTLY_DISABLE_STUPID_WARNINGS 28 | #pragma warning push 29 | #endif 30 | #pragma warning disable 2196 279 31 | #elif defined __clang__ 32 | // -Wconstant-logical-operand - warning: use of logical && with constant operand; switch to bitwise & or remove constant 33 | // this is really a stupid warning as it warns on compile-time expressions involving enums 34 | #ifndef EIGEN_PERMANENTLY_DISABLE_STUPID_WARNINGS 35 | #pragma clang diagnostic push 36 | #endif 37 | #pragma clang diagnostic ignored "-Wconstant-logical-operand" 38 | #endif 39 | 40 | #endif // not EIGEN_WARNINGS_DISABLED 41 | -------------------------------------------------------------------------------- /src/tools/include/yaml-cpp/traits.h: -------------------------------------------------------------------------------- 1 | #ifndef TRAITS_H_62B23520_7C8E_11DE_8A39_0800200C9A66 2 | #define TRAITS_H_62B23520_7C8E_11DE_8A39_0800200C9A66 3 | 4 | #if defined(_MSC_VER) || (defined(__GNUC__) && (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || (__GNUC__ >= 4)) // GCC supports "pragma once" correctly since 3.4 5 | #pragma once 6 | #endif 7 | 8 | 9 | namespace YAML 10 | { 11 | template 12 | struct is_numeric { enum { value = false }; }; 13 | 14 | template <> struct is_numeric { enum { value = true }; }; 15 | template <> struct is_numeric { enum { value = true }; }; 16 | template <> struct is_numeric { enum { value = true }; }; 17 | template <> struct is_numeric { enum { value = true }; }; 18 | template <> struct is_numeric { enum { value = true }; }; 19 | template <> struct is_numeric { enum { value = true }; }; 20 | template <> struct is_numeric { enum { value = true }; }; 21 | template <> struct is_numeric { enum { value = true }; }; 22 | #if defined(_MSC_VER) && (_MSC_VER < 1310) 23 | template <> struct is_numeric <__int64> { enum { value = true }; }; 24 | template <> struct is_numeric { enum { value = true }; }; 25 | #else 26 | template <> struct is_numeric { enum { value = true }; }; 27 | template <> struct is_numeric { enum { value = true }; }; 28 | #endif 29 | template <> struct is_numeric { enum { value = true }; }; 30 | template <> struct is_numeric { enum { value = true }; }; 31 | template <> struct is_numeric { enum { value = true }; }; 32 | 33 | template 34 | struct enable_if_c { 35 | typedef T type; 36 | }; 37 | 38 | template 39 | struct enable_if_c {}; 40 | 41 | template 42 | struct enable_if : public enable_if_c {}; 43 | 44 | template 45 | struct disable_if_c { 46 | typedef T type; 47 | }; 48 | 49 | template 50 | struct disable_if_c {}; 51 | 52 | template 53 | struct disable_if : public disable_if_c {}; 54 | } 55 | 56 | #endif // TRAITS_H_62B23520_7C8E_11DE_8A39_0800200C9A66 57 | 58 | -------------------------------------------------------------------------------- /src/job_tracker/stage.h: -------------------------------------------------------------------------------- 1 | /* 2 | *Copyright 2015 NTU (http://www.ntu.edu.sg/) 3 | *Licensed under the Apache License, Version 2.0 (the "License"); 4 | *you may not use this file except in compliance with the License. 5 | *You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | *Unless required by applicable law or agreed to in writing, software 10 | *distributed under the License is distributed on an "AS IS" BASIS, 11 | *WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | *See the License for the specific language governing permissions and 13 | *limitations under the License. 14 | */ 15 | 16 | #ifndef UNICAP_JOB_TRACKER_STAGE_H_ 17 | #define UNICAP_JOB_TRACKER_STAGE_H_ 18 | 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | #include 25 | #include "../common/table.h" 26 | #include "../common/column_family.h" 27 | #include "../common/storage_info.h" 28 | #include "../../app/user_cpu_functions.h" 29 | 30 | namespace ntu { 31 | namespace cap { 32 | 33 | class Stage { 34 | public: 35 | 36 | Stage(); 37 | 38 | int64_t set_function_name(std::string function_name); 39 | 40 | int64_t set_src(std::string src_table, std::vector src_cf); 41 | 42 | int64_t non_src(int64_t task_num); 43 | 44 | int64_t set_dst(std::string dst_table, std::string dst_cf); 45 | 46 | uint64_t size(); 47 | 48 | int64_t fetch_task(int64_t node_id, TaskNode &new_task); 49 | 50 | int64_t complete_task(int64_t task_id); 51 | 52 | // static int64_t _stage_num; 53 | int64_t _stage_id; 54 | std::string _function_name; 55 | std::string _src_table; 56 | std::vector _src_cf; 57 | std::string _dst_table; 58 | std::string _dst_cf; 59 | 60 | uint64_t _size; 61 | 62 | //task id - shard id - cf name 63 | std::map> _wait_task; 64 | std::map> _executing_task; 65 | std::map> _complete_task; 66 | 67 | std::map> _shard_allocation ; 68 | 69 | std::mutex _lock; 70 | }; 71 | 72 | } 73 | } 74 | #endif /* UNICAP_JOB_TRACKER_STAGE_H_ */ 75 | -------------------------------------------------------------------------------- /src/common/node_info.h: -------------------------------------------------------------------------------- 1 | /* 2 | *Copyright 2015 NTU (http://www.ntu.edu.sg/) 3 | *Licensed under the Apache License, Version 2.0 (the "License"); 4 | *you may not use this file except in compliance with the License. 5 | *You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | *Unless required by applicable law or agreed to in writing, software 10 | *distributed under the License is distributed on an "AS IS" BASIS, 11 | *WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | *See the License for the specific language governing permissions and 13 | *limitations under the License. 14 | */ 15 | 16 | #ifndef NTU_CAP_UNICAP_JOB_TRACKER_NODE_INFO_H_ 17 | #define NTU_CAP_UNICAP_JOB_TRACKER_NODE_INFO_H_ 18 | 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include "../gen/JobTracker.h" 27 | #include "../gen/TaskTracker.h" 28 | #include "unicap_client.h" 29 | 30 | namespace ntu { 31 | namespace cap { 32 | 33 | class NodeInfo { 34 | public: 35 | NodeInfo(); 36 | 37 | static NodeInfo& singleton(); 38 | 39 | //map> 40 | std::map _task_tracker_info; 41 | //number of task trackers in each physical node 42 | std::map _physical_node_info; 43 | 44 | int64_t _task_tracker_number; 45 | int64_t _ready_task_tracker_number; 46 | int _node_id; 47 | int _node_num; 48 | int _name_length; 49 | int64_t _port; 50 | int64_t _storage_weight; 51 | char _processor_name[256]; 52 | std::string _host_name; 53 | std::string _app_name; 54 | std::string _root_dir; 55 | std::string _master_host_name; 56 | std::string _hdfs_namenode; 57 | int64_t _master_port; 58 | int64_t _hdfs_namenode_port; 59 | std::vector _storage_weight_pool; 60 | 61 | typedef boost::shared_ptr> ClientToJobPtr; 62 | ClientToJobPtr _client_job_tracker; 63 | 64 | typedef boost::shared_ptr> ClientToTaskPtr; 65 | std::unordered_map _client_task_tracker; 66 | }; 67 | 68 | } 69 | } 70 | #endif /* UNICAP_JOB_TRACKER_NODE_INFO_H_ */ 71 | -------------------------------------------------------------------------------- /src/tools/include/opencv2/gpu/gpumat.hpp: -------------------------------------------------------------------------------- 1 | /*M/////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 4 | // 5 | // By downloading, copying, installing or using the software you agree to this license. 6 | // If you do not agree to this license, do not download, install, 7 | // copy or use the software. 8 | // 9 | // 10 | // License Agreement 11 | // For Open Source Computer Vision Library 12 | // 13 | // Copyright (C) 2000-2008, Intel Corporation, all rights reserved. 14 | // Copyright (C) 2009, Willow Garage Inc., all rights reserved. 15 | // Third party copyrights are property of their respective owners. 16 | // 17 | // Redistribution and use in source and binary forms, with or without modification, 18 | // are permitted provided that the following conditions are met: 19 | // 20 | // * Redistribution's of source code must retain the above copyright notice, 21 | // this list of conditions and the following disclaimer. 22 | // 23 | // * Redistribution's in binary form must reproduce the above copyright notice, 24 | // this list of conditions and the following disclaimer in the documentation 25 | // and/or other materials provided with the distribution. 26 | // 27 | // * The name of the copyright holders may not be used to endorse or promote products 28 | // derived from this software without specific prior written permission. 29 | // 30 | // This software is provided by the copyright holders and contributors "as is" and 31 | // any express or implied warranties, including, but not limited to, the implied 32 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 33 | // In no event shall the Intel Corporation or contributors be liable for any direct, 34 | // indirect, incidental, special, exemplary, or consequential damages 35 | // (including, but not limited to, procurement of substitute goods or services; 36 | // loss of use, data, or profits; or business interruption) however caused 37 | // and on any theory of liability, whether in contract, strict liability, 38 | // or tort (including negligence or otherwise) arising in any way out of 39 | // the use of this software, even if advised of the possibility of such damage. 40 | // 41 | //M*/ 42 | 43 | #include "opencv2/core/gpumat.hpp" 44 | -------------------------------------------------------------------------------- /src/tools/include/yaml-cpp/binary.h: -------------------------------------------------------------------------------- 1 | #ifndef BASE64_H_62B23520_7C8E_11DE_8A39_0800200C9A66 2 | #define BASE64_H_62B23520_7C8E_11DE_8A39_0800200C9A66 3 | 4 | #if defined(_MSC_VER) || (defined(__GNUC__) && (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || (__GNUC__ >= 4)) // GCC supports "pragma once" correctly since 3.4 5 | #pragma once 6 | #endif 7 | 8 | #include 9 | #include 10 | 11 | namespace YAML 12 | { 13 | std::string EncodeBase64(const unsigned char *data, std::size_t size); 14 | std::vector DecodeBase64(const std::string& input); 15 | 16 | class Binary { 17 | public: 18 | Binary(): m_unownedData(0), m_unownedSize(0) {} 19 | Binary(const unsigned char *data_, std::size_t size_): m_unownedData(data_), m_unownedSize(size_) {} 20 | 21 | bool owned() const { return !m_unownedData; } 22 | std::size_t size() const { return owned() ? m_data.size() : m_unownedSize; } 23 | const unsigned char *data() const { return owned() ? &m_data[0] : m_unownedData; } 24 | 25 | void swap(std::vector& rhs) { 26 | if(m_unownedData) { 27 | m_data.swap(rhs); 28 | rhs.clear(); 29 | rhs.resize(m_unownedSize); 30 | std::copy(m_unownedData, m_unownedData + m_unownedSize, &rhs[0]); 31 | m_unownedData = 0; 32 | m_unownedSize = 0; 33 | } else { 34 | m_data.swap(rhs); 35 | } 36 | } 37 | 38 | bool operator == (const Binary& rhs) const { 39 | const std::size_t s = size(); 40 | if(s != rhs.size()) 41 | return false; 42 | const unsigned char *d1 = data(); 43 | const unsigned char *d2 = rhs.data(); 44 | for(std::size_t i=0;i m_data; 57 | const unsigned char *m_unownedData; 58 | std::size_t m_unownedSize; 59 | }; 60 | } 61 | 62 | #endif // BASE64_H_62B23520_7C8E_11DE_8A39_0800200C9A66 63 | -------------------------------------------------------------------------------- /src/tools/include/opencv/cvwimage.h: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 3 | // 4 | // By downloading, copying, installing or using the software you agree to 5 | // this license. If you do not agree to this license, do not download, 6 | // install, copy or use the software. 7 | // 8 | // License Agreement 9 | // For Open Source Computer Vision Library 10 | // 11 | // Copyright (C) 2008, Google, all rights reserved. 12 | // Third party copyrights are property of their respective owners. 13 | // 14 | // Redistribution and use in source and binary forms, with or without 15 | // modification, are permitted provided that the following conditions are met: 16 | // 17 | // * Redistribution's of source code must retain the above copyright notice, 18 | // this list of conditions and the following disclaimer. 19 | // 20 | // * Redistribution's in binary form must reproduce the above copyright notice, 21 | // this list of conditions and the following disclaimer in the documentation 22 | // and/or other materials provided with the distribution. 23 | // 24 | // * The name of Intel Corporation or contributors may not be used to endorse 25 | // or promote products derived from this software without specific 26 | // prior written permission. 27 | // 28 | // This software is provided by the copyright holders and contributors "as is" 29 | // and any express or implied warranties, including, but not limited to, the 30 | // implied warranties of merchantability and fitness for a particular purpose 31 | // are disclaimed. In no event shall the Intel Corporation or contributors be 32 | // liable for any direct, indirect, incidental, special, exemplary, or 33 | // consequential damages 34 | // (including, but not limited to, procurement of substitute goods or services; 35 | // loss of use, data, or profits; or business interruption) however caused 36 | // and on any theory of liability, whether in contract, strict liability, 37 | // or tort (including negligence or otherwise) arising in any way out of 38 | // the use of this software, even if advised of the possibility of such damage. 39 | 40 | 41 | #ifndef __OPENCV_OLD_WIMAGE_HPP__ 42 | #define __OPENCV_OLD_WIMAGE_HPP__ 43 | 44 | #include "opencv2/core/wimage.hpp" 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /src/tools/include/opencv2/core/devmem2d.hpp: -------------------------------------------------------------------------------- 1 | /*M/////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 4 | // 5 | // By downloading, copying, installing or using the software you agree to this license. 6 | // If you do not agree to this license, do not download, install, 7 | // copy or use the software. 8 | // 9 | // 10 | // License Agreement 11 | // For Open Source Computer Vision Library 12 | // 13 | // Copyright (C) 2000-2008, Intel Corporation, all rights reserved. 14 | // Copyright (C) 2009, Willow Garage Inc., all rights reserved. 15 | // Third party copyrights are property of their respective owners. 16 | // 17 | // Redistribution and use in source and binary forms, with or without modification, 18 | // are permitted provided that the following conditions are met: 19 | // 20 | // * Redistribution's of source code must retain the above copyright notice, 21 | // this list of conditions and the following disclaimer. 22 | // 23 | // * Redistribution's in binary form must reproduce the above copyright notice, 24 | // this list of conditions and the following disclaimer in the documentation 25 | // and/or other materials provided with the distribution. 26 | // 27 | // * The name of the copyright holders may not be used to endorse or promote products 28 | // derived from this software without specific prior written permission. 29 | // 30 | // This software is provided by the copyright holders and contributors "as is" and 31 | // any express or implied warranties, including, but not limited to, the implied 32 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 33 | // In no event shall the Intel Corporation or contributors be liable for any direct, 34 | // indirect, incidental, special, exemplary, or consequential damages 35 | // (including, but not limited to, procurement of substitute goods or services; 36 | // loss of use, data, or profits; or business interruption) however caused 37 | // and on any theory of liability, whether in contract, strict liability, 38 | // or tort (including negligence or otherwise) arising in any way out of 39 | // the use of this software, even if advised of the possibility of such damage. 40 | // 41 | //M*/ 42 | 43 | #include "opencv2/core/cuda_devptrs.hpp" 44 | -------------------------------------------------------------------------------- /src/tools/include/opencv2/gpu/devmem2d.hpp: -------------------------------------------------------------------------------- 1 | /*M/////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 4 | // 5 | // By downloading, copying, installing or using the software you agree to this license. 6 | // If you do not agree to this license, do not download, install, 7 | // copy or use the software. 8 | // 9 | // 10 | // License Agreement 11 | // For Open Source Computer Vision Library 12 | // 13 | // Copyright (C) 2000-2008, Intel Corporation, all rights reserved. 14 | // Copyright (C) 2009, Willow Garage Inc., all rights reserved. 15 | // Third party copyrights are property of their respective owners. 16 | // 17 | // Redistribution and use in source and binary forms, with or without modification, 18 | // are permitted provided that the following conditions are met: 19 | // 20 | // * Redistribution's of source code must retain the above copyright notice, 21 | // this list of conditions and the following disclaimer. 22 | // 23 | // * Redistribution's in binary form must reproduce the above copyright notice, 24 | // this list of conditions and the following disclaimer in the documentation 25 | // and/or other materials provided with the distribution. 26 | // 27 | // * The name of the copyright holders may not be used to endorse or promote products 28 | // derived from this software without specific prior written permission. 29 | // 30 | // This software is provided by the copyright holders and contributors "as is" and 31 | // any express or implied warranties, including, but not limited to, the implied 32 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 33 | // In no event shall the Intel Corporation or contributors be liable for any direct, 34 | // indirect, incidental, special, exemplary, or consequential damages 35 | // (including, but not limited to, procurement of substitute goods or services; 36 | // loss of use, data, or profits; or business interruption) however caused 37 | // and on any theory of liability, whether in contract, strict liability, 38 | // or tort (including negligence or otherwise) arising in any way out of 39 | // the use of this software, even if advised of the possibility of such damage. 40 | // 41 | //M*/ 42 | 43 | #include "opencv2/core/cuda_devptrs.hpp" 44 | -------------------------------------------------------------------------------- /src/tools/include/opencv/ml.h: -------------------------------------------------------------------------------- 1 | /*M/////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 4 | // 5 | // By downloading, copying, installing or using the software you agree to this license. 6 | // If you do not agree to this license, do not download, install, 7 | // copy or use the software. 8 | // 9 | // 10 | // Intel License Agreement 11 | // 12 | // Copyright (C) 2000, Intel Corporation, all rights reserved. 13 | // Third party copyrights are property of their respective owners. 14 | // 15 | // Redistribution and use in source and binary forms, with or without modification, 16 | // are permitted provided that the following conditions are met: 17 | // 18 | // * Redistribution's of source code must retain the above copyright notice, 19 | // this list of conditions and the following disclaimer. 20 | // 21 | // * Redistribution's in binary form must reproduce the above copyright notice, 22 | // this list of conditions and the following disclaimer in the documentation 23 | // and/or other materials provided with the distribution. 24 | // 25 | // * The name of Intel Corporation may not be used to endorse or promote products 26 | // derived from this software without specific prior written permission. 27 | // 28 | // This software is provided by the copyright holders and contributors "as is" and 29 | // any express or implied warranties, including, but not limited to, the implied 30 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 31 | // In no event shall the Intel Corporation or contributors be liable for any direct, 32 | // indirect, incidental, special, exemplary, or consequential damages 33 | // (including, but not limited to, procurement of substitute goods or services; 34 | // loss of use, data, or profits; or business interruption) however caused 35 | // and on any theory of liability, whether in contract, strict liability, 36 | // or tort (including negligence or otherwise) arising in any way out of 37 | // the use of this software, even if advised of the possibility of such damage. 38 | // 39 | //M*/ 40 | 41 | #ifndef __OPENCV_OLD_ML_H__ 42 | #define __OPENCV_OLD_ML_H__ 43 | 44 | #include "opencv2/core/core_c.h" 45 | #include "opencv2/core/core.hpp" 46 | #include "opencv2/ml/ml.hpp" 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /src/tools/include/Eigen/src/SparseLU/SparseLU_Utils.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2012 Désiré Nuentsa-Wakam 5 | // 6 | // This Source Code Form is subject to the terms of the Mozilla 7 | // Public License v. 2.0. If a copy of the MPL was not distributed 8 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 9 | 10 | 11 | #ifndef EIGEN_SPARSELU_UTILS_H 12 | #define EIGEN_SPARSELU_UTILS_H 13 | 14 | namespace Eigen { 15 | namespace internal { 16 | 17 | /** 18 | * \brief Count Nonzero elements in the factors 19 | */ 20 | template 21 | void SparseLUImpl::countnz(const Index n, Index& nnzL, Index& nnzU, GlobalLU_t& glu) 22 | { 23 | nnzL = 0; 24 | nnzU = (glu.xusub)(n); 25 | Index nsuper = (glu.supno)(n); 26 | Index jlen; 27 | Index i, j, fsupc; 28 | if (n <= 0 ) return; 29 | // For each supernode 30 | for (i = 0; i <= nsuper; i++) 31 | { 32 | fsupc = glu.xsup(i); 33 | jlen = glu.xlsub(fsupc+1) - glu.xlsub(fsupc); 34 | 35 | for (j = fsupc; j < glu.xsup(i+1); j++) 36 | { 37 | nnzL += jlen; 38 | nnzU += j - fsupc + 1; 39 | jlen--; 40 | } 41 | } 42 | } 43 | 44 | /** 45 | * \brief Fix up the data storage lsub for L-subscripts. 46 | * 47 | * It removes the subscripts sets for structural pruning, 48 | * and applies permutation to the remaining subscripts 49 | * 50 | */ 51 | template 52 | void SparseLUImpl::fixupL(const Index n, const IndexVector& perm_r, GlobalLU_t& glu) 53 | { 54 | Index fsupc, i, j, k, jstart; 55 | 56 | Index nextl = 0; 57 | Index nsuper = (glu.supno)(n); 58 | 59 | // For each supernode 60 | for (i = 0; i <= nsuper; i++) 61 | { 62 | fsupc = glu.xsup(i); 63 | jstart = glu.xlsub(fsupc); 64 | glu.xlsub(fsupc) = nextl; 65 | for (j = jstart; j < glu.xlsub(fsupc + 1); j++) 66 | { 67 | glu.lsub(nextl) = perm_r(glu.lsub(j)); // Now indexed into P*A 68 | nextl++; 69 | } 70 | for (k = fsupc+1; k < glu.xsup(i+1); k++) 71 | glu.xlsub(k) = nextl; // other columns in supernode i 72 | } 73 | 74 | glu.xlsub(n) = nextl; 75 | } 76 | 77 | } // end namespace internal 78 | 79 | } // end namespace Eigen 80 | #endif // EIGEN_SPARSELU_UTILS_H 81 | -------------------------------------------------------------------------------- /src/tools/include/Eigen/src/Eigen2Support/Lazy.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2008 Benoit Jacob 5 | // 6 | // This Source Code Form is subject to the terms of the Mozilla 7 | // Public License v. 2.0. If a copy of the MPL was not distributed 8 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 9 | 10 | #ifndef EIGEN_LAZY_H 11 | #define EIGEN_LAZY_H 12 | 13 | namespace Eigen { 14 | 15 | /** \deprecated it is only used by lazy() which is deprecated 16 | * 17 | * \returns an expression of *this with added flags 18 | * 19 | * Example: \include MatrixBase_marked.cpp 20 | * Output: \verbinclude MatrixBase_marked.out 21 | * 22 | * \sa class Flagged, extract(), part() 23 | */ 24 | template 25 | template 26 | inline const Flagged 27 | MatrixBase::marked() const 28 | { 29 | return derived(); 30 | } 31 | 32 | /** \deprecated use MatrixBase::noalias() 33 | * 34 | * \returns an expression of *this with the EvalBeforeAssigningBit flag removed. 35 | * 36 | * Example: \include MatrixBase_lazy.cpp 37 | * Output: \verbinclude MatrixBase_lazy.out 38 | * 39 | * \sa class Flagged, marked() 40 | */ 41 | template 42 | inline const Flagged 43 | MatrixBase::lazy() const 44 | { 45 | return derived(); 46 | } 47 | 48 | 49 | /** \internal 50 | * Overloaded to perform an efficient C += (A*B).lazy() */ 51 | template 52 | template 53 | Derived& MatrixBase::operator+=(const Flagged, 0, 54 | EvalBeforeAssigningBit>& other) 55 | { 56 | other._expression().derived().addTo(derived()); return derived(); 57 | } 58 | 59 | /** \internal 60 | * Overloaded to perform an efficient C -= (A*B).lazy() */ 61 | template 62 | template 63 | Derived& MatrixBase::operator-=(const Flagged, 0, 64 | EvalBeforeAssigningBit>& other) 65 | { 66 | other._expression().derived().subTo(derived()); return derived(); 67 | } 68 | 69 | } // end namespace Eigen 70 | 71 | #endif // EIGEN_LAZY_H 72 | -------------------------------------------------------------------------------- /src/tools/include/boost/threadpool/detail/locking_ptr.hpp: -------------------------------------------------------------------------------- 1 | /*! \file 2 | * \brief The locking_ptr is smart pointer with a scoped locking mechanism. 3 | * 4 | * The class is a wrapper for a volatile pointer. It enables synchronized access to the 5 | * internal pointer by locking the passed mutex. 6 | * locking_ptr is based on Andrei Alexandrescu's LockingPtr. For more information 7 | * see article "volatile - Multithreaded Programmer's Best Friend" by A. Alexandrescu. 8 | * 9 | * 10 | * Copyright (c) 2005-2007 Philipp Henkel 11 | * 12 | * Use, modification, and distribution are subject to the 13 | * Boost Software License, Version 1.0. (See accompanying file 14 | * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 15 | * 16 | * http://threadpool.sourceforge.net 17 | * 18 | */ 19 | 20 | 21 | #ifndef THREADPOOL_DETAIL_LOCKING_PTR_HPP_INCLUDED 22 | #define THREADPOOL_DETAIL_LOCKING_PTR_HPP_INCLUDED 23 | 24 | #include 25 | #include 26 | 27 | 28 | namespace boost { 29 | namespace threadpool { 30 | namespace detail { 31 | 32 | /*! \brief Smart pointer with a scoped locking mechanism. 33 | * 34 | * This class is a wrapper for a volatile pointer. It enables synchronized access to the 35 | * internal pointer by locking the passed mutex. 36 | */ 37 | template 38 | class locking_ptr 39 | : private noncopyable { 40 | T* m_obj; //!< The instance pointer. 41 | Mutex & m_mutex; //!< Mutex is used for scoped locking. 42 | 43 | public: 44 | /// Constructor. 45 | locking_ptr(volatile T& obj, const volatile Mutex& mtx) 46 | : m_obj(const_cast(&obj)) 47 | , m_mutex(*const_cast(&mtx)) { 48 | // Lock mutex 49 | m_mutex.lock(); 50 | } 51 | 52 | 53 | /// Destructor. 54 | ~locking_ptr() { 55 | // Unlock mutex 56 | m_mutex.unlock(); 57 | } 58 | 59 | 60 | /*! Returns a reference to the stored instance. 61 | * \return The instance's reference. 62 | */ 63 | T& operator*() const { 64 | return *m_obj; 65 | } 66 | 67 | 68 | /*! Returns a pointer to the stored instance. 69 | * \return The instance's pointer. 70 | */ 71 | T* operator->() const { 72 | return m_obj; 73 | } 74 | }; 75 | 76 | 77 | } 78 | } 79 | } // namespace boost::threadpool::detail 80 | 81 | 82 | #endif // THREADPOOL_DETAIL_LOCKING_PTR_HPP_INCLUDED 83 | 84 | -------------------------------------------------------------------------------- /src/task_tracker/cpu_networks.h: -------------------------------------------------------------------------------- 1 | /* 2 | *Copyright 2015 NTU (http://www.ntu.edu.sg/) 3 | *Licensed under the Apache License, Version 2.0 (the "License"); 4 | *you may not use this file except in compliance with the License. 5 | *You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | *Unless required by applicable law or agreed to in writing, software 10 | *distributed under the License is distributed on an "AS IS" BASIS, 11 | *WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | *See the License for the specific language governing permissions and 13 | *limitations under the License. 14 | */ 15 | 16 | #ifndef UNICAP_TASK_TRACKER_CPU_NETWORKS_H_ 17 | #define UNICAP_TASK_TRACKER_CPU_NETWORKS_H_ 18 | 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include "../common/unicap_client.h" 24 | 25 | namespace ntu { 26 | namespace cap { 27 | 28 | class CPUNetworks { 29 | public: 30 | static CPUNetworks& singleton() { 31 | static CPUNetworks cpu_network; 32 | return cpu_network; 33 | } 34 | 35 | int64_t create_network(std::thread::id id, 36 | std::unordered_map>> cpu_network, 38 | boost::shared_ptr> job_tracker_network) { 39 | _lock.lock(); 40 | _cpu_networks[id] = cpu_network; 41 | _job_tracker_network[id] = job_tracker_network; 42 | _lock.unlock(); 43 | return 1; 44 | } 45 | 46 | bool check_thread(std::thread::id id) { 47 | bool flag; 48 | _lock.lock(); 49 | auto i = _cpu_networks.find(id); 50 | if (i == _cpu_networks.end()) { 51 | flag = false; 52 | } else { 53 | flag = true; 54 | } 55 | _lock.unlock(); 56 | return flag; 57 | } 58 | 59 | int64_t size() { 60 | return _cpu_networks.size(); 61 | } 62 | 63 | std::mutex _lock; 64 | std::unordered_map>>> 66 | _cpu_networks; 67 | std::unordered_map>> 69 | _job_tracker_network; 70 | }; 71 | 72 | } 73 | } 74 | #endif /* UNICAP_TASK_TRACKER_CPU_NETWORKS_CPP_ */ 75 | -------------------------------------------------------------------------------- /src/tools/include/opencv/cxeigen.hpp: -------------------------------------------------------------------------------- 1 | /*M/////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 4 | // 5 | // By downloading, copying, installing or using the software you agree to this license. 6 | // If you do not agree to this license, do not download, install, 7 | // copy or use the software. 8 | // 9 | // 10 | // License Agreement 11 | // For Open Source Computer Vision Library 12 | // 13 | // Copyright (C) 2000-2008, Intel Corporation, all rights reserved. 14 | // Copyright (C) 2009, Willow Garage Inc., all rights reserved. 15 | // Third party copyrights are property of their respective owners. 16 | // 17 | // Redistribution and use in source and binary forms, with or without modification, 18 | // are permitted provided that the following conditions are met: 19 | // 20 | // * Redistribution's of source code must retain the above copyright notice, 21 | // this list of conditions and the following disclaimer. 22 | // 23 | // * Redistribution's in binary form must reproduce the above copyright notice, 24 | // this list of conditions and the following disclaimer in the documentation 25 | // and/or other materials provided with the distribution. 26 | // 27 | // * The name of the copyright holders may not be used to endorse or promote products 28 | // derived from this software without specific prior written permission. 29 | // 30 | // This software is provided by the copyright holders and contributors "as is" and 31 | // any express or implied warranties, including, but not limited to, the implied 32 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 33 | // In no event shall the Intel Corporation or contributors be liable for any direct, 34 | // indirect, incidental, special, exemplary, or consequential damages 35 | // (including, but not limited to, procurement of substitute goods or services; 36 | // loss of use, data, or profits; or business interruption) however caused 37 | // and on any theory of liability, whether in contract, strict liability, 38 | // or tort (including negligence or otherwise) arising in any way out of 39 | // the use of this software, even if advised of the possibility of such damage. 40 | // 41 | //M*/ 42 | 43 | #ifndef __OPENCV_OLD_EIGEN_HPP__ 44 | #define __OPENCV_OLD_EIGEN_HPP__ 45 | 46 | #include "opencv2/core/eigen.hpp" 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /src/common/unicap_client.h: -------------------------------------------------------------------------------- 1 | /* 2 | *Copyright 2015 NTU (http://www.ntu.edu.sg/) 3 | *Licensed under the Apache License, Version 2.0 (the "License"); 4 | *you may not use this file except in compliance with the License. 5 | *You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | *Unless required by applicable law or agreed to in writing, software 10 | *distributed under the License is distributed on an "AS IS" BASIS, 11 | *WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | *See the License for the specific language governing permissions and 13 | *limitations under the License. 14 | */ 15 | #ifndef NTU_CAP_UNICAP_TASK_TRACKER_TO_JOB_TRACKER_CLIENT_H_ 16 | #define NTU_CAP_UNICAP_TASK_TRACKER_TO_JOB_TRACKER_CLIENT_H_ 17 | 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include "../gen/JobTracker.h" 24 | #include "../gen/TaskTracker.h" 25 | 26 | using namespace apache::thrift; 27 | using namespace apache::thrift::protocol; 28 | using namespace apache::thrift::transport; 29 | 30 | namespace ntu { 31 | namespace cap { 32 | 33 | template 34 | class UnicapClient { 35 | 36 | public: 37 | UnicapClient(const std::string& host_name, const int64_t port) { 38 | _host_name = host_name; 39 | _port = port; 40 | _socket = boost::shared_ptr(new TSocket(_host_name, _port)); 41 | _transport = boost::shared_ptr(new TBufferedTransport(_socket)); 42 | _protocol = boost::shared_ptr(new TBinaryProtocol(_transport)); 43 | _client = boost::shared_ptr(new T(_protocol)); 44 | } 45 | 46 | int64_t open_transport() { 47 | _transport->open(); 48 | return 1; 49 | } 50 | 51 | int64_t close_transport() { 52 | _transport->close(); 53 | return 1; 54 | } 55 | 56 | boost::shared_ptr& method() { 57 | return _client; 58 | } 59 | 60 | private: 61 | std::string _host_name; 62 | int64_t _port; 63 | boost::shared_ptr _socket; 64 | boost::shared_ptr _transport; 65 | boost::shared_ptr _protocol; 66 | boost::shared_ptr _client; 67 | }; 68 | 69 | } 70 | } 71 | 72 | #endif /* UNICAP_TASK_TRACKER_TO_JOB_TRACKER_CLIENT_H_ */ 73 | -------------------------------------------------------------------------------- /src/tools/include/Eigen/OrderingMethods: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_ORDERINGMETHODS_MODULE_H 2 | #define EIGEN_ORDERINGMETHODS_MODULE_H 3 | 4 | #include "SparseCore" 5 | 6 | #include "src/Core/util/DisableStupidWarnings.h" 7 | 8 | /** 9 | * \defgroup OrderingMethods_Module OrderingMethods module 10 | * 11 | * This module is currently for internal use only 12 | * 13 | * It defines various built-in and external ordering methods for sparse matrices. 14 | * They are typically used to reduce the number of elements during 15 | * the sparse matrix decomposition (LLT, LU, QR). 16 | * Precisely, in a preprocessing step, a permutation matrix P is computed using 17 | * those ordering methods and applied to the columns of the matrix. 18 | * Using for instance the sparse Cholesky decomposition, it is expected that 19 | * the nonzeros elements in LLT(A*P) will be much smaller than that in LLT(A). 20 | * 21 | * 22 | * Usage : 23 | * \code 24 | * #include 25 | * \endcode 26 | * 27 | * A simple usage is as a template parameter in the sparse decomposition classes : 28 | * 29 | * \code 30 | * SparseLU > solver; 31 | * \endcode 32 | * 33 | * \code 34 | * SparseQR > solver; 35 | * \endcode 36 | * 37 | * It is possible as well to call directly a particular ordering method for your own purpose, 38 | * \code 39 | * AMDOrdering ordering; 40 | * PermutationMatrix perm; 41 | * SparseMatrix A; 42 | * //Fill the matrix ... 43 | * 44 | * ordering(A, perm); // Call AMD 45 | * \endcode 46 | * 47 | * \note Some of these methods (like AMD or METIS), need the sparsity pattern 48 | * of the input matrix to be symmetric. When the matrix is structurally unsymmetric, 49 | * Eigen computes internally the pattern of \f$A^T*A\f$ before calling the method. 50 | * If your matrix is already symmetric (at leat in structure), you can avoid that 51 | * by calling the method with a SelfAdjointView type. 52 | * 53 | * \code 54 | * // Call the ordering on the pattern of the lower triangular matrix A 55 | * ordering(A.selfadjointView(), perm); 56 | * \endcode 57 | */ 58 | 59 | #ifndef EIGEN_MPL2_ONLY 60 | #include "src/OrderingMethods/Amd.h" 61 | #endif 62 | 63 | #include "src/OrderingMethods/Ordering.h" 64 | #include "src/Core/util/ReenableStupidWarnings.h" 65 | 66 | #endif // EIGEN_ORDERINGMETHODS_MODULE_H 67 | -------------------------------------------------------------------------------- /src/tools/include/opencv2/videostab/videostab.hpp: -------------------------------------------------------------------------------- 1 | /*M/////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 4 | // 5 | // By downloading, copying, installing or using the software you agree to this license. 6 | // If you do not agree to this license, do not download, install, 7 | // copy or use the software. 8 | // 9 | // 10 | // License Agreement 11 | // For Open Source Computer Vision Library 12 | // 13 | // Copyright (C) 2000-2008, Intel Corporation, all rights reserved. 14 | // Copyright (C) 2009-2011, Willow Garage Inc., all rights reserved. 15 | // Third party copyrights are property of their respective owners. 16 | // 17 | // Redistribution and use in source and binary forms, with or without modification, 18 | // are permitted provided that the following conditions are met: 19 | // 20 | // * Redistribution's of source code must retain the above copyright notice, 21 | // this list of conditions and the following disclaimer. 22 | // 23 | // * Redistribution's in binary form must reproduce the above copyright notice, 24 | // this list of conditions and the following disclaimer in the documentation 25 | // and/or other materials provided with the distribution. 26 | // 27 | // * The name of the copyright holders may not be used to endorse or promote products 28 | // derived from this software without specific prior written permission. 29 | // 30 | // This software is provided by the copyright holders and contributors "as is" and 31 | // any express or implied warranties, including, but not limited to, the implied 32 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 33 | // In no event shall the Intel Corporation or contributors be liable for any direct, 34 | // indirect, incidental, special, exemplary, or consequential damages 35 | // (including, but not limited to, procurement of substitute goods or services; 36 | // loss of use, data, or profits; or business interruption) however caused 37 | // and on any theory of liability, whether in contract, strict liability, 38 | // or tort (including negligence or otherwise) arising in any way out of 39 | // the use of this software, even if advised of the possibility of such damage. 40 | // 41 | //M*/ 42 | 43 | #ifndef __OPENCV_VIDEOSTAB_HPP__ 44 | #define __OPENCV_VIDEOSTAB_HPP__ 45 | 46 | #include "opencv2/videostab/stabilizer.hpp" 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /src/tools/include/opencv/highgui.h: -------------------------------------------------------------------------------- 1 | /*M/////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 4 | // 5 | // By downloading, copying, installing or using the software you agree to this license. 6 | // If you do not agree to this license, do not download, install, 7 | // copy or use the software. 8 | // 9 | // 10 | // Intel License Agreement 11 | // For Open Source Computer Vision Library 12 | // 13 | // Copyright (C) 2000, Intel Corporation, all rights reserved. 14 | // Third party copyrights are property of their respective owners. 15 | // 16 | // Redistribution and use in source and binary forms, with or without modification, 17 | // are permitted provided that the following conditions are met: 18 | // 19 | // * Redistribution's of source code must retain the above copyright notice, 20 | // this list of conditions and the following disclaimer. 21 | // 22 | // * Redistribution's in binary form must reproduce the above copyright notice, 23 | // this list of conditions and the following disclaimer in the documentation 24 | // and/or other materials provided with the distribution. 25 | // 26 | // * The name of Intel Corporation may not be used to endorse or promote products 27 | // derived from this software without specific prior written permission. 28 | // 29 | // This software is provided by the copyright holders and contributors "as is" and 30 | // any express or implied warranties, including, but not limited to, the implied 31 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 32 | // In no event shall the Intel Corporation or contributors be liable for any direct, 33 | // indirect, incidental, special, exemplary, or consequential damages 34 | // (including, but not limited to, procurement of substitute goods or services; 35 | // loss of use, data, or profits; or business interruption) however caused 36 | // and on any theory of liability, whether in contract, strict liability, 37 | // or tort (including negligence or otherwise) arising in any way out of 38 | // the use of this software, even if advised of the possibility of such damage. 39 | // 40 | //M*/ 41 | 42 | #ifndef __OPENCV_OLD_HIGHGUI_H__ 43 | #define __OPENCV_OLD_HIGHGUI_H__ 44 | 45 | #include "opencv2/core/core_c.h" 46 | #include "opencv2/core/core.hpp" 47 | #include "opencv2/highgui/highgui_c.h" 48 | #include "opencv2/highgui/highgui.hpp" 49 | 50 | #endif 51 | -------------------------------------------------------------------------------- /src/storage/lsm_key_value.h: -------------------------------------------------------------------------------- 1 | /* 2 | *Copyright 2015 NTU (http://www.ntu.edu.sg/) 3 | *Licensed under the Apache License, Version 2.0 (the "License"); 4 | *you may not use this file except in compliance with the License. 5 | *You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | *Unless required by applicable law or agreed to in writing, software 10 | *distributed under the License is distributed on an "AS IS" BASIS, 11 | *WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | *See the License for the specific language governing permissions and 13 | *limitations under the License. 14 | */ 15 | 16 | #ifndef NTU_CAP_UNICAP_STORAGE_LSM_KEY_VALUE_H_ 17 | #define NTU_CAP_UNICAP_STORAGE_LSM_KEY_VALUE_H_ 18 | 19 | #include "./kv_base.h" 20 | #include "../tools/include/leveldb/db.h" 21 | 22 | namespace ntu { 23 | namespace cap { 24 | 25 | template 26 | class LSMKeyValue: public KVStorage { 27 | 28 | public: 29 | 30 | LSMKeyValue(); 31 | 32 | LSMKeyValue(const std::string table_name, 33 | const int64_t shard_id, 34 | const std::string cf_name); 35 | 36 | ~LSMKeyValue(); 37 | 38 | int64_t vector_put(std::vector row_key, 39 | std::vector column_key, 40 | std::vector value); 41 | 42 | int64_t vector_merge(std::vector row_key, 43 | std::vector column_key, 44 | std::vector value); 45 | 46 | 47 | int64_t timed_vector_put(std::vector row_key, 48 | std::vector column_key, 49 | int64_t time_stamp, 50 | std::vector value); 51 | 52 | void vector_get(std::vector row_key, 53 | std::vector column_key, 54 | std::vector& value); 55 | 56 | void scan_all(std::map>& value); 57 | 58 | void timed_scan(int64_t time_stamp, 59 | std::map>& value); 60 | 61 | leveldb::DB* storage_ptr(); 62 | 63 | std::string _path; 64 | leveldb::DB* _db; 65 | leveldb::Options _options; 66 | 67 | typedef std::map> TIMED_DATA; 68 | std::map _timed_storage; 69 | }; 70 | 71 | } 72 | } 73 | 74 | #define LSM_KEY_VALUE 75 | #include "./lsm_key_value.cpp" 76 | 77 | #endif /* UNICAP_STORAGE_LSM_KEY_VALUE_H_ */ 78 | -------------------------------------------------------------------------------- /src/tools/include/opencv/cvaux.hpp: -------------------------------------------------------------------------------- 1 | /*M/////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 4 | // 5 | // By downloading, copying, installing or using the software you agree to this license. 6 | // If you do not agree to this license, do not download, install, 7 | // copy or use the software. 8 | // 9 | // 10 | // Intel License Agreement 11 | // For Open Source Computer Vision Library 12 | // 13 | // Copyright (C) 2000, Intel Corporation, all rights reserved. 14 | // Third party copyrights are property of their respective owners. 15 | // 16 | // Redistribution and use in source and binary forms, with or without modification, 17 | // are permitted provided that the following conditions are met: 18 | // 19 | // * Redistribution's of source code must retain the above copyright notice, 20 | // this list of conditions and the following disclaimer. 21 | // 22 | // * Redistribution's in binary form must reproduce the above copyright notice, 23 | // this list of conditions and the following disclaimer in the documentation 24 | // and/or other materials provided with the distribution. 25 | // 26 | // * The name of Intel Corporation may not be used to endorse or promote products 27 | // derived from this software without specific prior written permission. 28 | // 29 | // This software is provided by the copyright holders and contributors "as is" and 30 | // any express or implied warranties, including, but not limited to, the implied 31 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 32 | // In no event shall the Intel Corporation or contributors be liable for any direct, 33 | // indirect, incidental, special, exemplary, or consequential damages 34 | // (including, but not limited to, procurement of substitute goods or services; 35 | // loss of use, data, or profits; or business interruption) however caused 36 | // and on any theory of liability, whether in contract, strict liability, 37 | // or tort (including negligence or otherwise) arising in any way out of 38 | // the use of this software, even if advised of the possibility of such damage. 39 | // 40 | //M*/ 41 | 42 | #ifndef __OPENCV_OLD_AUX_HPP__ 43 | #define __OPENCV_OLD_AUX_HPP__ 44 | 45 | //#if defined(__GNUC__) 46 | //#warning "This is a deprecated opencv header provided for compatibility. Please include a header from a corresponding opencv module" 47 | //#endif 48 | 49 | #include 50 | 51 | #endif 52 | -------------------------------------------------------------------------------- /src/tools/include/opencv2/highgui/ios.h: -------------------------------------------------------------------------------- 1 | 2 | /*M/////////////////////////////////////////////////////////////////////////////////////// 3 | // 4 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 5 | // 6 | // By downloading, copying, installing or using the software you agree to this license. 7 | // If you do not agree to this license, do not download, install, 8 | // copy or use the software. 9 | // 10 | // 11 | // License Agreement 12 | // For Open Source Computer Vision Library 13 | // 14 | // Copyright (C) 2000-2008, Intel Corporation, all rights reserved. 15 | // Copyright (C) 2009, Willow Garage Inc., all rights reserved. 16 | // Third party copyrights are property of their respective owners. 17 | // 18 | // Redistribution and use in source and binary forms, with or without modification, 19 | // are permitted provided that the following conditions are met: 20 | // 21 | // * Redistribution's of source code must retain the above copyright notice, 22 | // this list of conditions and the following disclaimer. 23 | // 24 | // * Redistribution's in binary form must reproduce the above copyright notice, 25 | // this list of conditions and the following disclaimer in the documentation 26 | // and/or other materials provided with the distribution. 27 | // 28 | // * The name of the copyright holders may not be used to endorse or promote products 29 | // derived from this software without specific prior written permission. 30 | // 31 | // This software is provided by the copyright holders and contributors "as is" and 32 | // any express or implied warranties, including, but not limited to, the implied 33 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 34 | // In no event shall the Intel Corporation or contributors be liable for any direct, 35 | // indirect, incidental, special, exemplary, or consequential damages 36 | // (including, but not limited to, procurement of substitute goods or services; 37 | // loss of use, data, or profits; or business interruption) however caused 38 | // and on any theory of liability, whether in contract, strict liability, 39 | // or tort (including negligence or otherwise) arising in any way out of 40 | // the use of this software, even if advised of the possibility of such damage. 41 | // 42 | //M*/ 43 | 44 | #include "opencv2/core/core.hpp" 45 | #import "opencv2/highgui/cap_ios.h" 46 | 47 | UIImage* MatToUIImage(const cv::Mat& image); 48 | void UIImageToMat(const UIImage* image, 49 | cv::Mat& m, bool alphaExist = false); 50 | -------------------------------------------------------------------------------- /src/storage/image_key_value.h: -------------------------------------------------------------------------------- 1 | /* 2 | *Copyright 2015 NTU (http://www.ntu.edu.sg/) 3 | *Licensed under the Apache License, Version 2.0 (the "License"); 4 | *you may not use this file except in compliance with the License. 5 | *You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | *Unless required by applicable law or agreed to in writing, software 10 | *distributed under the License is distributed on an "AS IS" BASIS, 11 | *WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | *See the License for the specific language governing permissions and 13 | *limitations under the License. 14 | */ 15 | 16 | #ifndef NTU_CAP_UNICAP_STORAGE_IMAGE_KEY_VALUE_ 17 | #define NTU_CAP_UNICAP_STORAGE_IMAGE_KEY_VALUE_ 18 | 19 | #include 20 | #include 21 | #include "../tools/include/opencv2/opencv.hpp" 22 | #include "./kv_base.h" 23 | 24 | namespace ntu { 25 | namespace cap { 26 | 27 | template 28 | class InMemoryImage : public KVStorage { 29 | 30 | public: 31 | 32 | InMemoryImage(); 33 | 34 | InMemoryImage(const std::string table_name, 35 | const int64_t shard_id, 36 | const std::string cf_name); 37 | 38 | ~InMemoryImage(); 39 | 40 | int64_t vector_put(std::vector row_key, 41 | std::vector column_key, 42 | std::vector value); 43 | 44 | int64_t vector_merge(std::vector row_key, 45 | std::vector column_key, 46 | std::vector value); 47 | 48 | 49 | int64_t timed_vector_put(std::vector row_key, 50 | std::vector column_key, 51 | int64_t time_stamp, 52 | std::vector value); 53 | 54 | void vector_get(std::vector row_key, 55 | std::vector column_key, 56 | std::vector& value); 57 | 58 | void scan_all(std::map>& value); 59 | 60 | void timed_scan(int64_t time_stamp, std::map>& value); 61 | 62 | std::map* storage_ptr(); 63 | 64 | std::map _storage_container; 65 | 66 | typedef std::map> TIMED_DATA; 67 | std::map _timed_storage; 68 | }; 69 | 70 | } 71 | } 72 | 73 | #define IMAGE_KEY_VALUE 74 | #include "image_key_value.cpp" 75 | 76 | #endif /* NTU_CAP_UNICAP_STORAGE_IMAGE_KEY_VALUE_ */ 77 | -------------------------------------------------------------------------------- /src/tools/include/opencv2/nonfree/nonfree.hpp: -------------------------------------------------------------------------------- 1 | /*M/////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 4 | // 5 | // By downloading, copying, installing or using the software you agree to this license. 6 | // If you do not agree to this license, do not download, install, 7 | // copy or use the software. 8 | // 9 | // 10 | // License Agreement 11 | // For Open Source Computer Vision Library 12 | // 13 | // Copyright (C) 2000-2008, Intel Corporation, all rights reserved. 14 | // Copyright (C) 2009-2012, Willow Garage Inc., all rights reserved. 15 | // Third party copyrights are property of their respective owners. 16 | // 17 | // Redistribution and use in source and binary forms, with or without modification, 18 | // are permitted provided that the following conditions are met: 19 | // 20 | // * Redistribution's of source code must retain the above copyright notice, 21 | // this list of conditions and the following disclaimer. 22 | // 23 | // * Redistribution's in binary form must reproduce the above copyright notice, 24 | // this list of conditions and the following disclaimer in the documentation 25 | // and/or other materials provided with the distribution. 26 | // 27 | // * The name of the copyright holders may not be used to endorse or promote products 28 | // derived from this software without specific prior written permission. 29 | // 30 | // This software is provided by the copyright holders and contributors "as is" and 31 | // any express or implied warranties, including, but not limited to, the implied 32 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 33 | // In no event shall the Intel Corporation or contributors be liable for any direct, 34 | // indirect, incidental, special, exemplary, or consequential damages 35 | // (including, but not limited to, procurement of substitute goods or services; 36 | // loss of use, data, or profits; or business interruption) however caused 37 | // and on any theory of liability, whether in contract, strict liability, 38 | // or tort (including negligence or otherwise) arising in any way out of 39 | // the use of this software, even if advised of the possibility of such damage. 40 | // 41 | //M*/ 42 | 43 | #ifndef __OPENCV_NONFREE_HPP__ 44 | #define __OPENCV_NONFREE_HPP__ 45 | 46 | #include "opencv2/nonfree/features2d.hpp" 47 | 48 | namespace cv 49 | { 50 | 51 | CV_EXPORTS_W bool initModule_nonfree(); 52 | 53 | } 54 | 55 | #endif 56 | 57 | /* End of file. */ 58 | -------------------------------------------------------------------------------- /src/thrift/gen-cpp/JobTracker_server.skeleton.cpp: -------------------------------------------------------------------------------- 1 | // This autogenerated skeleton file illustrates how to build a server. 2 | // You should copy it to another filename to avoid overwriting it. 3 | 4 | #include "JobTracker.h" 5 | #include 6 | #include 7 | #include 8 | #include 9 | 10 | using namespace ::apache::thrift; 11 | using namespace ::apache::thrift::protocol; 12 | using namespace ::apache::thrift::transport; 13 | using namespace ::apache::thrift::server; 14 | 15 | using boost::shared_ptr; 16 | 17 | using namespace ::ntu::cap; 18 | 19 | class JobTrackerHandler : virtual public JobTrackerIf { 20 | public: 21 | JobTrackerHandler() { 22 | // Your initialization goes here 23 | } 24 | 25 | int64_t register_task_tracker(const int64_t node_id, const std::string& node_name, const int64_t storage_weight) { 26 | // Your implementation goes here 27 | printf("register_task_tracker\n"); 28 | } 29 | 30 | void get_all_task_tracker_info(std::map & _return) { 31 | // Your implementation goes here 32 | printf("get_all_task_tracker_info\n"); 33 | } 34 | 35 | void fetch_cpu_task(TaskNode& _return, const int64_t task_tracker_id) { 36 | // Your implementation goes here 37 | printf("fetch_cpu_task\n"); 38 | } 39 | 40 | void fetch_gpu_task(TaskNode& _return, const int64_t task_tracker_id) { 41 | // Your implementation goes here 42 | printf("fetch_gpu_task\n"); 43 | } 44 | 45 | int64_t complete_cpu_task(const int64_t stage_id, const int64_t task_id) { 46 | // Your implementation goes here 47 | printf("complete_cpu_task\n"); 48 | } 49 | 50 | int64_t complete_gpu_task(const int64_t stage_id, const int64_t task_id) { 51 | // Your implementation goes here 52 | printf("complete_gpu_task\n"); 53 | } 54 | 55 | }; 56 | 57 | int main(int argc, char **argv) { 58 | int port = 9090; 59 | shared_ptr handler(new JobTrackerHandler()); 60 | shared_ptr processor(new JobTrackerProcessor(handler)); 61 | shared_ptr serverTransport(new TServerSocket(port)); 62 | shared_ptr transportFactory(new TBufferedTransportFactory()); 63 | shared_ptr protocolFactory(new TBinaryProtocolFactory()); 64 | 65 | TSimpleServer server(processor, serverTransport, transportFactory, protocolFactory); 66 | server.serve(); 67 | return 0; 68 | } 69 | 70 | -------------------------------------------------------------------------------- /src/tools/include/opencv/cv.hpp: -------------------------------------------------------------------------------- 1 | /*M/////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 4 | // 5 | // By downloading, copying, installing or using the software you agree to this license. 6 | // If you do not agree to this license, do not download, install, 7 | // copy or use the software. 8 | // 9 | // 10 | // License Agreement 11 | // For Open Source Computer Vision Library 12 | // 13 | // Copyright (C) 2000-2008, Intel Corporation, all rights reserved. 14 | // Copyright (C) 2009, Willow Garage Inc., all rights reserved. 15 | // Third party copyrights are property of their respective owners. 16 | // 17 | // Redistribution and use in source and binary forms, with or without modification, 18 | // are permitted provided that the following conditions are met: 19 | // 20 | // * Redistribution's of source code must retain the above copyright notice, 21 | // this list of conditions and the following disclaimer. 22 | // 23 | // * Redistribution's in binary form must reproduce the above copyright notice, 24 | // this list of conditions and the following disclaimer in the documentation 25 | // and/or other materials provided with the distribution. 26 | // 27 | // * The name of the copyright holders may not be used to endorse or promote products 28 | // derived from this software without specific prior written permission. 29 | // 30 | // This software is provided by the copyright holders and contributors "as is" and 31 | // any express or implied warranties, including, but not limited to, the implied 32 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 33 | // In no event shall the Intel Corporation or contributors be liable for any direct, 34 | // indirect, incidental, special, exemplary, or consequential damages 35 | // (including, but not limited to, procurement of substitute goods or services; 36 | // loss of use, data, or profits; or business interruption) however caused 37 | // and on any theory of liability, whether in contract, strict liability, 38 | // or tort (including negligence or otherwise) arising in any way out of 39 | // the use of this software, even if advised of the possibility of such damage. 40 | // 41 | //M*/ 42 | 43 | #ifndef __OPENCV_OLD_CV_HPP__ 44 | #define __OPENCV_OLD_CV_HPP__ 45 | 46 | //#if defined(__GNUC__) 47 | //#warning "This is a deprecated opencv header provided for compatibility. Please include a header from a corresponding opencv module" 48 | //#endif 49 | 50 | #include 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /src/storage/in_memory_key_value.h: -------------------------------------------------------------------------------- 1 | /* 2 | *Copyright 2015 NTU (http://www.ntu.edu.sg/) 3 | *Licensed under the Apache License, Version 2.0 (the "License"); 4 | *you may not use this file except in compliance with the License. 5 | *You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | *Unless required by applicable law or agreed to in writing, software 10 | *distributed under the License is distributed on an "AS IS" BASIS, 11 | *WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | *See the License for the specific language governing permissions and 13 | *limitations under the License. 14 | */ 15 | 16 | #ifndef NTU_CAP_UNICAP_STORAGE_COMMON_KEY_VALUE_H_ 17 | #define NTU_CAP_UNICAP_STORAGE_COMMON_KEY_VALUE_H_ 18 | 19 | #include 20 | #include 21 | #include "./kv_base.h" 22 | 23 | namespace ntu { 24 | namespace cap { 25 | 26 | template 27 | class InMemoryKeyValue : public KVStorage { 28 | 29 | public: 30 | 31 | InMemoryKeyValue(); 32 | 33 | InMemoryKeyValue(const std::string table_name, 34 | const int64_t shard_id, 35 | const std::string cf_name); 36 | 37 | ~InMemoryKeyValue(); 38 | 39 | int64_t vector_put(std::vector row_key, 40 | std::vector column_key, 41 | std::vector value); 42 | 43 | int64_t vector_merge(std::vector row_key, 44 | std::vector column_key, 45 | std::vector value); 46 | 47 | 48 | int64_t timed_vector_put(std::vector row_key, 49 | std::vector column_key, 50 | int64_t time_stamp, 51 | std::vector value); 52 | 53 | void vector_get(std::vector row_key, 54 | std::vector column_key, 55 | std::vector& value); 56 | 57 | void scan_all(std::map>& value); 58 | 59 | void timed_scan(int64_t time_stamp, 60 | std::map>& value); 61 | 62 | std::map* storage_ptr(); 63 | 64 | std::map _storage_container; 65 | //std::map _history_data; 66 | typedef std::map> TIMED_DATA; 67 | std::map _timed_storage; 68 | }; 69 | 70 | } 71 | } 72 | 73 | #define IN_MEMORY_KEY_VALUE 74 | #include "in_memory_key_value.cpp" 75 | 76 | #endif /* UNICAP_STORAGE_COMMON_KEY_VALUE_H_ */ 77 | -------------------------------------------------------------------------------- /src/storage/sparse_matrix.h: -------------------------------------------------------------------------------- 1 | /* 2 | *Copyright 2015 NTU (http://www.ntu.edu.sg/) 3 | *Licensed under the Apache License, Version 2.0 (the "License"); 4 | *you may not use this file except in compliance with the License. 5 | *You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | *Unless required by applicable law or agreed to in writing, software 10 | *distributed under the License is distributed on an "AS IS" BASIS, 11 | *WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | *See the License for the specific language governing permissions and 13 | *limitations under the License. 14 | */ 15 | 16 | 17 | #ifndef UNICAP_SRC_STORAGE_SPARSE_MATRIX_H_ 18 | #define UNICAP_SRC_STORAGE_SPARSE_MATRIX_H_ 19 | 20 | #include 21 | #include 22 | #include "./kv_base.h" 23 | #include "../tools/include/Eigen/Sparse" 24 | 25 | namespace ntu { 26 | namespace cap { 27 | 28 | template 29 | class SparseMatrix : public KVStorage { 30 | 31 | public: 32 | 33 | SparseMatrix(); 34 | 35 | SparseMatrix(const std::string table_name, 36 | const int64_t shard_id, 37 | const std::string cf_name, 38 | std::pair size); 39 | 40 | ~SparseMatrix(); 41 | 42 | int64_t vector_put(std::vector row_key, 43 | std::vector column_key, 44 | std::vector value); 45 | 46 | int64_t vector_merge(std::vector row_key, 47 | std::vector column_key, 48 | std::vector value); 49 | 50 | 51 | int64_t timed_vector_put(std::vector row_key, 52 | std::vector column_key, 53 | int64_t time_stamp, 54 | std::vector value); 55 | 56 | void vector_get(std::vector row_key, 57 | std::vector column_key, 58 | std::vector& value); 59 | 60 | void scan_all(std::map>& value); 61 | 62 | void timed_scan(int64_t time_stamp, std::map>& value); 63 | 64 | 65 | Eigen::SparseMatrix* storage_ptr(); 66 | 67 | Eigen::SparseMatrix _storage_container; 68 | 69 | typedef std::map> TIMED_DATA; 70 | std::map _timed_storage; 71 | }; 72 | 73 | } 74 | } 75 | 76 | #define SPARSE_MATRIX 77 | #include "sparse_matrix.cpp" 78 | 79 | #endif /* UNICAP_SRC_STORAGE_SPARSE_MATRIX_H_ */ 80 | -------------------------------------------------------------------------------- /src/tools/include/opencv/cxcore.hpp: -------------------------------------------------------------------------------- 1 | /*M/////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 4 | // 5 | // By downloading, copying, installing or using the software you agree to this license. 6 | // If you do not agree to this license, do not download, install, 7 | // copy or use the software. 8 | // 9 | // 10 | // License Agreement 11 | // For Open Source Computer Vision Library 12 | // 13 | // Copyright (C) 2000-2008, Intel Corporation, all rights reserved. 14 | // Copyright (C) 2009, Willow Garage Inc., all rights reserved. 15 | // Third party copyrights are property of their respective owners. 16 | // 17 | // Redistribution and use in source and binary forms, with or without modification, 18 | // are permitted provided that the following conditions are met: 19 | // 20 | // * Redistribution's of source code must retain the above copyright notice, 21 | // this list of conditions and the following disclaimer. 22 | // 23 | // * Redistribution's in binary form must reproduce the above copyright notice, 24 | // this list of conditions and the following disclaimer in the documentation 25 | // and/or other materials provided with the distribution. 26 | // 27 | // * The name of the copyright holders may not be used to endorse or promote products 28 | // derived from this software without specific prior written permission. 29 | // 30 | // This software is provided by the copyright holders and contributors "as is" and 31 | // any express or implied warranties, including, but not limited to, the implied 32 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 33 | // In no event shall the Intel Corporation or contributors be liable for any direct, 34 | // indirect, incidental, special, exemplary, or consequential damages 35 | // (including, but not limited to, procurement of substitute goods or services; 36 | // loss of use, data, or profits; or business interruption) however caused 37 | // and on any theory of liability, whether in contract, strict liability, 38 | // or tort (including negligence or otherwise) arising in any way out of 39 | // the use of this software, even if advised of the possibility of such damage. 40 | // 41 | //M*/ 42 | 43 | #ifndef __OPENCV_OLD_CXCORE_HPP__ 44 | #define __OPENCV_OLD_CXCORE_HPP__ 45 | 46 | //#if defined(__GNUC__) 47 | //#warning "This is a deprecated opencv header provided for compatibility. Please include a header from a corresponding opencv module" 48 | //#endif 49 | 50 | #include 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /src/storage/dense_matrix.h: -------------------------------------------------------------------------------- 1 | /* 2 | *Copyright 2015 NTU (http://www.ntu.edu.sg/) 3 | *Licensed under the Apache License, Version 2.0 (the "License"); 4 | *you may not use this file except in compliance with the License. 5 | *You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | *Unless required by applicable law or agreed to in writing, software 10 | *distributed under the License is distributed on an "AS IS" BASIS, 11 | *WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | *See the License for the specific language governing permissions and 13 | *limitations under the License. 14 | */ 15 | 16 | #ifndef UNICAP_SRC_STORAGE_DENSE_MATRIX_H_ 17 | #define UNICAP_SRC_STORAGE_DENSE_MATRIX_H_ 18 | 19 | #include 20 | #include 21 | #include "./kv_base.h" 22 | #include "../tools/include/Eigen/Dense" 23 | 24 | namespace ntu { 25 | namespace cap { 26 | 27 | template 28 | class DenseMatrix : public KVStorage { 29 | 30 | public: 31 | 32 | DenseMatrix(); 33 | 34 | DenseMatrix(const std::string table_name, 35 | const int64_t shard_id, 36 | const std::string cf_name, 37 | std::pair size); 38 | 39 | ~DenseMatrix(); 40 | 41 | int64_t vector_put(std::vector row_key, 42 | std::vector column_key, 43 | std::vector value); 44 | 45 | int64_t vector_merge(std::vector row_key, 46 | std::vector column_key, 47 | std::vector value); 48 | 49 | 50 | int64_t timed_vector_put(std::vector row_key, 51 | std::vector column_key, 52 | int64_t time_stamp, 53 | std::vector value); 54 | 55 | void vector_get(std::vector row_key, 56 | std::vector column_key, 57 | std::vector& value); 58 | 59 | void scan_all(std::map>& value); 60 | 61 | void timed_scan(int64_t time_stamp, std::map>& value); 62 | 63 | Eigen::Matrix* storage_ptr(); 64 | 65 | Eigen::Matrix _storage_container; 66 | 67 | typedef std::map> TIMED_DATA; 68 | std::map _timed_storage; 69 | }; 70 | 71 | 72 | } 73 | } 74 | 75 | #define DENSE_MATRIX 76 | #include "./dense_matrix.cpp" 77 | 78 | #endif /* UNICAP_SRC_STORAGE_DENSE_MATRIX_H_ */ 79 | -------------------------------------------------------------------------------- /src/tools/include/opencv2/video/video.hpp: -------------------------------------------------------------------------------- 1 | /*M/////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 4 | // 5 | // By downloading, copying, installing or using the software you agree to this license. 6 | // If you do not agree to this license, do not download, install, 7 | // copy or use the software. 8 | // 9 | // 10 | // License Agreement 11 | // For Open Source Computer Vision Library 12 | // 13 | // Copyright (C) 2000-2008, Intel Corporation, all rights reserved. 14 | // Copyright (C) 2009, Willow Garage Inc., all rights reserved. 15 | // Third party copyrights are property of their respective owners. 16 | // 17 | // Redistribution and use in source and binary forms, with or without modification, 18 | // are permitted provided that the following conditions are met: 19 | // 20 | // * Redistribution's of source code must retain the above copyright notice, 21 | // this list of conditions and the following disclaimer. 22 | // 23 | // * Redistribution's in binary form must reproduce the above copyright notice, 24 | // this list of conditions and the following disclaimer in the documentation 25 | // and/or other materials provided with the distribution. 26 | // 27 | // * The name of the copyright holders may not be used to endorse or promote products 28 | // derived from this software without specific prior written permission. 29 | // 30 | // This software is provided by the copyright holders and contributors "as is" and 31 | // any express or implied warranties, including, but not limited to, the implied 32 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 33 | // In no event shall the Intel Corporation or contributors be liable for any direct, 34 | // indirect, incidental, special, exemplary, or consequential damages 35 | // (including, but not limited to, procurement of substitute goods or services; 36 | // loss of use, data, or profits; or business interruption) however caused 37 | // and on any theory of liability, whether in contract, strict liability, 38 | // or tort (including negligence or otherwise) arising in any way out of 39 | // the use of this software, even if advised of the possibility of such damage. 40 | // 41 | //M*/ 42 | 43 | #ifndef __OPENCV_VIDEO_HPP__ 44 | #define __OPENCV_VIDEO_HPP__ 45 | 46 | #include "opencv2/video/tracking.hpp" 47 | #include "opencv2/video/background_segm.hpp" 48 | 49 | #ifdef __cplusplus 50 | namespace cv 51 | { 52 | 53 | CV_EXPORTS bool initModule_video(void); 54 | 55 | } 56 | #endif 57 | 58 | #endif //__OPENCV_VIDEO_HPP__ 59 | -------------------------------------------------------------------------------- /src/storage/hdfs_key_value.h: -------------------------------------------------------------------------------- 1 | /* 2 | *Copyright 2015 NTU (http://www.ntu.edu.sg/) 3 | *Licensed under the Apache License, Version 2.0 (the "License"); 4 | *you may not use this file except in compliance with the License. 5 | *You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | *Unless required by applicable law or agreed to in writing, software 10 | *distributed under the License is distributed on an "AS IS" BASIS, 11 | *WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | *See the License for the specific language governing permissions and 13 | *limitations under the License. 14 | */ 15 | 16 | #ifndef NTU_CAP_UNICAP_STORAGE_HDFS_KEY_VALUE_H_ 17 | #define NTU_CAP_UNICAP_STORAGE_HDFS_KEY_VALUE_H_ 18 | 19 | #include 20 | #include "kv_base.h" 21 | #include "../tools/include/hdfs/hdfs.h" 22 | 23 | namespace ntu { 24 | namespace cap { 25 | 26 | template 27 | class HdfsKeyValue : public KVStorage { 28 | 29 | public: 30 | 31 | HdfsKeyValue(); 32 | 33 | HdfsKeyValue(const std::string table_name, 34 | const int64_t shard_id, 35 | const std::string cf_name); 36 | 37 | ~HdfsKeyValue(); 38 | 39 | int64_t vector_put(std::vector row_key, 40 | std::vector column_key, 41 | std::vector value); 42 | 43 | int64_t vector_merge(std::vector row_key, 44 | std::vector column_key, 45 | std::vector value); 46 | 47 | 48 | int64_t timed_vector_put(std::vector row_key, 49 | std::vector column_key, 50 | int64_t time_stamp, 51 | std::vector value); 52 | 53 | void vector_get(std::vector row_key, 54 | std::vector column_key, 55 | std::vector& value); 56 | 57 | void scan_all(std::map>& value); 58 | 59 | void timed_scan(int64_t time_stamp, std::map>& value); 60 | 61 | struct hdfsBuilder* storage_ptr(); 62 | 63 | hdfsFS _fs; 64 | struct hdfsBuilder *_builder; 65 | std::map> _property; 66 | 67 | typedef std::map> TIMED_DATA; 68 | std::map _timed_storage; 69 | 70 | //std::map _history_data; 71 | }; 72 | 73 | } 74 | } 75 | 76 | #define HDFS_KEY_VALUE 77 | #include "hdfs_key_value.cpp" 78 | 79 | 80 | #endif /* NTU_CAP_UNICAP_STORAGE_HDFS_KEY_VALUE_H_ */ 81 | -------------------------------------------------------------------------------- /src/tools/include/leveldb/comparator.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2011 The LevelDB Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. See the AUTHORS file for names of contributors. 4 | 5 | #ifndef STORAGE_LEVELDB_INCLUDE_COMPARATOR_H_ 6 | #define STORAGE_LEVELDB_INCLUDE_COMPARATOR_H_ 7 | 8 | #include 9 | 10 | namespace leveldb { 11 | 12 | class Slice; 13 | 14 | // A Comparator object provides a total order across slices that are 15 | // used as keys in an sstable or a database. A Comparator implementation 16 | // must be thread-safe since leveldb may invoke its methods concurrently 17 | // from multiple threads. 18 | class Comparator { 19 | public: 20 | virtual ~Comparator(); 21 | 22 | // Three-way comparison. Returns value: 23 | // < 0 iff "a" < "b", 24 | // == 0 iff "a" == "b", 25 | // > 0 iff "a" > "b" 26 | virtual int Compare(const Slice& a, const Slice& b) const = 0; 27 | 28 | // The name of the comparator. Used to check for comparator 29 | // mismatches (i.e., a DB created with one comparator is 30 | // accessed using a different comparator. 31 | // 32 | // The client of this package should switch to a new name whenever 33 | // the comparator implementation changes in a way that will cause 34 | // the relative ordering of any two keys to change. 35 | // 36 | // Names starting with "leveldb." are reserved and should not be used 37 | // by any clients of this package. 38 | virtual const char* Name() const = 0; 39 | 40 | // Advanced functions: these are used to reduce the space requirements 41 | // for internal data structures like index blocks. 42 | 43 | // If *start < limit, changes *start to a short string in [start,limit). 44 | // Simple comparator implementations may return with *start unchanged, 45 | // i.e., an implementation of this method that does nothing is correct. 46 | virtual void FindShortestSeparator( 47 | std::string* start, 48 | const Slice& limit) const = 0; 49 | 50 | // Changes *key to a short string >= *key. 51 | // Simple comparator implementations may return with *key unchanged, 52 | // i.e., an implementation of this method that does nothing is correct. 53 | virtual void FindShortSuccessor(std::string* key) const = 0; 54 | }; 55 | 56 | // Return a builtin comparator that uses lexicographic byte-wise 57 | // ordering. The result remains the property of this module and 58 | // must not be deleted. 59 | extern const Comparator* BytewiseComparator(); 60 | 61 | } // namespace leveldb 62 | 63 | #endif // STORAGE_LEVELDB_INCLUDE_COMPARATOR_H_ 64 | -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required (VERSION 2.8.12) 2 | project (UniCAP) 3 | 4 | set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) 5 | 6 | set(CMAKE_BUILD_TYPE "Debug") 7 | #set(CMAKE_BUILD_TYPE "Release") 8 | #set(CMAKE_VERBOSE_MAKEFILE ON) 9 | 10 | include(CheckCXXCompilerFlag) 11 | CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11) 12 | if(COMPILER_SUPPORTS_CXX11) 13 | message("The compiler ${CMAKE_CXX_COMPILER} support c++11") 14 | else() 15 | message(STATUS "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support. Please use a different C++ compiler.") 16 | endif() 17 | 18 | set(CMAKE_CXX_FLAGS_DEBUG "$ENV{CXXFLAGS} -O0 -Wall -g -ggdb -std=c++11") 19 | set(CMAKE_CXX_FLAGS_RELEASE "$ENV{CXXFLAGS} -O3 -Wall -std=c++11") 20 | 21 | set(LINK_DIR /lib /usr/lib /usr/local/lib ${CMAKE_SOURCE_DIR}/src/tools/lib) 22 | 23 | set(CMAKE_CXX_COMPILER "g++") 24 | INCLUDE_DIRECTORIES(/usr/local/include) 25 | 26 | FIND_LIBRARY(libyaml-cpp NAMES "yaml-cpp" PATHS ${LINK_DIR}) 27 | IF(NOT libyaml-cpp) 28 | MESSAGE(FATAL_ERROR “libyaml-cpp not found”) 29 | ENDIF(NOT libyaml-cpp) 30 | MESSAGE(--${libyaml-cpp}) 31 | 32 | FIND_LIBRARY(libhdfs NAMES "hdfs" PATHS ${LINK_DIR}) 33 | IF(NOT libhdfs) 34 | MESSAGE(FATAL_ERROR “libhdfs not found”) 35 | ENDIF(NOT libhdfs) 36 | MESSAGE(--${libhdfs}) 37 | 38 | FIND_LIBRARY(libthrift NAMES "thrift" PATHS ${LINK_DIR}) 39 | IF(NOT libthrift) 40 | MESSAGE(FATAL_ERROR “libthrift not found”) 41 | ENDIF(NOT libthrift) 42 | MESSAGE(--${libthrift}) 43 | 44 | FIND_LIBRARY(libglog NAMES "glog" PATHS ${LINK_DIR}) 45 | IF(NOT libglog) 46 | MESSAGE(FATAL_ERROR “libglog not found”) 47 | ENDIF(NOT libglog) 48 | MESSAGE(--${libglog}) 49 | 50 | FIND_LIBRARY(libleveldb NAMES "leveldb" PATHS ${LINK_DIR}) 51 | IF(NOT libleveldb) 52 | MESSAGE(FATAL_ERROR “libleveldb not found”) 53 | ENDIF(NOT libleveldb) 54 | MESSAGE(--${libleveldb}) 55 | 56 | FIND_LIBRARY(libsnappy NAMES "snappy" PATHS ${LINK_DIR}) 57 | IF(NOT libsnappy) 58 | MESSAGE(FATAL_ERROR “libsnappy not found”) 59 | ENDIF(NOT libsnappy) 60 | MESSAGE(--${libsnappy}) 61 | 62 | FIND_LIBRARY(libmpi NAMES "mpi" PATHS ${LINK_DIR}) 63 | IF(NOT libmpi) 64 | MESSAGE(FATAL_ERROR “libmpi not found”) 65 | ENDIF(NOT libmpi) 66 | MESSAGE(--${libmpi}) 67 | 68 | FIND_PACKAGE( Boost 1.5 COMPONENTS system filesystem thread REQUIRED ) 69 | INCLUDE_DIRECTORIES( ${Boost_INCLUDE_DIR} ) 70 | 71 | FIND_PACKAGE( OpenCV REQUIRED) 72 | 73 | add_subdirectory(src/common) 74 | add_subdirectory(src/storage) 75 | add_subdirectory(src/gen) 76 | add_subdirectory(src/job_tracker) 77 | add_subdirectory(src/computing) 78 | add_subdirectory(app) 79 | 80 | 81 | set(CMAKE_CXX_COMPILER "mpic++") 82 | add_subdirectory(src/task_tracker) 83 | 84 | -------------------------------------------------------------------------------- /src/tools/include/opencv/cxcore.h: -------------------------------------------------------------------------------- 1 | /*M/////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 4 | // 5 | // By downloading, copying, installing or using the software you agree to this license. 6 | // If you do not agree to this license, do not download, install, 7 | // copy or use the software. 8 | // 9 | // 10 | // License Agreement 11 | // For Open Source Computer Vision Library 12 | // 13 | // Copyright (C) 2000-2008, Intel Corporation, all rights reserved. 14 | // Copyright (C) 2009, Willow Garage Inc., all rights reserved. 15 | // Third party copyrights are property of their respective owners. 16 | // 17 | // Redistribution and use in source and binary forms, with or without modification, 18 | // are permitted provided that the following conditions are met: 19 | // 20 | // * Redistribution's of source code must retain the above copyright notice, 21 | // this list of conditions and the following disclaimer. 22 | // 23 | // * Redistribution's in binary form must reproduce the above copyright notice, 24 | // this list of conditions and the following disclaimer in the documentation 25 | // and/or other materials provided with the distribution. 26 | // 27 | // * The name of the copyright holders may not be used to endorse or promote products 28 | // derived from this software without specific prior written permission. 29 | // 30 | // This software is provided by the copyright holders and contributors "as is" and 31 | // any express or implied warranties, including, but not limited to, the implied 32 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 33 | // In no event shall the Intel Corporation or contributors be liable for any direct, 34 | // indirect, incidental, special, exemplary, or consequential damages 35 | // (including, but not limited to, procurement of substitute goods or services; 36 | // loss of use, data, or profits; or business interruption) however caused 37 | // and on any theory of liability, whether in contract, strict liability, 38 | // or tort (including negligence or otherwise) arising in any way out of 39 | // the use of this software, even if advised of the possibility of such damage. 40 | // 41 | //M*/ 42 | 43 | #ifndef __OPENCV_OLD_CXCORE_H__ 44 | #define __OPENCV_OLD_CXCORE_H__ 45 | 46 | //#if defined(__GNUC__) 47 | //#warning "This is a deprecated opencv header provided for compatibility. Please include a header from a corresponding opencv module" 48 | //#endif 49 | 50 | #include "opencv2/core/core_c.h" 51 | #include "opencv2/core/core.hpp" 52 | 53 | #endif 54 | --------------------------------------------------------------------------------