You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by is...@apache.org on 2017/05/31 15:38:04 UTC

ignite git commit: IGNITE-5161: Implemented C++ compute example.

Repository: ignite
Updated Branches:
  refs/heads/master 41dcce7b8 -> d0bddfa52


IGNITE-5161: Implemented C++ compute example.


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/d0bddfa5
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/d0bddfa5
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/d0bddfa5

Branch: refs/heads/master
Commit: d0bddfa527af6c5cf4554e484ce04c078bfd69e9
Parents: 41dcce7
Author: Igor Sapego <is...@gridgain.com>
Authored: Wed May 31 18:36:52 2017 +0300
Committer: Igor Sapego <is...@gridgain.com>
Committed: Wed May 31 18:36:52 2017 +0300

----------------------------------------------------------------------
 modules/platforms/cpp/examples/Makefile.am      |   1 +
 .../cpp/examples/compute-example/Makefile.am    |  59 +++++++
 .../compute-example/config/compute-example.xml  |  52 ++++++
 .../project/vs/compute-example.vcxproj          | 102 +++++++++++
 .../project/vs/compute-example.vcxproj.filters  |  27 +++
 .../compute-example/src/compute_example.cpp     | 177 +++++++++++++++++++
 modules/platforms/cpp/examples/configure.ac     |   1 +
 .../project/vs/continuous-query-example.vcxproj |   4 -
 .../src/continuous_query_example.cpp            |   5 +-
 .../examples/include/ignite/examples/address.h  |   2 +-
 .../include/ignite/examples/organization.h      |   4 +-
 .../cpp/examples/project/vs/ignite-examples.sln |   6 +
 12 files changed, 430 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/d0bddfa5/modules/platforms/cpp/examples/Makefile.am
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/examples/Makefile.am b/modules/platforms/cpp/examples/Makefile.am
index 8cfb999..29b140b 100644
--- a/modules/platforms/cpp/examples/Makefile.am
+++ b/modules/platforms/cpp/examples/Makefile.am
@@ -22,5 +22,6 @@ SUBDIRS = \
     odbc-example \
     query-example \
 	continuous-query-example \
+	compute-example \
     include
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/d0bddfa5/modules/platforms/cpp/examples/compute-example/Makefile.am
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/examples/compute-example/Makefile.am b/modules/platforms/cpp/examples/compute-example/Makefile.am
new file mode 100644
index 0000000..d757bf7
--- /dev/null
+++ b/modules/platforms/cpp/examples/compute-example/Makefile.am
@@ -0,0 +1,59 @@
+##
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You 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 law or agreed to in writing, software
+## distributed under the License is distributed on an "AS IS" BASIS,
+## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+## See the License for the specific language governing permissions and
+## limitations under the License.
+##
+
+ACLOCAL_AMFLAGS =-I m4
+
+noinst_PROGRAMS = ignite-compute-example
+
+AM_CPPFLAGS = \
+    -I@top_srcdir@/include \
+    -I@top_srcdir@/../core/include \
+    -I@top_srcdir@/../core/os/linux/include \
+    -I@top_srcdir@/../common/include \
+    -I@top_srcdir@/../common/os/linux/include \
+    -I@top_srcdir@/../binary/include \
+    -I@top_srcdir@/../jni/include \
+    -I@top_srcdir@/../jni/os/linux/include \
+    -I$(JAVA_HOME)/include \
+    -I$(JAVA_HOME)/include/linux \
+    -DIGNITE_IMPL \
+    -D__STDC_LIMIT_MACROS \
+    -D__STDC_CONSTANT_MACROS
+
+AM_CXXFLAGS = \
+    -Wall \
+    -std=c++03
+
+ignite_compute_example_LDADD = \
+    @top_srcdir@/../core/libignite.la \
+    -lodbc \
+    -lpthread
+
+ignite_compute_example_LDFLAGS = \
+    -static-libtool-libs
+
+ignite_compute_example_SOURCES = \
+    src/compute_example.cpp
+
+run-check: check
+	./ignite-compute-example -p
+
+clean-local: clean-check
+	$(RM) *.gcno *.gcda
+
+clean-check:
+	$(RM) $(ignite_compute_example_OBJECTS)

