Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7047651
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T02:47:50+00:00 2026-05-28T02:47:50+00:00

I’m playing around with C++ AMP but for some reason the most dumbed down

  • 0

I’m playing around with C++ AMP but for some reason the most dumbed down code won’t compile. This:

concurrency::extent<2> e(2,2);

concurrency::parallel_for_each(grid<2>(e), [](index<2> i) restrict(direct3d) {
});

results in the following error:

error C3576: ‘wmain::’:
Concurrency::details::_Parallel_for_each argument #3 has unsupported
type c:\program files (x86)\microsoft visual studio
11.0\vc\include\amp.h

It just doesn’t appear to like the lambda expression being passed for const _Kernel_type& _Kernel

Note; I’m using Visual Studio 11 Developer Preview which includes AMP support. “restrict(direct3d)” is a new keyword to support controlling which accelerator runs the code in question.

Any ideas? I’ve tried copying from a few different examples but nothing works so I’m a bit stumped.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T02:47:50+00:00Added an answer on May 28, 2026 at 2:47 am

    Your lambda passed to parallel_for_each is an empty class (no variables are captured, therefore there are no data members). You cannot have any useful computation without data, that is why you are getting an error.

    Please add concurrency::array or concurrency::array_view to your example, like so:

    using namespace concurrency;
    extent<2> e(2,2);
    array<int, 2> a(e);
    
    parallel_for_each(grid<2>(e), [&a](index<2> i) restrict(direct3d) {
        a[i] = 1;
    });
    

    Note: This applies only to Visual Studio 11 Developer Preview. The behavior will change in upcoming Beta release. Your code will compile as is, without any errors. Passing empty class would simply not do anything.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have this code to decode numeric html entities to the UTF8 equivalent character.
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
I have some data like this: 1 2 3 4 5 9 2 6
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
this is what i have right now Drawing an RSS feed into the php,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.