本文整理汇总了C++中CContext::checkBuffersAndListen方法的典型用法代码示例。如果您正苦于以下问题:C++ CContext::checkBuffersAndListen方法的具体用法?C++ CContext::checkBuffersAndListen怎么用?C++ CContext::checkBuffersAndListen使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CContext
的用法示例。
在下文中一共展示了CContext::checkBuffersAndListen方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: data
void cxios_write_data_k80(const char* fieldid, int fieldid_size, double* data_k8, int data_Xsize)
{
std::string fieldid_str;
if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return;
CTimer::get("XIOS").resume();
CTimer::get("XIOS send field").resume();
CContext* context = CContext::getCurrent();
if (!context->hasServer && !context->client->isAttachedModeEnabled())
context->checkBuffersAndListen();
CArray<double, 1> data(data_k8, shape(data_Xsize), neverDeleteData);
CField::get(fieldid_str)->setData(data);
CTimer::get("XIOS send field").suspend();
CTimer::get("XIOS").suspend();
}
示例2: shape
void cxios_write_data_k47(const char* fieldid, int fieldid_size, float* data_k4,
int data_0size, int data_1size, int data_2size,
int data_3size, int data_4size, int data_5size,
int data_6size)
{
std::string fieldid_str;
if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return;
CTimer::get("XIOS").resume();
CTimer::get("XIOS send field").resume();
CContext* context = CContext::getCurrent();
if (!context->hasServer && !context->client->isAttachedModeEnabled())
context->checkBuffersAndListen();
CArray<float, 7> data_tmp(data_k4, shape(data_0size, data_1size, data_2size, data_3size, data_4size, data_5size, data_6size), neverDeleteData);
CArray<double, 7> data(data_0size, data_1size, data_2size, data_3size, data_4size, data_5size, data_6size);
data = data_tmp;
CField::get(fieldid_str)->setData(data);
CTimer::get("XIOS send field").suspend();
CTimer::get("XIOS").suspend();
}