http://git-wip-us.apache.org/repos/asf/ignite/blob/d0bddfa5/modules/platforms/cpp/examples/compute-example/config/compute-example.xml
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/examples/compute-example/config/compute-example.xml b/modules/platforms/cpp/examples/compute-example/config/compute-example.xml
new file mode 100644
index 0000000..1348b1c
--- /dev/null
+++ b/modules/platforms/cpp/examples/compute-example/config/compute-example.xml
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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 law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:util="http://www.springframework.org/schema/util"
+       xsi:schemaLocation="
+        http://www.springframework.org/schema/beans
+        http://www.springframework.org/schema/beans/spring-beans.xsd
+        http://www.springframework.org/schema/util
+        http://www.springframework.org/schema/util/spring-util.xsd">
+    <bean id="grid.cfg" class="org.apache.ignite.configuration.IgniteConfiguration">
+
+        <!-- Explicitly configure TCP discovery SPI to provide list of initial nodes. -->
+        <property name="discoverySpi">
+            <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
+                <property name="ipFinder">
+                    <!--
+                        Ignite provides several options for automatic discovery that can be used
+                        instead os static IP based discovery.
+                    -->
+                    <!-- Uncomment static IP finder to enable static-based discovery of initial nodes. -->
+                    <!--<bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">-->
+                    <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
+                        <property name="addresses">
+                            <list>
+                                <!-- In distributed environment, replace with actual host IP address. -->
+                                <value>127.0.0.1:47550..47551</value>
+                            </list>
+                        </property>
+                    </bean>
+                </property>
+            </bean>
+        </property>
+    </bean>
+</beans>

