repo_name
stringlengths
5
122
path
stringlengths
3
232
text
stringlengths
6
1.05M
zyb2013/shiny-engine
game_client/src/framework/ClientModule.cpp
<filename>game_client/src/framework/ClientModule.cpp /* * File: ClientModule.cpp * Author: <NAME> * * Created on 2014_4_28, 13:15 */ #include "ClientModule.h" #include "Log.h" #include "NodeDefines.h" #include "msg_login_login.pb.h" using namespace mdl; using namespace util; CClientModule::CClientModule(co...
zyb2013/shiny-engine
agent_server/src/framework/AgentServerRegister.cpp
/* * File: AgentServerRegister.cpp * Author: <NAME> * * Created on 2010_10_7 PM 11:45 */ #include "Log.h" #include "NodeDefines.h" #include "AppConfig.h" #include "AgentServerRegister.h" #include "ModuleManager.h" #include "ControlCentreStubImpEx.h" #include "ProcessStatus.h" #include "IncludeModule.h" using ...
zyb2013/shiny-engine
game_client/src/framework/NodeDefines.cpp
#include "NodeDefines.h" volatile long g_serverStatus = SERVER_STATUS_IDLE;
zyb2013/shiny-engine
shared/deps/rpcz/connection.hpp
// Copyright 2011 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applica...
zyb2013/shiny-engine
login_server/src/framework/LoginServiceImp.cpp
<reponame>zyb2013/shiny-engine #include "LoginServiceImp.h" #include "LoginServer.h" CLoginServiceImp::CLoginServiceImp( const std::string& strServerBind, const std::string& servantAddress, const std::string& serverName, uint16_t serverId, CreatePlayerMethod createPlayerMethod /*= NULL*/, ListInterestsMethod li...
zyb2013/shiny-engine
game_server/src/template/ConfigTemplate.cpp
#include "ConfigTemplate.h" #include "CsvParser.h" #include "NodeDefines.h" #define FIELD_NAME std::string("Name") #define FIELD_VALUE std::string("Value") CConfigTemplate::CConfigTemplate(void) { // register the config name m_rows[CONFIG_PHYPOWER_INTERVAL_NAME] = 0; m_rows[CONFIG_PHYPOWER_RECOVER_NAME] =...
zyb2013/shiny-engine
agent_server/src/framework/cache.pb.cc
<reponame>zyb2013/shiny-engine<gh_stars>10-100 // Generated by the protocol buffer compiler. DO NOT EDIT! // source: cache.proto #define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION #include "cache.pb.h" #include <algorithm> #include <google/protobuf/stubs/common.h> #include <google/protobuf/stubs/once.h> #include ...
zyb2013/shiny-engine
rank_server/src/framework/RankServerRegister.cpp
<gh_stars>10-100 /* * File: RankServerRegister.cpp * Author: <NAME> * * Created on 2010_9_6 PM 3:23 */ #include "Log.h" #include "NodeDefines.h" #include "AppConfig.h" #include "RankServerRegister.h" #include "ModuleManager.h" #include "ControlCentreStubImpEx.h" #include "WorkerOperateHelper.h" #include "Process...
zyb2013/shiny-engine
agent_server/src/framework/data_packet.pb.cc
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: data_packet.proto #define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION #include "data_packet.pb.h" #include <algorithm> #include <google/protobuf/stubs/common.h> #include <google/protobuf/stubs/once.h> #include <google/protobuf/io/coded_stream.h>...
zyb2013/shiny-engine
shared/deps/rpcz/connection.cc
<filename>shared/deps/rpcz/connection.cc // Copyright 2011 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICE...
zyb2013/shiny-engine
shared/source/timerevent/TimerManager.cpp
/* * File: TimerManager.cpp * Author: <NAME> * * Created on 2010_9_17, 9:45 */ #include "TimerManager.h" using namespace thd; using namespace util; namespace evt { /** * defined TimerManager */ void CTimerManager::OnShutdown() { atomic_xchg8(&bExit, true); } void CTimerManager::OnTimeout(bool bWo...
zyb2013/shiny-engine
game_server/src/template/TestTemplate.cpp
<reponame>zyb2013/shiny-engine #include "TestTemplate.h" #include "CsvParser.h" #include "NodeDefines.h" #include "StringResolved.h" #define FIELD_ID std::string("ID") #define FIELD_EFFECT std::string("Effect") #define FIELD_VALUE std::string("Value") #define FIELD_VALUE_LV std::string("Value_Lv") #define FIELD_EFFECT...
zyb2013/shiny-engine
shared/source/threading/ThreadPool.cpp
#include "ThreadPool.h" #include "Log.h" #include "CircleQueue.h" #include "SysTickCount.h" using namespace util; #ifdef WIN32 #include <process.h> #endif namespace thd { inline static int32_t AtomicDecUntilZero(volatile int32_t* pValue) { int32_t Old; int32_t New; do { Old = *pValue; if(Old > 0) { New = ...
zyb2013/shiny-engine
cache_server/src/CacheServiceImp.cpp
<filename>cache_server/src/CacheServiceImp.cpp<gh_stars>10-100 #include "CacheServiceImp.h" #include "ModuleManager.h" #include "BodyMessage.h" #include "NodeDefines.h" #include "CacheOperateHelper.h" #include "CacheMemoryManager.h" #include "CacheDBManager.h" #include "WorkerOperateHelper.h" #include "ControlCentreSt...
zyb2013/shiny-engine
shared/source/utility/Utf8.cpp
<gh_stars>10-100 #include "Utf8.h" #include "stdlib.h" #include <stdio.h> #include <wchar.h> #include <exception> #include <assert.h> #include <string.h> #if defined(WIN32) #include <windows.h> #pragma warning(disable : 4244) #endif namespace util { #define STRING_BU...
zyb2013/shiny-engine
shared/deps/rpcz/rpcz.pb.cc
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: rpcz.proto #define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION #include "rpcz.pb.h" #include <algorithm> #include <google/protobuf/stubs/common.h> #include <google/protobuf/stubs/once.h> #include <google/protobuf/io/coded_stream.h> #include <goo...
zyb2013/shiny-engine
shared/deps/rpcz/application_options.hpp
<filename>shared/deps/rpcz/application_options.hpp #ifndef RPCZ_APPLICATION_OPTIONS_H #define RPCZ_APPLICATION_OPTIONS_H #include <boost/thread.hpp> namespace zmq { class context_t; } // namespace zmq namespace rpcz { // Thread-safe. class application_options { public: application_options(void); ~application_...
zyb2013/shiny-engine
shared/source/utility/BitSignSet.cpp
#include <iostream> #include <malloc.h> #include <stdexcept> #include <cstdio> #include <cstring> #include "BitSignSet.h" namespace util { #define MOD8(value) ((value) & 0x7) #define DIV8(value) ((value) >> 3) #define MUL8(value) ((value) << 3) #define MOD16(value) ((value) & 0xf) #define DIV16(value) ((value) >> 4)...
zyb2013/shiny-engine
login_server/src/framework/LoginModule.cpp
<reponame>zyb2013/shiny-engine /* * File: LoginModule.cpp * Author: <NAME> * * Created on 2014_4_28, 13:15 */ #include "LoginModule.h" #include "Log.h" #include "NodeDefines.h" #include "WorkerOperateHelper.h" #include "msg_login_login.pb.h" #include "HttpClientManager.h" #include "LoginWebRequest.h" #include "A...
zyb2013/shiny-engine
agent_server/src/framework/msg_client_login.pb.cc
<filename>agent_server/src/framework/msg_client_login.pb.cc // Generated by the protocol buffer compiler. DO NOT EDIT! // source: msg_client_login.proto #define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION #include "msg_client_login.pb.h" #include <algorithm> #include <google/protobuf/stubs/common.h> #include <goog...
zyb2013/shiny-engine
shared/source/utility/SeparatedStream.cpp
<reponame>zyb2013/shiny-engine<filename>shared/source/utility/SeparatedStream.cpp #include "SeparatedStream.h" #include <stdexcept> util::CSeparatedStream::CSeparatedStream( char delim, char enclosure_delim /*= ','*/, SeparatedType sepdType /*= SEPDTYPE_FIRSTANDLAST_EMPTY*/, int allocBytes /*= StackAllocationSize*...
zyb2013/shiny-engine
rank_server/src/protocol/msg_rank_request.pb.cc
<filename>rank_server/src/protocol/msg_rank_request.pb.cc // Generated by the protocol buffer compiler. DO NOT EDIT! // source: msg_rank_request.proto #define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION #include "msg_rank_request.pb.h" #include <algorithm> #include <google/protobuf/stubs/common.h> #include <google...
zyb2013/shiny-engine
shared/source/network/TCPSocketLinux.cpp
<reponame>zyb2013/shiny-engine<filename>shared/source/network/TCPSocketLinux.cpp /* * File: TCPSocketLinux.cpp * Author: <NAME> * * Created on 2011_6_1 9:56 */ #if defined( __LINUX__ ) || defined( __ANDROID__ ) || defined( ANDROID ) || defined (__GNUC__) #include "TCPSocketLinux.h" #include "NetworkTypes.h" #inc...
zyb2013/shiny-engine
game_client/src/framework/PlayerFactory.cpp
<gh_stars>10-100 #include "PlayerFactory.h" #include "PlayerBase.h" using namespace util; CAutoPointer<CPlayerBase> CPlayerFactory::CreatePlayer(uint64_t userId) { return CAutoPointer<CPlayerBase>(); }
zyb2013/shiny-engine
shared/deps/rpcz/internal_commands.hpp
// Copyright 2011 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applica...
zyb2013/shiny-engine
shared/deps/rpcz/client_request_callback.hpp
#ifndef RPCZ_CLIENT_REQUEST_CALLBACK_H #define RPCZ_CLIENT_REQUEST_CALLBACK_H #include <boost/function.hpp> #include "connection_manager_status.hpp" namespace rpcz { class message_iterator; typedef boost::function<void(connection_manager_status, message_iterator&)> client_request_callback; } // namespace rpcz...
zyb2013/shiny-engine
shared/deps/rpcz/reactor.hpp
// Copyright 2011 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applica...
zyb2013/shiny-engine
shared/source/timerevent/CommandManager.cpp
<filename>shared/source/timerevent/CommandManager.cpp #include "CommandManager.h" namespace evt { void CommandManager::ShowCommand(SHOW_COMMAND_LIST_T& outList) { outList.resize(eventmap.size()); thd::CScopedReadLock scopedReadLock(rwTicket); event_map_t::iterator it = eventmap.begin(); for(int i = 0;event...
zyb2013/shiny-engine
shared/deps/rpcz/connection_manager.hpp
<reponame>zyb2013/shiny-engine<filename>shared/deps/rpcz/connection_manager.hpp // Copyright 2011 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // ...
zyb2013/shiny-engine
shared/deps/rpcz/rpc_channel.hpp
<gh_stars>10-100 // Copyright 2011 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless re...
zyb2013/shiny-engine
shared/source/database/CreateInterface.cpp
<gh_stars>10-100 /* * File: CreateInterface.cpp * Author: <NAME> * */ #include "DatabaseEnv.h" #include "Log.h" #if defined(ENABLE_DATABASE_MYSQL) #include "MySQLDatabase.h" #endif using namespace util; namespace db { void Database::CleanupLibs() { #if defined(ENABLE_DATABASE_MYSQL) mysql_library_end(); #e...
zyb2013/shiny-engine
master_server/src/framework/CacheModuleEx.cpp
<reponame>zyb2013/shiny-engine<gh_stars>10-100 #include "CacheModuleEx.h" #include "ShareDefines.h" CCacheModuleEx::CCacheModuleEx(void) : CCacheModule() { } CCacheModuleEx::CCacheModuleEx( const std::string& moduleName, const std::string& endPoint, uint16_t serverId) : CCacheModule(moduleName, endPoint, serve...
zyb2013/shiny-engine
shared/deps/memcacheclient/ReadWriteBuffer.cpp
<reponame>zyb2013/shiny-engine<gh_stars>10-100 /*! @file ReadWriteBuffer.cpp @version 2.0 @brief Byte buffer management */ #include <new> #include <stdexcept> // local #include "ReadWriteBuffer.h" /////////////////////////////////////////////////////////////////////////////// // ReadWriteBuffer...
zyb2013/shiny-engine
agent_server/src/framework/AgentLogic.cpp
/* * File: AgentLogic.cpp * Author: <NAME> * * Created on 2010_10_6 PM 2:45 */ #include "AgentLogic.h" #include "Log.h" #include "Md5.h" #include "CacheOperateHelper.h" #include "WorkerOperateHelper.h" #include "msg_agent_login.pb.h" #include "msg_client_login.pb.h" #include "TimerManager.h" #include "GuidFacto...
zyb2013/shiny-engine
shared/source/network/BitStream.cpp
// This should be on by default for speed. Turn it off if you actually need endian swapping #define __BITSTREAM_BIG_END //#define __BITSTREAM_NATIVE_END #include "BitStream.h" #include <math.h> #include <assert.h> #include <string.h> #ifdef _WIN32 #include <stdlib.h> #include <memory.h> #include <stdio.h> #include <...
zyb2013/shiny-engine
shared/deps/rpcz/server_impl.cc
// Copyright 2011 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable...
zyb2013/shiny-engine
cache_server/src/CacheMemory.cpp
#include "CacheMemoryManager.h" #include "NodeDefines.h" #include "CacheDBManager.h" #include "DatabaseEnv.h" #include "Log.h" #include "SeparatedStream.h" using namespace util; using namespace db; using namespace thd; MCResult CCacheMemory::AddToDB(bool bResetFlag /*= false*/) { CTransferStream tranKey(GetKey(), ...
zyb2013/shiny-engine
shared/deps/rpcz/server_function.hpp
#ifndef RPCZ_SERVER_FUNCTION_H #define RPCZ_SERVER_FUNCTION_H #include <boost/function.hpp> namespace rpcz { class client_connection; class message_iterator; typedef boost::function<void(const client_connection&, message_iterator&)> server_function; } // namespace rpcz #endif // RPCZ_CLIENT_REQUEST_CALLBACK...
zyb2013/shiny-engine
agent_server/src/framework/cache.rpcz.cc
<gh_stars>10-100 // Generated by the protocol buffer compiler. DO NOT EDIT! #include "cache.rpcz.h" #include "cache.pb.h" #include <google/protobuf/descriptor.h> #include <google/protobuf/stubs/once.h> #include <rpcz/rpcz.hpp> namespace { const ::google::protobuf::ServiceDescriptor* CacheService_descriptor_ = NULL; }...
zyb2013/shiny-engine
agent_server/src/framework/controlcentre.rpcz.cc
// Generated by the protocol buffer compiler. DO NOT EDIT! #include "controlcentre.rpcz.h" #include "controlcentre.pb.h" #include <google/protobuf/descriptor.h> #include <google/protobuf/stubs/once.h> #include <rpcz/rpcz.hpp> namespace { const ::google::protobuf::ServiceDescriptor* ControlCentreService_descriptor_ = ...
zyb2013/shiny-engine
agent_server/src/framework/AgentModule.cpp
/* * File: AgentModule.cpp * Author: <NAME> * * Created on 2014_7_9, 16:00 */ #include "AgentModule.h" #include "NodeDefines.h" #include "Log.h" #include "WorkerOperateHelper.h" #include "GuidFactory.h" #include "TimerManager.h" #include "CallBack.h" #include "AgentServer.h" using namespace mdl; using namespa...
zyb2013/shiny-engine
rank_server/src/protocol/msg_rank_item.pb.cc
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: msg_rank_item.proto #define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION #include "msg_rank_item.pb.h" #include <algorithm> #include <google/protobuf/stubs/common.h> #include <google/protobuf/stubs/once.h> #include <google/protobuf/io/coded_strea...
zyb2013/shiny-engine
shared/deps/rpcz/application_options.cc
<filename>shared/deps/rpcz/application_options.cc // Author: <NAME> (http://blog.csdn.net/jq0123) #include "application_options.hpp" namespace rpcz { boost::mutex application_options::mutex_; int application_options::connection_manager_threads_ = 1; zmq::context_t* application_options::zmq_context_ = NULL; int appli...
zyb2013/shiny-engine
shared/source/utility/GuidFactory.cpp
<gh_stars>10-100 /* * File: GuidFactory.cpp * Author: <NAME> * * Created on 2011_7_26, 11:09 */ #include "GuidFactory.h" #include "TimestampManager.h" // 2014-1-1 00:00:00 #define START_FILETIME (1391184000) #define TIMESTAMP_MASK 0xFFFFFFFF #define TIMESTAMP_BIT 32 #define CODE_MASK 0xFFFF #define CODE_BI...
zyb2013/shiny-engine
master_server/src/framework/msg_master_data.pb.cc
<reponame>zyb2013/shiny-engine<gh_stars>10-100 // Generated by the protocol buffer compiler. DO NOT EDIT! // source: msg_master_data.proto #define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION #include "msg_master_data.pb.h" #include <algorithm> #include <google/protobuf/stubs/common.h> #include <google/protobuf/stu...
zyb2013/shiny-engine
game_server/src/framework/TemplateBase.cpp
#include "TemplateBase.h" #include "CsvParser.h" #include "NodeDefines.h" #include "Log.h" using namespace util; bool CTemplateBase::Init(const std::string& strPath, const std::string& strFileName) { if(!m_bInit) { m_bInit = true; std::string strFullPath; if(!strPath.empty()) { ...
zyb2013/shiny-engine
shared/deps/stacktrace/StackTrace.cpp
#include "StackTrace.h" #include "MapFile.h" #include "MapFileEntry.h" #include <string.h> #include <stdio.h> //----------------------------------------------------------------------------- #define MAX_DEPTH 32 //----------------------------------------------------------------------------- namespace dev { static ...
zyb2013/shiny-engine
game_client/src/framework/GameClient.cpp
<gh_stars>10-100 /* * File: GameClient.cpp * Author: <NAME> * * Created on 2010_9_6 PM 3:23 */ #include <stdio.h> #include <iostream> #include <iosfwd> #include <ios> #include "Log.h" #include "Md5.h" #include "TimerManager.h" #include "NodeDefines.h" #include "AppConfig.h" #include "GameClient.h" #include "Modu...
zyb2013/shiny-engine
shared/source/httpclient/CurlMultiMT.cpp
<filename>shared/source/httpclient/CurlMultiMT.cpp<gh_stars>10-100 #include "CurlMultiMT.h" #include "ScopedLock.h" #include "curl.h" using namespace thd; namespace ntwk { CCurlMultiMT::CCurlMultiMT() : m_multiHandle(NULL) { CScopedLock lock(m_mutex); m_multiHandle = curl_multi_init(); } CCurlMultiMT::~CCurlMulti...
zyb2013/shiny-engine
game_server/src/memcache/PlayerData.cpp
#include "PlayerData.h" #include "CacheOperateHelper.h" #include "Log.h" #include "TransferStream.h" #include "ValueStream.h" #define CACHE_TABLE_NAME "game_character" MCResult CPlayerData::LoadAllRecord(CResponseRows& outRecords, uint64_t u64Route, const util::CValueStream& strKeys, uint32_t nCount/* = 0*/, uint32...
zyb2013/shiny-engine
game_server/src/framework/GameServerRegister.cpp
/* * File: GameServerRegister.cpp * Author: <NAME> * * Created on 2010_9_6 PM 3:23 */ #include "NodeDefines.h" #include "GameServerRegister.h" #include "AppConfig.h" #include "ModuleManager.h" #include "CommandManager.h" #include "ThreadPool.h" #include "ControlCentreStubImpEx.h" #include "WorkerOperateHelper.h"...
zyb2013/shiny-engine
cache_server/src/CacheMySqlAdpt.cpp
<filename>cache_server/src/CacheMySqlAdpt.cpp #include "CacheMySqlAdpt.h" static const char* s_varType[] = {"tinyint","smallint","mediumint","integer","bigint","int", "bit","real","double","float","decimal","numeric","varchar","char","timestamp","datetime", "date","time","year","tinyblob","mediumblob","longblob","bl...
zyb2013/shiny-engine
shared/source/network/TCPPacketInterface.cpp
/* * File: TCPPacketInterface.cpp * Author: <NAME> * * Created on 2011_9_14 14:50 */ #include "TCPPacketInterface.h" #include "NetworkTypes.h" #include "NetworkTrace.h" #include <algorithm> #include <string.h> #if defined( __WIN32__ ) || defined( WIN32 ) || defined( _WIN32 ) #include <process.h> #endif using ...
zyb2013/shiny-engine
shared/deps/luaplus/src/LuaObject.cpp
/////////////////////////////////////////////////////////////////////////////// // This source file is part of the LuaPlus source distribution and is Copyright // 2001-2010 by <NAME> (<EMAIL>). // // The latest version may be obtained from http://luaplus.org/. // // The code presented in this file may be used in any en...
zyb2013/shiny-engine
shared/source/utility/PrintStackTrace.cpp
/* * Copyright (c) 2001 <NAME> * * Permission to use, copy, modify, distribute and sell this * software and its documentation for any purpose is hereby * granted without fee, provided that the above copyright notice * appear in all copies and that both that copyright notice and * this permission notice appear in...
zyb2013/shiny-engine
shared/deps/rpcz/connection_manager.cc
// Copyright 2011 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applica...
zyb2013/shiny-engine
agent_server/src/framework/ProtoRpczServiceImpl.cpp
#include "ProtoRpczServiceImpl.h" #include <google/protobuf/descriptor.h> #include <google/protobuf/message.h> #include <zmq.hpp> #include "logging.hpp" #include "rpc_controller.hpp" #include "ThreadPool.h" using namespace rpcz; using namespace thd; namespace node { void CProtoRpcServiceImpl::dispatch_request(co...
zyb2013/shiny-engine
game_server/src/framework/CacheRecord.cpp
#include "CacheRecordManager.h"
zyb2013/shiny-engine
shared/deps/stacktrace/TextFile.cpp
<filename>shared/deps/stacktrace/TextFile.cpp #include "TextFile.h" #include <stdio.h> #include <ctype.h> //----------------------------------------------------------------------------- namespace dev { class TextFile::TextFileImpl { public: TextFile::ErrorType err; int line; explicit TextFileImpl( const c...
zyb2013/shiny-engine
game_server/src/framework/SepaTableStore.cpp
<reponame>zyb2013/shiny-engine<filename>game_server/src/framework/SepaTableStore.cpp #include "SepaTableStore.h" #include "Log.h" #include "CacheOperateHelper.h" #include "SmallBuffer.h" #include "ValueStream.h" using namespace mdl; using namespace ntwk; using namespace util; CSepaTableStore::CSepaTableStore(uint16_t...
srizzi88/nekRS
src/timer.cpp
<reponame>srizzi88/nekRS<gh_stars>1-10 #include <iostream> #include <string> #include <map> #include <algorithm> #include "occa.hpp" #include "mpi.h" #include "timer.hpp" namespace timer { namespace { typedef struct tagData_{ int count; double hostElapsed; double deviceElapsed; double startTime; occa::str...
srizzi88/nekRS
src/nekInterface/nekInterfaceAdapter.cpp
#include <unistd.h> #include <fstream> #include "nrs.hpp" #include "nekInterfaceAdapter.hpp" nekdata_private nekData; static int rank; static setupAide *options; static void (*usrdat_ptr)(void); static void (*usrdat2_ptr)(void); static void (*usrdat3_ptr)(void); static void (*userchk_ptr)(void); static void (*userv...
srizzi88/nekRS
src/cfl.hpp
#if !defined(nekrs_cfl_hpp_) #define nekrs_cfl_hpp_ #include "nekrs.hpp" dfloat computeCFL(ins_t *ins, dfloat time, int tstep); #endif
srizzi88/nekRS
src/configReader.cpp
#include <cstdio> #include <string> #include <vector> #include <iostream> #include <fstream> #include <unistd.h> #include <getopt.h> #include <stdlib.h> #include "inipp.hpp" #include "nrs.hpp" #define ABORT(a) { if(rank==0) cout << a << endl; MPI_Finalize(); exit(1); } #define UPPER(a) { transform(a.begin(), a.end...
srizzi88/nekRS
src/filter.cpp
#include "ins.h" void filterFunctionRelaxation1D(int Nmodes, int Nc, dfloat *A); void filterVandermonde1D(int N, int Np, dfloat *r, dfloat *V); dfloat filterSimplex3D(dfloat a, dfloat b, dfloat c, int i, int j, int k); dfloat filterJacobiP(dfloat a, dfloat alpha, dfloat beta, int N); dfloat filterFactorial(int n);...
srizzi88/nekRS
src/main.cpp
/*---------------------------------------------------------------------------*\ Copyright (c) 2019, UCHICAGO ARGONNE, LLC. The UChicago Argonne, LLC as Operator of Argonne National Laboratory holds copyright in the Software. The copyright holder reserves all rights except those expressly granted to licensees, and U.S...
srizzi88/nekRS
src/inipp.hpp
<filename>src/inipp.hpp<gh_stars>1-10 /* MIT License Copyright (c) 2017-2018 <NAME> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to...
srizzi88/nekRS
src/meshSetup.hpp
#if !defined(nekrs_meshsetup_hpp_) #define nekrs_meshsetup_hpp_ #include "nekrs.hpp" mesh_t *createMeshDummy(MPI_Comm comm, int N, setupAide &options, occa::properties &kernelInfo); mesh_t *createMeshT(MPI_Comm comm, int N, int isMeshT, setupAide &options, occa::properties &kernelInfo); mesh_t *createMeshV(MPI_Comm co...
srizzi88/nekRS
src/insSetup.cpp
#include "nrs.hpp" #include "meshSetup.hpp" #include "nekInterfaceAdapter.hpp" #include "udf.hpp" #include "filter.hpp" #include "bcMap.hpp" static dfloat *scratch; static occa::memory o_scratch; cds_t *cdsSetup(ins_t *ins, mesh_t *mesh, setupAide &options, occa::properties &kernelInfoH); ins_t *insS...
srizzi88/nekRS
src/tombo.cpp
#include "nrs.hpp" #include "udf.hpp" namespace tombo { occa::memory pressureSolve(ins_t *ins, dfloat time) { mesh_t *mesh = ins->mesh; ins->curlKernel(mesh->Nelements, mesh->o_vgeo, mesh->o_Dmatrices, mesh->o_MM, ins->fieldOffset, ...
srizzi88/nekRS
src/meshNekReader.hpp
<reponame>srizzi88/nekRS #if !defined(nekrs_meshnekreader_hpp_) #define nekrs_meshnekreader_hpp_ #include "nekrs.hpp" void meshNekReaderHex3D(int N, mesh_t *mesh, int isMeshT); #endif
srizzi88/nekRS
src/libParanumal.hpp
<reponame>srizzi88/nekRS #if !defined(nekrs_libparanumal_hpp_) #define nekrs_libparanumal_hpp_ #include "mesh.h" #include "mesh3D.h" namespace libParanumal { // Data structures using ::mesh_t; using ::mesh3D; using ::setupAide; // mesh using ::meshParallelConnect; using ::meshHaloSetup; using ::meshC...
srizzi88/nekRS
src/parReader.hpp
#if !defined(nekrs_parreader_hpp_) #define nekrs_parreader_hpp_ #include "nekrs.hpp" libParanumal::setupAide parRead(std::string &setupFile, MPI_Comm comm); #endif
srizzi88/nekRS
src/tombo.hpp
#if !defined(nekrs_tombo_hpp_) #define nekrs_tombo_hpp_ #include "nekrs.hpp" namespace tombo { occa::memory pressureSolve(ins_t *ins, dfloat time); occa::memory velocitySolve(ins_t *ins, dfloat time); } #endif
srizzi88/nekRS
src/insSetup.hpp
<filename>src/insSetup.hpp #if !defined(nekrs_inssetup_hpp_) #define nekrs_inssetup_hpp_ #include "nekrs.hpp" ins_t *insSetup(MPI_Comm comm, setupAide &options, int buildOnly); #endif
srizzi88/nekRS
src/occaDeviceConfig.cpp
<reponame>srizzi88/nekRS #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include "omp.h" #include "mpi.h" #include "mesh.h" void occaDeviceConfig(mesh_t *mesh, setupAide &options){ // OCCA build stuff char deviceConfig[BUFSIZ]; int rank, size; rank = mesh->rank; size = mesh->...
mr-technologies/imagebroker
imagebroker.cpp
<filename>imagebroker.cpp // std #include <map> #include <stack> #include <chrono> #include <thread> #include <vector> #include <cassert> #include <fstream> #include <condition_variable> // json #include <nlohmann/json.hpp> using json = nlohmann::json; // OpenCV #include <opencv2/opencv.hpp> #include <opencv2/highgui...
abdelfatah150/LearnCPP
M-MathematicalAlgorithms/avarage of 3 nums c++ code.cpp
<reponame>abdelfatah150/LearnCPP #include <algorithm> #include <iostream> using namespace std; int main() { int n1, n2 ,n3; cout << "Enter 3 numbers integers to calculate the average: " << endl; cin >> n1 >> n2 >> n3; cout << "The Average = " << (n1+n2+n3)/3 << endl; }
elbosso/EB_Image
EB_Band.cc
<reponame>elbosso/EB_Image /**************************************************************************** * * File : EB_Band.cc * Class : EB_Band * based on : * uses : * * Author : VIP-Projektbearbeiter <<EMAIL>> * TU Ilmenau / Fak. IA / FG Neuroinformatik * Date : Tu...
elbosso/EB_Image
PNM_Image.cc
<gh_stars>0 /**************************************************************************** * * File : PNM_Image.cc * Class : PNM_Image * based on : EB_Image * uses : * * Author : VIP-Projektbearbeiter <<EMAIL>> * TU Ilmenau / Fak. IA / FG Neuroinformatik * Date : Tue M...
elbosso/EB_Image
EB_PixelDescriptor.cc
#include "EB_PixelDescriptor.h" EB_PixelDescriptor::EB_PixelDescriptor (unsigned int bands):components (bands) { } EB_PixelDescriptor::~EB_PixelDescriptor () { }
elbosso/EB_Image
imageclass.cc
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include <iostream.h> #include <unistd.h> #include <dirent.h> #include "EB_Image.h" #include "JPG_Image.h" #include "PNG_Image.h" #include "PNM_Image.h" #include "EB_Filter.h" #include "MPEG_Encoder.h" #include "MPEG_Decoder.h" // Makestring...
elbosso/EB_Image
EB_LookUpTable.cc
<reponame>elbosso/EB_Image /**************************************************************************** * * File : EB_LookUpTable.cc * Class : EB_LookUpTable * based on : * uses : * * Author : VIP-Projektbearbeiter <<EMAIL>> * TU Ilmenau / Fak. IA / FG Neuroinformatik * ...
elbosso/EB_Image
EB_Kohonen.cc
<filename>EB_Kohonen.cc #include<stdio.h> #include<stdlib.h> #include<math.h> #include"EB_Kohonen.h" EB_Kohonen::EB_Kohonen(int dimx, int dimy, int dimz ,int dimf,float Abs,float Relmin,float Relmax): NX(dimx), NY(dimy), NZ(dimz), NF(dimf), NeuronCount(NX*NY*NZ), KNField(new KNeuron*[NeuronCount]), ...
elbosso/EB_Image
EB_Image.cc
/**************************************************************************** * * File : EB_Image.cc * Class : EB_Image * based on : * uses : EB_Band * * Author : VIP-Projektbearbeiter <<EMAIL>> * TU Ilmenau / Fak. IA / FG Neuroinformatik * Date : Tue May 26 1998 cre...
elbosso/EB_Image
PK_EB_Kohonen.cc
<reponame>elbosso/EB_Image<filename>PK_EB_Kohonen.cc<gh_stars>0 #include<stdio.h> #include<stdlib.h> #include<math.h> #include"PK_EB_Kohonen.h" PK_EB_Kohonen::PK_EB_Kohonen (int dimz):EB_Kohonen (1, 1, dimz, 3, 1.0, 0.0, 4.5) { int x, y, z, NPlace; KNeuron *Neuron; float zpos; for (z = 0; z < NZ; z++)...
elbosso/EB_Image
EB_Filter.cc
<reponame>elbosso/EB_Image #include"EB_Filter.h" /*\Konstruktoren*/ EB_Filter::EB_Filter(unsigned int x, unsigned int y):EB_Band(((x/2==(x+1)/2)?x+1:x),((y/2==(y+1)/2)?y+1:y),0.0,-100000.0,100000.0)//, // semiwidth(width/2+1), // semiheight(height/2+1) { } EB_Filter::EB_Filter(const EB_Filter &other):EB_Band(other...
elbosso/EB_Image
EB_ColorDistHistogram.cc
<filename>EB_ColorDistHistogram.cc #include "EB_ColorDistHistogram.h" #include "EB_Band.h" /*\Konstruktoren*/ EB_ColorDistHistogram::EB_ColorDistHistogram (unsigned int count): samplecount (0), spointcount (count), lookuptable (spointcount, 255), histogram (new float[spointcount]), scaledhistogram (new float[spointcoun...
elbosso/EB_Image
EB_ImageRegion.cc
#include"EB_ImageRegion.h" bool EB_ImageRegion::isInside (int x, int y) { EB_ImageCoordinatePair startpair; EB_ImageCoordinatePair endpair; EB_ImageCoordinatePair lastendpair; unsigned int i,crosscounter=0; int z1,z2,z3,z4; if(isRegion()) { if (!preprocessed) doPreprocess (); if (x < xmin) return...
elbosso/EB_Image
EB_SinusFilter.cc
<filename>EB_SinusFilter.cc<gh_stars>0 #include"EB_SinusFilter.h" void EB_SinusFilter::calculateFilterMask(void) { unsigned int x,y; float midx=(float)width/2.0F,midy=(float)height/2.0F; unsigned int ind=0; float xarg,yarg,fcy,fcx; // cout<<fieldheight<<" "<<fieldwidth<<endl; for(y=0;y<height;++y) { yarg=(...
Alexie81/Planet
SplineEvaluation.cpp
#include "SplineEvaluation.hpp" #include "boost-hdrs/remez.hpp" #include <boost/math/tools/polynomial.hpp> #include <iostream> #include <fstream> #include <algorithm> #include <cstring> #include <cmath> #include <vector> #include <iomanip> #include <cstdlib> #include <map> #include <chrono> #include <iomanip> #include ...
blackbestiya/ptusa_main
PAC_control_projects/main_control_prg/main_control_dll_vc/main_control_dll_vc.cpp
// main_control_dll_vc.cpp: определяет экспортированные функции для приложения DLL. // #include <stdlib.h> #include "fcntl.h" #include "dtime.h" #include "prj_mngr.h" #include "PAC_dev.h" #include "PAC_info.h" #include "tech_def.h" #include "lua_manager.h" #include "PAC_err.h" #include "version_info.h" ...
blackbestiya/ptusa_main
PAC/IoT/iot_altivar.cpp
<reponame>blackbestiya/ptusa_main #include "iot_altivar.h" #include "modbus_client.h" altivar_manager::~altivar_manager() { if (nodes.size() > 0) { altivar_node_map::iterator it; for (it = nodes.begin(); it != nodes.end(); it++) { delete it->second; } } } altivar_manager* altiva...
blackbestiya/ptusa_main
PAC/linux/l_tcp_client.cpp
#include <netinet/in.h> #include <fcntl.h> #include "l_tcp_client.h" #include "l_tcp_cmctr.h" #include "PAC_err.h" #include "log.h" #include "errno.h" int linux_tcp_client::Communicate(unsigned int bytestosend) { if (!connectedstate) { if (!Connect()) { return 0; ...
blackbestiya/ptusa_main
test/PAC_info_tests.cpp
<filename>test/PAC_info_tests.cpp #include "PAC_info_tests.h" using namespace ::testing; /* TEST METHOD DEFENITION: int set_cmd( const char *prop, u_int idx, double val ) */ TEST( PAC_info, set_cmd ) { G_PAC_INFO()->set_cmd( "CMD", 0, PAC_info::RELOAD_RESTRICTIONS ); }
blackbestiya/ptusa_main
PAC/common/PAC_info.cpp
#include <string.h> #include "PAC_info.h" #include "PAC_err.h" #include "lua_manager.h" #include "bus_coupler_io.h" auto_smart_ptr < PAC_info > PAC_info::instance;///< Экземпляр класса. const u_int_4 PAC_info::MSEC_IN_DAY = 24UL * 60UL * 60UL * 1000UL; //------------------------------------------------...
blackbestiya/ptusa_main
PAC/common/bus_coupler_io.cpp
#if !defined WIN_OS && \ !( defined LINUX_OS && defined PAC_PC ) && \ !( defined LINUX_OS && defined PAC_WAGO_750_860 ) && \ !( defined LINUX_OS && defined PAC_WAGO_PFC200 ) && \ !( defined LINUX_OS && defined PAC_PLCNEXT ) #error You must define OS! #endif #include "lua_manager.h" #include "dtime.h" ...
blackbestiya/ptusa_main
PAC/common/log.cpp
<gh_stars>0 #include "log.h" #include <stdarg.h> #if defined WIN_OS #include "w_log.h" #elif defined LINUX_OS #include "l_log.h" #endif auto_smart_ptr < log_mngr > log_mngr::instance; //----------------------------------------------------------------------------- i_log* log_mngr::get_log() { i...
blackbestiya/ptusa_main
test/bus_coupler_io_tests.cpp
#include "bus_coupler_io_tests.h" #include <sys/stat.h> #include <fcntl.h> #include <stdio.h> using namespace ::testing; const int STD_OUT_FILENO = 1; /* TEST METHODS DEFENITION: void print() void print_log() */ TEST( io_manager, print ) { const int ZERO_SIZE = 0; const int ZERO_COUNT = 0; io_manager::get_...
blackbestiya/ptusa_main
PAC/common/param_ex.cpp
#include "param_ex.h" #include "lua_manager.h" auto_smart_ptr< params_manager > params_manager::instance = 0; char params_manager::is_init = 0; #ifdef USE_SIMPLE_DEV_ERRORS #include "g_errors.h" #endif // USE_SIMPLE_DEV_ERRORS #ifndef USE_NO_TANK_COMB_DEVICE #include "tech_def.h" #endif //USE_NO_TANK_COM...