MCPcopy Create free account
hub / github.com/Kitware/VTK / Send

Method Send

Filters/ParallelFlowPaths/vtkPStreamTracer.cxx:1218–1266  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1216 MessageBuffer* ReceiveBuffer;
1217
1218 void Send(int msg, int rank, Task* task)
1219 {
1220 if (task && (msg == TaskFinished))
1221 {
1222 PRINT("Done in " << task->Point->GetNumSteps() << " steps " << task->NumHops << " hops");
1223 }
1224 if (rank == this->Rank)
1225 {
1226 switch (msg)
1227 {
1228 case TaskFinished:
1229 this->TotalNumTasks--;
1230 PRINT(TotalNumTasks << " tasks left");
1231 break;
1232 default:
1233 PRINT("Unhandled message " << msg);
1234 assert(false);
1235 }
1236 }
1237 else
1238 {
1239 MessageBuffer& buf = this->NewSendBuffer();
1240 MessageStream& outStream(buf.GetStream());
1241
1242 outStream << msg << this->Rank;
1243 AssertNe(this->Rank, rank);
1244
1245 if (task)
1246 {
1247 outStream << (*task);
1248 }
1249
1250 AssertGe(this->MessageSize, outStream.GetLength());
1251 this->Controller->NoBlockSend(
1252 outStream.GetRawData(), outStream.GetLength(), rank, 561, buf.GetRequest());
1253
1254 NumSends++;
1255 if (task)
1256 {
1257 PRINT("Send " << msg << "; task "
1258 << task->GetId()); //<<" "<<task->Seed[0]<<" "<<task->Seed[1]<<"
1259 //"<<task->Seed[2]<<" to "<<rank);
1260 }
1261 else
1262 {
1263 PRINT("Send " << msg);
1264 }
1265 }
1266 }
1267 int NextProcess(Task* task)
1268 {
1269 PStreamTracerPoint* p = task->GetPoint();

Callers 15

NextTaskMethod · 0.95
ExecuteMethod · 0.45
RequestDataMethod · 0.45
ExchangeCountsLeanMethod · 0.45
ExchangeIdArraysLeanMethod · 0.45
ExchangeIdArraysFastMethod · 0.45
GenerateParticlesMethod · 0.45
MyMainFunction · 0.45

Calls 7

PRINTFunction · 0.85
NoBlockSendMethod · 0.80
assertFunction · 0.50
GetStreamMethod · 0.45
GetLengthMethod · 0.45
GetRawDataMethod · 0.45
GetIdMethod · 0.45

Tested by 6

MyMainFunction · 0.36
ExecuteMethod · 0.36
ExecuteMethod · 0.36
MergeRemoteModelsMethod · 0.36