http://git-wip-us.apache.org/repos/asf/ignite/blob/d0bddfa5/modules/platforms/cpp/examples/compute-example/project/vs/compute-example.vcxproj
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/examples/compute-example/project/vs/compute-example.vcxproj b/modules/platforms/cpp/examples/compute-example/project/vs/compute-example.vcxproj
new file mode 100644
index 0000000..1b84a9c
--- /dev/null
+++ b/modules/platforms/cpp/examples/compute-example/project/vs/compute-example.vcxproj
@@ -0,0 +1,102 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <RootNamespace>igniteexamples</RootNamespace>
+    <ProjectGuid>{18BB0A18-8213-472A-81A0-9D9753697135}</ProjectGuid>
+    <ProjectName>compute-example</ProjectName>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseDebugLibraries>false</UseDebugLibraries>
+    <PlatformToolset>v100</PlatformToolset>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+    <CharacterSet>Unicode</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseDebugLibraries>false</UseDebugLibraries>
+    <PlatformToolset>v100</PlatformToolset>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+    <CharacterSet>Unicode</CharacterSet>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <LinkIncremental>false</LinkIncremental>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <LinkIncremental>false</LinkIncremental>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <ClCompile>
+      <WarningLevel>Level3</WarningLevel>
+      <Optimization>MaxSpeed</Optimization>
+      <FunctionLevelLinking>true</FunctionLevelLinking>
+      <IntrinsicFunctions>true</IntrinsicFunctions>
+      <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories>$(JAVA_HOME)\include;$(JAVA_HOME)\include\win32;..\..\..\include;..\..\..\..\jni\os\win\include;..\..\..\..\jni\include;..\..\..\..\common\os\win\include;..\..\..\..\common\include;..\..\..\..\binary\include;..\..\..\..\core\os\win\include;..\..\..\..\core\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+    </ClCompile>
+    <Link>
+      <SubSystem>Console</SubSystem>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>
+      <OptimizeReferences>true</OptimizeReferences>
+      <AdditionalDependencies>jvm.lib;ignite.jni.lib;ignite.binary.lib;ignite.core.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalLibraryDirectories>..\..\..\..\project\vs\$(Platform)\$(Configuration)\;$(JAVA_HOME)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+    </Link>
+    <PostBuildEvent>
+      <Command>copy "$(ProjectDir)..\..\..\..\project\vs\$(Platform)\$(Configuration)\ignite.common.dll" "$(OutDir)"
+copy "$(ProjectDir)..\..\..\..\project\vs\$(Platform)\$(Configuration)\ignite.core.dll" "$(OutDir)"</Command>
+    </PostBuildEvent>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <ClCompile>
+      <WarningLevel>Level3</WarningLevel>
+      <Optimization>MaxSpeed</Optimization>
+      <FunctionLevelLinking>true</FunctionLevelLinking>
+      <IntrinsicFunctions>true</IntrinsicFunctions>
+      <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories>$(JAVA_HOME)\include;$(JAVA_HOME)\include\win32;..\..\..\include;..\..\..\..\jni\os\win\include;..\..\..\..\jni\include;..\..\..\..\common\os\win\include;..\..\..\..\common\include;..\..\..\..\binary\include;..\..\..\..\core\os\win\include;..\..\..\..\core\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+    </ClCompile>
+    <Link>
+      <SubSystem>Console</SubSystem>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>
+      <OptimizeReferences>true</OptimizeReferences>
+      <AdditionalDependencies>jvm.lib;ignite.jni.lib;ignite.binary.lib;ignite.core.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalLibraryDirectories>..\..\..\..\project\vs\$(Platform)\$(Configuration)\;$(JAVA_HOME)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+    </Link>
+    <PostBuildEvent>
+      <Command>copy "$(ProjectDir)..\..\..\..\project\vs\$(Platform)\$(Configuration)\ignite.common.dll" "$(OutDir)"
+copy "$(ProjectDir)..\..\..\..\project\vs\$(Platform)\$(Configuration)\ignite.core.dll" "$(OutDir)"</Command>
+    </PostBuildEvent>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="..\..\src\compute_example.cpp" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="..\..\config\compute-example.xml" />
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/d0bddfa5/modules/platforms/cpp/examples/compute-example/project/vs/compute-example.vcxproj.filters
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/examples/compute-example/project/vs/compute-example.vcxproj.filters b/modules/platforms/cpp/examples/compute-example/project/vs/compute-example.vcxproj.filters
new file mode 100644
index 0000000..d43cece
--- /dev/null
+++ b/modules/platforms/cpp/examples/compute-example/project/vs/compute-example.vcxproj.filters
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <Filter Include="Source Files">
+      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+      <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+    </Filter>
+    <Filter Include="Header Files">
+      <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+      <Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
+    </Filter>
+    <Filter Include="Config">
+      <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
+      <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
+    </Filter>
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="..\..\src\compute_example.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="..\..\config\compute-example.xml">
+      <Filter>Config</Filter>
+    </None>
+  </ItemGroup>
+</Project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/d0bddfa5/modules/platforms/cpp/examples/compute-example/src/compute_example.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/examples/compute-example/src/compute_example.cpp b/modules/platforms/cpp/examples/compute-example/src/compute_example.cpp
new file mode 100644
index 0000000..3426475
--- /dev/null
+++ b/modules/platforms/cpp/examples/compute-example/src/compute_example.cpp
@@ -0,0 +1,177 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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 law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <stdint.h>
+#include <iostream>
+#include <sstream>
+
+#include <ignite/ignition.h>
+#include <ignite/compute/compute.h>
+
+using namespace ignite;
+
+/*
+ * Function class.
+ */
+class CountWords : public compute::ComputeFunc<int32_t>
+{
+    friend struct ignite::binary::BinaryType<CountWords>;
+public:
+    /*
+     * Default constructor.
+     */
+    CountWords() :
+        text()
+    {
+        // No-op.
+    }
+
+    /*
+     * Constructor.
+     *
+     * @param text Text.
+     */
+    CountWords(const std::string& text) :
+        text(text)
+    {
+        // No-op.
+    }
+
+    /**
+     * Callback.
+     * Counts number of words in provided text.
+     *
+     * @return Number of words in provided text.
+     */
+    virtual int32_t Call()
+    {
+        std::stringstream buf(text);
+        std::string word;
+
+        int32_t wordsCount = 0;
+        while (buf >> word)
+            ++wordsCount;
+
+        return wordsCount;
+    }
+
+private:
+    /** Text in which to count words. */
+    std::string text;
+};
+
+namespace ignite
+{
+    namespace binary
+    {
+        template<>
+        struct BinaryType<CountWords>
+        {
+            static int32_t GetTypeId()
+            {
+                return GetBinaryStringHashCode("CountWords");
+            }
+
+            static void GetTypeName(std::string& dst)
+            {
+                dst = "CountWords";
+            }
+
+            static int32_t GetFieldId(const char* name)
+            {
+                return GetBinaryStringHashCode(name);
+            }
+
+            static int32_t GetHashCode(const CountWords& obj)
+            {
+                return 0;
+            }
+
+            static bool IsNull(const CountWords& obj)
+            {
+                return false;
+            }
+
+            static void GetNull(CountWords& dst)
+            {
+                dst = CountWords("");
+            }
+
+            static void Write(BinaryWriter& writer, const CountWords& obj)
+            {
+                writer.RawWriter().WriteString(obj.text);
+            }
+
+            static void Read(BinaryReader& reader, CountWords& dst)
+            {
+                dst.text = reader.RawReader().ReadString();
+            }
+        };
+    }
+}
+
+int main()
+{
+    IgniteConfiguration cfg;
+
+    cfg.springCfgPath = "platforms/cpp/examples/compute-example/config/compute-example.xml";
+
+    try
+    {
+        // Start a node.
+        Ignite ignite = Ignition::Start(cfg);
+
+        std::cout << std::endl;
+        std::cout << ">>> Compute example started." << std::endl;
+        std::cout << std::endl;
+
+        // Get binding instance.
+        IgniteBinding binding = ignite.GetBinding();
+
+        // Registering our class as a compute function.
+        binding.RegisterComputeFunc<CountWords>();
+
+        // Get compute instance.
+        compute::Compute compute = ignite.GetCompute();
+
+        std::string testText = "Lorem ipsum dolor sit amet, consectetur adipiscing elit.";
+
+        // Declaring counter.
+        CountWords counter(testText);
+
+        // Making call.
+        int32_t wordsCount = compute.Call<int32_t>(counter);
+
+        // Printing result.
+        std::cout << ">>> Text contains " << wordsCount << " words" << std::endl;
+
+        // Stop node.
+        Ignition::StopAll(false);
+    }
+    catch (IgniteError& err)
+    {
+        std::cout << "An error occurred: " << err.GetText() << std::endl;
+    }
+
+    std::cout << std::endl;
+    std::cout << ">>> Example finished, press 'Enter' to exit ..." << std::endl;
+    std::cout << std::endl;
+
+    std::cin.get();
+
+    return 0;
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/d0bddfa5/modules/platforms/cpp/examples/configure.ac
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/examples/configure.ac b/modules/platforms/cpp/examples/configure.ac
index 7aef863..a72471d 100644
--- a/modules/platforms/cpp/examples/configure.ac
+++ b/modules/platforms/cpp/examples/configure.ac
@@ -57,6 +57,7 @@ AC_CONFIG_FILES([ \
     odbc-example/Makefile \
     query-example/Makefile \
     continuous-query-example/Makefile \
+    compute-example/Makefile \
 ])
 
 AC_OUTPUT

http://git-wip-us.apache.org/repos/asf/ignite/blob/d0bddfa5/modules/platforms/cpp/examples/continuous-query-example/project/vs/continuous-query-example.vcxproj
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/examples/continuous-query-example/project/vs/continuous-query-example.vcxproj b/modules/platforms/cpp/examples/continuous-query-example/project/vs/continuous-query-example.vcxproj
index dfc5f9d..585796b 100644
--- a/modules/platforms/cpp/examples/continuous-query-example/project/vs/continuous-query-example.vcxproj
+++ b/modules/platforms/cpp/examples/continuous-query-example/project/vs/continuous-query-example.vcxproj
@@ -48,8 +48,6 @@
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
     <ClCompile>
       <WarningLevel>Level3</WarningLevel>
-      <PrecompiledHeader>
-      </PrecompiledHeader>
       <Optimization>MaxSpeed</Optimization>
       <FunctionLevelLinking>true</FunctionLevelLinking>
       <IntrinsicFunctions>true</IntrinsicFunctions>
@@ -72,8 +70,6 @@ copy "$(ProjectDir)..\..\..\..\project\vs\$(Platform)\$(Configuration)\ignite.co
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
     <ClCompile>
       <WarningLevel>Level3</WarningLevel>
-      <PrecompiledHeader>
-      </PrecompiledHeader>
       <Optimization>MaxSpeed</Optimization>
       <FunctionLevelLinking>true</FunctionLevelLinking>
       <IntrinsicFunctions>true</IntrinsicFunctions>

http://git-wip-us.apache.org/repos/asf/ignite/blob/d0bddfa5/modules/platforms/cpp/examples/continuous-query-example/src/continuous_query_example.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/examples/continuous-query-example/src/continuous_query_example.cpp b/modules/platforms/cpp/examples/continuous-query-example/src/continuous_query_example.cpp
index 2ca3163..3b17b53 100644
--- a/modules/platforms/cpp/examples/continuous-query-example/src/continuous_query_example.cpp
+++ b/modules/platforms/cpp/examples/continuous-query-example/src/continuous_query_example.cpp
@@ -18,10 +18,9 @@
 #include <stdint.h>
 #include <iostream>
 
-#include "ignite/ignition.h"
-#include "ignite/cache/query/continuous/continuous_query.h"
+#include <ignite/ignition.h>
+#include <ignite/cache/query/continuous/continuous_query.h>
 
-#include "ignite/examples/organization.h"
 #include "ignite/examples/person.h"
 
 using namespace ignite;

http://git-wip-us.apache.org/repos/asf/ignite/blob/d0bddfa5/modules/platforms/cpp/examples/include/ignite/examples/address.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/examples/include/ignite/examples/address.h b/modules/platforms/cpp/examples/include/ignite/examples/address.h
index 6a06f60..8f2689c 100644
--- a/modules/platforms/cpp/examples/include/ignite/examples/address.h
+++ b/modules/platforms/cpp/examples/include/ignite/examples/address.h
@@ -74,7 +74,7 @@ namespace ignite
                 return GetBinaryStringHashCode(name);
             }
 
