Last active
August 29, 2015 13:56
-
-
Save ddemidov/8819762 to your computer and use it in GitHub Desktop.
Example project for VS2012
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <vector> | |
| #include <algorithm> | |
| #include <cstdlib> | |
| #include <vexcl/vexcl.hpp> | |
| typedef cl_uint val_type; | |
| int main() { | |
| const size_t n = 1024; | |
| std::vector<val_type> host(n); | |
| std::generate(host.begin(), host.end(), rand); | |
| vex::Context ctx(vex::Filter::Type(CL_DEVICE_TYPE_GPU) && vex::Filter::DoublePrecision); | |
| std::cout << ctx << std::endl; | |
| vex::vector<val_type> dev(ctx, host); | |
| vex::sort(dev); | |
| std::cout << "Sorted data: " << dev << std::endl; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| | |
| Microsoft Visual Studio Solution File, Format Version 12.00 | |
| # Visual Studio Express 2012 for Windows Desktop | |
| Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vexcl_sort", "vexcl_sort.vcxproj", "{BEA1EE7B-85F8-47AA-B5CE-2E438E039100}" | |
| EndProject | |
| Global | |
| GlobalSection(SolutionConfigurationPlatforms) = preSolution | |
| Debug|Win32 = Debug|Win32 | |
| Debug|x64 = Debug|x64 | |
| Release|Win32 = Release|Win32 | |
| Release|x64 = Release|x64 | |
| EndGlobalSection | |
| GlobalSection(ProjectConfigurationPlatforms) = postSolution | |
| {BEA1EE7B-85F8-47AA-B5CE-2E438E039100}.Debug|Win32.ActiveCfg = Debug|Win32 | |
| {BEA1EE7B-85F8-47AA-B5CE-2E438E039100}.Debug|Win32.Build.0 = Debug|Win32 | |
| {BEA1EE7B-85F8-47AA-B5CE-2E438E039100}.Debug|x64.ActiveCfg = Debug|x64 | |
| {BEA1EE7B-85F8-47AA-B5CE-2E438E039100}.Debug|x64.Build.0 = Debug|x64 | |
| {BEA1EE7B-85F8-47AA-B5CE-2E438E039100}.Release|Win32.ActiveCfg = Release|Win32 | |
| {BEA1EE7B-85F8-47AA-B5CE-2E438E039100}.Release|Win32.Build.0 = Release|Win32 | |
| {BEA1EE7B-85F8-47AA-B5CE-2E438E039100}.Release|x64.ActiveCfg = Release|x64 | |
| {BEA1EE7B-85F8-47AA-B5CE-2E438E039100}.Release|x64.Build.0 = Release|x64 | |
| EndGlobalSection | |
| GlobalSection(SolutionProperties) = preSolution | |
| HideSolutionNode = FALSE | |
| EndGlobalSection | |
| EndGlobal |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?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="Debug|Win32"> | |
| <Configuration>Debug</Configuration> | |
| <Platform>Win32</Platform> | |
| </ProjectConfiguration> | |
| <ProjectConfiguration Include="Debug|x64"> | |
| <Configuration>Debug</Configuration> | |
| <Platform>x64</Platform> | |
| </ProjectConfiguration> | |
| <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"> | |
| <ProjectGuid>{BEA1EE7B-85F8-47AA-B5CE-2E438E039100}</ProjectGuid> | |
| <Keyword>Win32Proj</Keyword> | |
| <RootNamespace>vexcl_sort</RootNamespace> | |
| </PropertyGroup> | |
| <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> | |
| <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> | |
| <ConfigurationType>Application</ConfigurationType> | |
| <UseDebugLibraries>true</UseDebugLibraries> | |
| <PlatformToolset>v110</PlatformToolset> | |
| <CharacterSet>Unicode</CharacterSet> | |
| </PropertyGroup> | |
| <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> | |
| <ConfigurationType>Application</ConfigurationType> | |
| <UseDebugLibraries>true</UseDebugLibraries> | |
| <PlatformToolset>v110</PlatformToolset> | |
| <CharacterSet>Unicode</CharacterSet> | |
| </PropertyGroup> | |
| <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> | |
| <ConfigurationType>Application</ConfigurationType> | |
| <UseDebugLibraries>false</UseDebugLibraries> | |
| <PlatformToolset>v110</PlatformToolset> | |
| <WholeProgramOptimization>true</WholeProgramOptimization> | |
| <CharacterSet>Unicode</CharacterSet> | |
| </PropertyGroup> | |
| <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> | |
| <ConfigurationType>Application</ConfigurationType> | |
| <UseDebugLibraries>false</UseDebugLibraries> | |
| <PlatformToolset>v110</PlatformToolset> | |
| <WholeProgramOptimization>true</WholeProgramOptimization> | |
| <CharacterSet>Unicode</CharacterSet> | |
| </PropertyGroup> | |
| <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> | |
| <ImportGroup Label="ExtensionSettings"> | |
| </ImportGroup> | |
| <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> | |
| <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> | |
| </ImportGroup> | |
| <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> | |
| <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> | |
| </ImportGroup> | |
| <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> | |
| <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> | |
| </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> | |
| <PropertyGroup Label="UserMacros" /> | |
| <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> | |
| <LinkIncremental>true</LinkIncremental> | |
| </PropertyGroup> | |
| <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> | |
| <LinkIncremental>true</LinkIncremental> | |
| </PropertyGroup> | |
| <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> | |
| <LinkIncremental>false</LinkIncremental> | |
| </PropertyGroup> | |
| <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> | |
| <LinkIncremental>false</LinkIncremental> | |
| </PropertyGroup> | |
| <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> | |
| <ClCompile> | |
| <PrecompiledHeader> | |
| </PrecompiledHeader> | |
| <WarningLevel>Level3</WarningLevel> | |
| <Optimization>Disabled</Optimization> | |
| <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> | |
| </ClCompile> | |
| <Link> | |
| <SubSystem>Console</SubSystem> | |
| <GenerateDebugInformation>true</GenerateDebugInformation> | |
| </Link> | |
| </ItemDefinitionGroup> | |
| <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> | |
| <ClCompile> | |
| <PrecompiledHeader> | |
| </PrecompiledHeader> | |
| <WarningLevel>Level3</WarningLevel> | |
| <Optimization>Disabled</Optimization> | |
| <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;NOMINMAX;_VARIADIC_MAX=10;%(PreprocessorDefinitions)</PreprocessorDefinitions> | |
| <AdditionalIncludeDirectories>C:\Program Files %28x86%29\AMD APP\include;C:\boost_1_54_0;D:\work\vexcl;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | |
| </ClCompile> | |
| <Link> | |
| <SubSystem>Console</SubSystem> | |
| <GenerateDebugInformation>true</GenerateDebugInformation> | |
| <AdditionalLibraryDirectories>C:\Program Files %28x86%29\AMD APP\lib\x86_64;C:\boost_1_54_0\stage\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> | |
| <AdditionalDependencies>OpenCL.lib;%(AdditionalDependencies)</AdditionalDependencies> | |
| </Link> | |
| </ItemDefinitionGroup> | |
| <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> | |
| <ClCompile> | |
| <WarningLevel>Level3</WarningLevel> | |
| <PrecompiledHeader> | |
| </PrecompiledHeader> | |
| <Optimization>MaxSpeed</Optimization> | |
| <FunctionLevelLinking>true</FunctionLevelLinking> | |
| <IntrinsicFunctions>true</IntrinsicFunctions> | |
| <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> | |
| </ClCompile> | |
| <Link> | |
| <SubSystem>Console</SubSystem> | |
| <GenerateDebugInformation>true</GenerateDebugInformation> | |
| <EnableCOMDATFolding>true</EnableCOMDATFolding> | |
| <OptimizeReferences>true</OptimizeReferences> | |
| </Link> | |
| </ItemDefinitionGroup> | |
| <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> | |
| <ClCompile> | |
| <WarningLevel>Level3</WarningLevel> | |
| <PrecompiledHeader> | |
| </PrecompiledHeader> | |
| <Optimization>MaxSpeed</Optimization> | |
| <FunctionLevelLinking>true</FunctionLevelLinking> | |
| <IntrinsicFunctions>true</IntrinsicFunctions> | |
| <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> | |
| </ClCompile> | |
| <Link> | |
| <SubSystem>Console</SubSystem> | |
| <GenerateDebugInformation>true</GenerateDebugInformation> | |
| <EnableCOMDATFolding>true</EnableCOMDATFolding> | |
| <OptimizeReferences>true</OptimizeReferences> | |
| </Link> | |
| </ItemDefinitionGroup> | |
| <ItemGroup> | |
| <ClCompile Include="vexcl_sort.cpp" /> | |
| </ItemGroup> | |
| <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> | |
| <ImportGroup Label="ExtensionTargets"> | |
| </ImportGroup> | |
| </Project> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment