{"id":705,"date":"2015-09-06T22:58:46","date_gmt":"2015-09-06T21:58:46","guid":{"rendered":"http:\/\/numbercrunch.de\/blog\/?p=705"},"modified":"2023-01-18T20:57:02","modified_gmt":"2023-01-18T19:57:02","slug":"mpl-data-types","status":"publish","type":"post","link":"https:\/\/www.numbercrunch.de\/blog\/2015\/09\/mpl-data-types\/","title":{"rendered":"MPL &#8211; Data types"},"content":{"rendered":"<p style=\"text-align: justify;\">In earlier posts I gave an introduction to the <a href=\"https:\/\/github.com\/rabauke\/mpl\" target=\"_blank\" rel=\"noopener\">Message Passing Library<\/a> (MPL). With MPL processes can send and receive messages with data of different data types. What kind of data types are supported by MPL? MPL supports the same kinds of elementary data types as MPI does. These are:<\/p>\n<ul>\n<li style=\"text-align: justify;\">the integer types <code>char<\/code>, <code>short int<\/code>, <code>int<\/code>, <code>long int<\/code>, <code>long long int<\/code> as well as the unsigned variants thereof.<\/li>\n<li style=\"text-align: justify;\">the boolean type <code>bool<\/code>.<\/li>\n<li style=\"text-align: justify;\">the floating point types <code>float<\/code>, <code>double<\/code> and <code>long double<\/code>.<\/li>\n<li style=\"text-align: justify;\">the complex types <code>std::complex&lt;float&gt;<\/code>, <code>std::complex&lt;double&gt;<\/code> and <code>std::complex&lt;long double&gt;<\/code>.<\/li>\n<\/ul>\n<p>The following program sends and receives data of each of these data types.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"cpp\">#include &lt;cstdlib&gt;\n#include &lt;complex&gt;\n#include &lt;iostream&gt;\n#include &lt;mpl\/mpl.hpp&gt;\n\nint main() {\n  const mpl::communicator &amp;comm_world=mpl::environment::comm_world();\n  if (comm_world.size()&lt;2)\n    comm_world.abort(EXIT_FAILURE);\n  if (comm_world.rank()==0) {\n    \/\/ send a data item of each standard type\n    \/\/ note \"char\" might equal \"signed char\" or \"unsigned char\" depending on the compiler\n    char x1='A';                               comm_world.send(x1, 1);\n    signed char x2='B';                        comm_world.send(x2, 1);\n    unsigned char x3='C';                      comm_world.send(x3, 1);\n    signed short int x4=-1;                    comm_world.send(x4, 1);\n    unsigned short int x5=1;                   comm_world.send(x5, 1);\n    signed int x6=-10;                         comm_world.send(x6, 1);\n    unsigned int x7=10;                        comm_world.send(x7, 1);\n    signed long int x8=-100;                   comm_world.send(x8, 1);\n    unsigned long int x9=100;                  comm_world.send(x9, 1);\n    signed long long int x10=-1000;            comm_world.send(x10, 1);\n    unsigned long long int x11=1000;           comm_world.send(x11, 1);\n    bool x12=true;                             comm_world.send(x12, 1);\n    float x13=1.2345;                          comm_world.send(x13, 1);\n    double x14=2.3456;                         comm_world.send(x14, 1);\n    long double x15=3.4567;                    comm_world.send(x15, 1);\n    std::complex&lt;float&gt; x16(1.2, -1.2);        comm_world.send(x16, 1);\n    std::complex&lt;double&gt; x17(2.3, -2.3);       comm_world.send(x17, 1);\n    std::complex&lt;long double&gt; x18(3.4, -3.4);  comm_world.send(x18, 1);\n  } \n  if (comm_world.rank()==1) {\n    \/\/ receive a data item of each standard type\n    char x1;                        comm_world.recv(x1, 0);   std::cout &lt;&lt; \"x1 = \" &lt;&lt; x1 &lt;&lt; '\\n';\n    signed char x2;                 comm_world.recv(x2, 0);   std::cout &lt;&lt; \"x2 = \" &lt;&lt; x2 &lt;&lt; '\\n';\n    unsigned char x3;               comm_world.recv(x3, 0);   std::cout &lt;&lt; \"x3 = \" &lt;&lt; x3 &lt;&lt; '\\n';\n    signed short int x4;            comm_world.recv(x4, 0);   std::cout &lt;&lt; \"x4 = \" &lt;&lt; x4 &lt;&lt; '\\n';\n    unsigned short int x5;          comm_world.recv(x5, 0);   std::cout &lt;&lt; \"x5 = \" &lt;&lt; x5 &lt;&lt; '\\n';\n    signed int x6;                  comm_world.recv(x6, 0);   std::cout &lt;&lt; \"x6 = \" &lt;&lt; x6 &lt;&lt; '\\n';\n    unsigned int x7;                comm_world.recv(x7, 0);   std::cout &lt;&lt; \"x7 = \" &lt;&lt; x7 &lt;&lt; '\\n';\n    signed long int x8;             comm_world.recv(x8, 0);   std::cout &lt;&lt; \"x8 = \" &lt;&lt; x8 &lt;&lt; '\\n';\n    unsigned long int x9;           comm_world.recv(x9, 0);   std::cout &lt;&lt; \"x9 = \" &lt;&lt; x9 &lt;&lt; '\\n';\n    signed long long int x10;       comm_world.recv(x10, 0);  std::cout &lt;&lt; \"x10 = \" &lt;&lt; x10 &lt;&lt; '\\n';\n    unsigned long long int x11;     comm_world.recv(x11, 0);  std::cout &lt;&lt; \"x11 = \" &lt;&lt; x11 &lt;&lt; '\\n';\n    bool x12;                       comm_world.recv(x12, 0);  std::cout &lt;&lt; \"x12 = \" &lt;&lt; x12 &lt;&lt; '\\n';\n    float x13;                      comm_world.recv(x13, 0);  std::cout &lt;&lt; \"x13 = \" &lt;&lt; x13 &lt;&lt; '\\n';\n    double x14;                     comm_world.recv(x14, 0);  std::cout &lt;&lt; \"x14 = \" &lt;&lt; x14 &lt;&lt; '\\n';\n    long double x15;                comm_world.recv(x15, 0);  std::cout &lt;&lt; \"x15 = \" &lt;&lt; x15 &lt;&lt; '\\n';\n    std::complex&lt;float&gt; x16;        comm_world.recv(x16, 0);  std::cout &lt;&lt; \"x16 = \" &lt;&lt; x16 &lt;&lt; '\\n';\n    std::complex&lt;double&gt; x17;       comm_world.recv(x17, 0);  std::cout &lt;&lt; \"x17 = \" &lt;&lt; x17 &lt;&lt; '\\n';\n    std::complex&lt;long double&gt; x18;  comm_world.recv(x18, 0);  std::cout &lt;&lt; \"x18 = \" &lt;&lt; x18 &lt;&lt; '\\n';\n  }\n  return EXIT_SUCCESS;\n}<\/pre>\n<p style=\"text-align: justify;\">MPL would not give a great advantage over MPI if it would only support these elementary data types as MPI does. However, MPL comes also with some support for user defined data types. To be able to exchange data of custom types via a message passing library. The message passing library must have some knowledge about the internal representation of user defined data types. Because C++ has very limited type introspection capabilities this knowledge cannot be obtained automatically by the message passing library. Usually information about the internal structure of user defined types (structures and classes) has to be exposed explicitly to the message passing library. Therefore, MPL supports message exchange of data where information about the internal representation can be obtained automatically and introduces a mechanism to expose the internal representation of custom types to MPL if this is not possible.<\/p>\n<p style=\"text-align: justify;\">The data types, where MPL can infer their internal representation, are <a href=\"http:\/\/enumeration types\" target=\"_blank\" rel=\"noopener\">enumeration types<\/a>, <a href=\"http:\/\/en.cppreference.com\/w\/cpp\/language\/array\" target=\"_blank\" rel=\"noopener\">C arrays<\/a> of constant size and the template classes <a href=\"http:\/\/en.cppreference.com\/w\/cpp\/container\/array\" target=\"_blank\" rel=\"noopener\">std::array<\/a>, <a href=\"http:\/\/en.cppreference.com\/w\/cpp\/utility\/pair\/pair\" target=\"_blank\" rel=\"noopener\">std::pair<\/a> and <a href=\"http:\/\/en.cppreference.com\/w\/cpp\/utility\/tuple\" target=\"_blank\" rel=\"noopener\">std::tuple<\/a> of the C++ Standard Template Library. The only limitation is, that the C array and the mentioned template classes hold data elements of types that can be sent or received by MPL. This rule can be applied recursively, which allows to build quite complex data structures. For example, this means one can send and receive data of type std::pair&lt;int, double&gt;, because int and double can be sent or received. But also std::array&lt;std::pair&lt;int, double&gt;, 8&gt;, which represents 8 pairs of int and double, can be used. Enumeration types are internally dealt with like integers. Note that MPL determines automatically, which integer type is chosen by the compiler (or programmer) to represent an enumeration type. Examples are given below.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"cpp\">#include &lt;cstdlib&gt;\n#include &lt;complex&gt;\n#include &lt;iostream&gt;\n#include &lt;array&gt;\n#include &lt;utility&gt;\n#include &lt;tuple&gt;\n#include &lt;mpl\/mpl.hpp&gt;\n\nint main() {\n\u00a0 const mpl::communicator &amp;comm_world=mpl::environment::comm_world();\n\u00a0 if (comm_world.size()&lt;2)\n\u00a0\u00a0\u00a0 comm_world.abort(EXIT_FAILURE);\n\u00a0 const int N=8;\n\u00a0 int x1[N];\u00a0 \/\/ C array of constant size (known at compile time) \n\u00a0 std::array&lt;double, N&gt; x2;\u00a0 \/\/ STL array\n\u00a0 std::pair&lt;double, int&gt; x3;\u00a0 \/\/ STL pair\n\u00a0 std::tuple&lt;double, int, char&gt; x4;\u00a0 \/\/ STL tuple\n\u00a0 if (comm_world.rank()==0) {\n\u00a0\u00a0\u00a0 \/\/ send a C array of ints\n\u00a0\u00a0\u00a0 for (int i=0; i&lt;N; ++i)\n\u00a0\u00a0\u00a0\u00a0\u00a0 x1[i]=i;\n\u00a0\u00a0\u00a0 comm_world.send(x1, 1);\n\u00a0\u00a0\u00a0 \/\/ send an STL array of doubles\n\u00a0\u00a0\u00a0 for (int i=0; i&lt;N; ++i)\n\u00a0\u00a0\u00a0\u00a0\u00a0 x2[i]=i+0.01*i;\n\u00a0\u00a0\u00a0 comm_world.send(x2, 1);\n\u00a0\u00a0\u00a0 \/\/ send an STL pair of double and int\n\u00a0\u00a0\u00a0 x3=std::make_pair(3.14, 77);\n\u00a0\u00a0\u00a0 comm_world.send(x3, 1);\u00a0\u00a0 \u00a0\n\u00a0\u00a0\u00a0 \/\/ send an STL tuple of double, int and char\n\u00a0\u00a0\u00a0 x4=std::make_tuple(3.14, 77, 'Q');\n\u00a0\u00a0\u00a0 comm_world.send(x4, 1);\u00a0\u00a0 \u00a0\n\u00a0 }\n\u00a0 if (comm_world.rank()==1) {\n\u00a0\u00a0\u00a0 \/\/ recieve a C array of ints\n\u00a0\u00a0\u00a0 comm_world.recv(x1, 0);\n\u00a0\u00a0\u00a0 std::cout &lt;&lt; \"x1 = [\";\n\u00a0\u00a0\u00a0 for (auto i : x1)\n\u00a0\u00a0\u00a0\u00a0\u00a0 std::cout &lt;&lt; i &lt;&lt; \", \";\n\u00a0\u00a0\u00a0 std::cout &lt;&lt; \"]\\n\";\n\u00a0\u00a0\u00a0 \/\/ receive an STL array of doubles\n\u00a0\u00a0\u00a0 comm_world.recv(x2, 0);\n\u00a0\u00a0\u00a0 std::cout &lt;&lt; \"x2 = [\";\n\u00a0\u00a0\u00a0 for (auto i : x2)\n\u00a0\u00a0\u00a0\u00a0\u00a0 std::cout &lt;&lt; i &lt;&lt; \", \";\n\u00a0\u00a0\u00a0 std::cout &lt;&lt; \"]\\n\";\n\u00a0\u00a0\u00a0 \/\/ receive an STL pair of double and int\n\u00a0\u00a0\u00a0 comm_world.recv(x3, 0);\n\u00a0\u00a0\u00a0 std::cout &lt;&lt; \"x3 = [\" &lt;&lt; x3.first &lt;&lt; \", \" &lt;&lt; x3.second &lt;&lt; \"]\\n\";\n\u00a0\u00a0\u00a0 \/\/ receive an STL tuple of double, int\u00a0 and char\n\u00a0\u00a0\u00a0 comm_world.recv(x4, 0);\n\u00a0\u00a0\u00a0 std::cout &lt;&lt; \"x4 = [\" &lt;&lt; std::get&lt;0&gt;(x4) &lt;&lt; \", \" &lt;&lt; std::get&lt;1&gt;(x4) &lt;&lt; \", \" &lt;&lt; std::get&lt;2&gt;(x4) &lt;&lt; \"]\\n\";\n\u00a0 }\n\u00a0 return EXIT_SUCCESS;\n}\n<\/pre>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"cpp\">#include &lt;cstdlib&gt;\n#include &lt;complex&gt;\n#include &lt;iostream&gt;\n#include &lt;mpl\/mpl.hpp&gt;\n#include &lt;type_traits&gt;\n\nenum class colors : long long {red, green, blue=0x7fffffffffffffffll};\n\nenum numbers_enum {one=1, two, three, four};\n\nint main() {\n  const mpl::communicator &amp;comm_world=mpl::environment::comm_world();\n  if (comm_world.size()&lt;2)\n    comm_world.abort(EXIT_FAILURE);\n  if (comm_world.rank()==0) {\n    \/\/ send data items of enum types\n    colors c=colors::blue;  comm_world.send(c, 1);\n    numbers_enum n=three;   comm_world.send(n, 1);\n  } \n  if (comm_world.rank()==1) {\n    \/\/ receive data items of enum types\n    colors c;        comm_world.recv(c, 0);  std::cout &lt;&lt; static_cast&lt;long long&gt;(c) &lt;&lt; '\\n';\n    numbers_enum n;  comm_world.recv(n, 0);  std::cout &lt;&lt; static_cast&lt;int&gt;(n) &lt;&lt; '\\n';\n  }\n  return EXIT_SUCCESS;\n}\n<\/pre>\n<p>User defined data structures come usually as structures or classes. Provided that these classes hold only non-static non-const data members of types, which MPL is able to send or receive, it is possible to expose these data members to MPL via\u00a0 template specialization of the class struct_builder such that messages containing objects of these classes can be exchanged. Template specialization of the class struct_builder is illustrated in the following program. The specialized template has to derived from base_struct_builder and the internal data representation of the user defined class is exposed to MPL in the constructor.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"cpp\">#include &lt;cstdlib&gt;\n#include &lt;vector&gt;\n#include &lt;iostream&gt;\n#include &lt;mpl\/mpl.hpp&gt;\n\n\/\/ a class with some non-const non-static data members\nclass structure {\nprivate:\n  double d;\n  int i[8];\npublic:\n  \/\/ constructor\n  template&lt;typename... T&gt;\n  structure(double d=0, T... i) : d(d), i{i...} {\n  }\n  \/\/ overload ostream operator\n  friend std::ostream&amp; operator&lt;&lt;(std::ostream&amp; stream, \n                  const structure &amp;str) {\n    stream &lt;&lt; \"d = \" &lt;&lt; str.d &lt;&lt; \", i = [\";\n    for (int j=0; j&lt;7; ++j) \n      stream &lt;&lt; str.i[j] &lt;&lt; \", \";\n    stream &lt;&lt; str.i[7] &lt;&lt; \"]\";\n    return stream;\n  }\n  \/\/ grant mpl::struct_builder&lt;structure&gt; access to private data\n  friend class mpl::struct_builder&lt;structure&gt;;\n};\n\nnamespace mpl {\n\n  \/\/ expose internal data representation to MPL via template specialization\n  template&lt;&gt;\n  class struct_builder&lt;structure&gt; : public base_struct_builder&lt;structure&gt; {\n    struct_layout&lt;structure&gt; layout;\n  public:\n    struct_builder() {\n      structure str;\n      \/\/ register structure or class\n      layout.register_struct(str);\n      \/\/ register each non-const non-static data member\n      \/\/ MPL must be able to send and receive types of all data members\n      layout.register_element(str.d);\n      layout.register_element(str.i);\n      \/\/ finally, expose data layout to MPL\n      define_struct(layout);\n    }\n  };\n    \n}\n\nint main() {\n  const mpl::communicator &amp;comm_world=mpl::environment::comm_world();\n  if (comm_world.size()&lt;2)\n    comm_world.abort(EXIT_FAILURE);\n  structure str;\n  \/\/ send a single structure\n  if (comm_world.rank()==0) {\n    str=structure(1.2, 1, 77, 8, 5, 2, 9, 6, 4);\n    comm_world.send(str, 1);\n  }\n  \/\/ receive a single structure\n  if (comm_world.rank()==1) {\n    comm_world.recv(str, 0);\n    std::cout &lt;&lt; \"got : \" &lt;&lt; str &lt;&lt; '\\n';\n  }\n  return EXIT_SUCCESS;\n}\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>In earlier posts I gave an introduction to the Message Passing Library (MPL). With MPL processes can send and receive messages with data of different data types. What kind of data types are supported by MPL? MPL supports the same kinds of elementary data types as MPI does. These are: the integer types char, short&hellip; <a href=\"https:\/\/www.numbercrunch.de\/blog\/2015\/09\/mpl-data-types\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">MPL &#8211; Data types<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16,9,8],"tags":[],"class_list":["post-705","post","type-post","status-publish","format-standard","hentry","category-c","category-mpi","category-parallel-computing"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>MPL - Data types - Number Crunch<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.numbercrunch.de\/blog\/2015\/09\/mpl-data-types\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"MPL - Data types - Number Crunch\" \/>\n<meta property=\"og:description\" content=\"In earlier posts I gave an introduction to the Message Passing Library (MPL). With MPL processes can send and receive messages with data of different data types. What kind of data types are supported by MPL? MPL supports the same kinds of elementary data types as MPI does. These are: the integer types char, short&hellip; Continue reading MPL &#8211; Data types\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.numbercrunch.de\/blog\/2015\/09\/mpl-data-types\/\" \/>\n<meta property=\"og:site_name\" content=\"Number Crunch\" \/>\n<meta property=\"article:published_time\" content=\"2015-09-06T21:58:46+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-01-18T19:57:02+00:00\" \/>\n<meta name=\"author\" content=\"Heiko Bauke\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Heiko Bauke\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.numbercrunch.de\/blog\/2015\/09\/mpl-data-types\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.numbercrunch.de\/blog\/2015\/09\/mpl-data-types\/\"},\"author\":{\"name\":\"Heiko Bauke\",\"@id\":\"https:\/\/www.numbercrunch.de\/blog\/#\/schema\/person\/e73eab65b1721dd0c3d408edb887e413\"},\"headline\":\"MPL &#8211; Data types\",\"datePublished\":\"2015-09-06T21:58:46+00:00\",\"dateModified\":\"2023-01-18T19:57:02+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.numbercrunch.de\/blog\/2015\/09\/mpl-data-types\/\"},\"wordCount\":486,\"commentCount\":1,\"publisher\":{\"@id\":\"https:\/\/www.numbercrunch.de\/blog\/#\/schema\/person\/e73eab65b1721dd0c3d408edb887e413\"},\"articleSection\":[\"C++\",\"MPI\",\"parallel computing\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.numbercrunch.de\/blog\/2015\/09\/mpl-data-types\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.numbercrunch.de\/blog\/2015\/09\/mpl-data-types\/\",\"url\":\"https:\/\/www.numbercrunch.de\/blog\/2015\/09\/mpl-data-types\/\",\"name\":\"MPL - Data types - Number Crunch\",\"isPartOf\":{\"@id\":\"https:\/\/www.numbercrunch.de\/blog\/#website\"},\"datePublished\":\"2015-09-06T21:58:46+00:00\",\"dateModified\":\"2023-01-18T19:57:02+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.numbercrunch.de\/blog\/2015\/09\/mpl-data-types\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.numbercrunch.de\/blog\/2015\/09\/mpl-data-types\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.numbercrunch.de\/blog\/2015\/09\/mpl-data-types\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.numbercrunch.de\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"MPL &#8211; Data types\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.numbercrunch.de\/blog\/#website\",\"url\":\"https:\/\/www.numbercrunch.de\/blog\/\",\"name\":\"Number Crunch\",\"description\":\"A computational science blog.\",\"publisher\":{\"@id\":\"https:\/\/www.numbercrunch.de\/blog\/#\/schema\/person\/e73eab65b1721dd0c3d408edb887e413\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.numbercrunch.de\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/www.numbercrunch.de\/blog\/#\/schema\/person\/e73eab65b1721dd0c3d408edb887e413\",\"name\":\"Heiko Bauke\",\"logo\":{\"@id\":\"https:\/\/www.numbercrunch.de\/blog\/#\/schema\/person\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"MPL - Data types - Number Crunch","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.numbercrunch.de\/blog\/2015\/09\/mpl-data-types\/","og_locale":"en_US","og_type":"article","og_title":"MPL - Data types - Number Crunch","og_description":"In earlier posts I gave an introduction to the Message Passing Library (MPL). With MPL processes can send and receive messages with data of different data types. What kind of data types are supported by MPL? MPL supports the same kinds of elementary data types as MPI does. These are: the integer types char, short&hellip; Continue reading MPL &#8211; Data types","og_url":"https:\/\/www.numbercrunch.de\/blog\/2015\/09\/mpl-data-types\/","og_site_name":"Number Crunch","article_published_time":"2015-09-06T21:58:46+00:00","article_modified_time":"2023-01-18T19:57:02+00:00","author":"Heiko Bauke","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Heiko Bauke","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.numbercrunch.de\/blog\/2015\/09\/mpl-data-types\/#article","isPartOf":{"@id":"https:\/\/www.numbercrunch.de\/blog\/2015\/09\/mpl-data-types\/"},"author":{"name":"Heiko Bauke","@id":"https:\/\/www.numbercrunch.de\/blog\/#\/schema\/person\/e73eab65b1721dd0c3d408edb887e413"},"headline":"MPL &#8211; Data types","datePublished":"2015-09-06T21:58:46+00:00","dateModified":"2023-01-18T19:57:02+00:00","mainEntityOfPage":{"@id":"https:\/\/www.numbercrunch.de\/blog\/2015\/09\/mpl-data-types\/"},"wordCount":486,"commentCount":1,"publisher":{"@id":"https:\/\/www.numbercrunch.de\/blog\/#\/schema\/person\/e73eab65b1721dd0c3d408edb887e413"},"articleSection":["C++","MPI","parallel computing"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.numbercrunch.de\/blog\/2015\/09\/mpl-data-types\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.numbercrunch.de\/blog\/2015\/09\/mpl-data-types\/","url":"https:\/\/www.numbercrunch.de\/blog\/2015\/09\/mpl-data-types\/","name":"MPL - Data types - Number Crunch","isPartOf":{"@id":"https:\/\/www.numbercrunch.de\/blog\/#website"},"datePublished":"2015-09-06T21:58:46+00:00","dateModified":"2023-01-18T19:57:02+00:00","breadcrumb":{"@id":"https:\/\/www.numbercrunch.de\/blog\/2015\/09\/mpl-data-types\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.numbercrunch.de\/blog\/2015\/09\/mpl-data-types\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.numbercrunch.de\/blog\/2015\/09\/mpl-data-types\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.numbercrunch.de\/blog\/"},{"@type":"ListItem","position":2,"name":"MPL &#8211; Data types"}]},{"@type":"WebSite","@id":"https:\/\/www.numbercrunch.de\/blog\/#website","url":"https:\/\/www.numbercrunch.de\/blog\/","name":"Number Crunch","description":"A computational science blog.","publisher":{"@id":"https:\/\/www.numbercrunch.de\/blog\/#\/schema\/person\/e73eab65b1721dd0c3d408edb887e413"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.numbercrunch.de\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/www.numbercrunch.de\/blog\/#\/schema\/person\/e73eab65b1721dd0c3d408edb887e413","name":"Heiko Bauke","logo":{"@id":"https:\/\/www.numbercrunch.de\/blog\/#\/schema\/person\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/www.numbercrunch.de\/blog\/wp-json\/wp\/v2\/posts\/705"}],"collection":[{"href":"https:\/\/www.numbercrunch.de\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.numbercrunch.de\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.numbercrunch.de\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.numbercrunch.de\/blog\/wp-json\/wp\/v2\/comments?post=705"}],"version-history":[{"count":13,"href":"https:\/\/www.numbercrunch.de\/blog\/wp-json\/wp\/v2\/posts\/705\/revisions"}],"predecessor-version":[{"id":959,"href":"https:\/\/www.numbercrunch.de\/blog\/wp-json\/wp\/v2\/posts\/705\/revisions\/959"}],"wp:attachment":[{"href":"https:\/\/www.numbercrunch.de\/blog\/wp-json\/wp\/v2\/media?parent=705"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.numbercrunch.de\/blog\/wp-json\/wp\/v2\/categories?post=705"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.numbercrunch.de\/blog\/wp-json\/wp\/v2\/tags?post=705"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}