-            static int32_t GetHashCode(ignite::examples::Address obj)
+            static int32_t GetHashCode(ignite::examples::Address& obj)
             {
                 return 0;
             }

http://git-wip-us.apache.org/repos/asf/ignite/blob/d0bddfa5/modules/platforms/cpp/examples/include/ignite/examples/organization.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/examples/include/ignite/examples/organization.h b/modules/platforms/cpp/examples/include/ignite/examples/organization.h
index 942897d..2701933 100644
--- a/modules/platforms/cpp/examples/include/ignite/examples/organization.h
+++ b/modules/platforms/cpp/examples/include/ignite/examples/organization.h
@@ -83,12 +83,12 @@ namespace ignite
                 return GetBinaryStringHashCode(name);
             }
 
-            static int32_t GetHashCode(ignite::examples::Organization obj)
+            static int32_t GetHashCode(const ignite::examples::Organization& obj)
             {
                 return 0;
             }
 
-            static bool IsNull(ignite::examples::Organization obj)
+            static bool IsNull(const ignite::examples::Organization& obj)
             {
                 return false;
             }

http://git-wip-us.apache.org/repos/asf/ignite/blob/d0bddfa5/modules/platforms/cpp/examples/project/vs/ignite-examples.sln
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/examples/project/vs/ignite-examples.sln b/modules/platforms/cpp/examples/project/vs/ignite-examples.sln
index a1865e3..bf83743 100644
--- a/modules/platforms/cpp/examples/project/vs/ignite-examples.sln
+++ b/modules/platforms/cpp/examples/project/vs/ignite-examples.sln
@@ -9,6 +9,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "continuous-query-example",
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "put-get-example", "..\..\put-get-example\project\vs\put-get-example.vcxproj", "{34935DEC-80FC-4168-AA52-3DBFF4F79B6B}"
 EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "compute-example", "..\..\compute-example\project\vs\compute-example.vcxproj", "{18BB0A18-8213-472A-81A0-9D9753697135}"
+EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Release|x64 = Release|x64
@@ -31,6 +33,10 @@ Global
 		{34935DEC-80FC-4168-AA52-3DBFF4F79B6B}.Release|x64.Build.0 = Release|x64
 		{34935DEC-80FC-4168-AA52-3DBFF4F79B6B}.Release|x86.ActiveCfg = Release|Win32
 		{34935DEC-80FC-4168-AA52-3DBFF4F79B6B}.Release|x86.Build.0 = Release|Win32
+		{18BB0A18-8213-472A-81A0-9D9753697135}.Release|x64.ActiveCfg = Release|x64
+		{18BB0A18-8213-472A-81A0-9D9753697135}.Release|x64.Build.0 = Release|x64
+		{18BB0A18-8213-472A-81A0-9D9753697135}.Release|x86.ActiveCfg = Release|Win32
+		{18BB0A18-8213-472A-81A0-9D9753697135}.Release|x86.Build.0 = Release|Win32
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE