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

  • SEARCH
  • Home
  • 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 8446283
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T09:53:22+00:00 2026-06-10T09:53:22+00:00

I read (http://software.intel.com/en-us/articles/vectorization-writing-cc-code-in-vector-format/) that the Intel compiler has a flag to output information about

  • 0

I read (http://software.intel.com/en-us/articles/vectorization-writing-cc-code-in-vector-format/) that the Intel compiler has a flag to output information about vectorization – things like “BLOCK WAS VECTORIZED.”, etc. Does gcc have anything similar? I am just trying see if I can get an idea of what is getting vectorized and what is not. For example, I’d like to make a demo like this:

#include <vector>

class Point3
{
public:
  Point3() : Components(3)
  {
    data[0] = 0;
    data[1] = 0;
    data[2] = 0;
  }

  const unsigned int Components;
  float data[3];

private:


};

class Point4
{
public:
  Point4() : Components(4)
  {
    data[0] = 0;
    data[1] = 0;
    data[2] = 0;
    data[3] = 0;
  }

  const unsigned int Components;

  float data[4];
private:


};

template <typename T>
static float Add(const T& a, const T& b)
{
  float sumValues = 0.0f;
  for(unsigned int i = 0; i < a.Components; ++i)
  {
    sumValues += a.data[i] + b.data[i];
  }
  return sumValues;
}

int main()
{
  std::vector<Point3> point3vec(1000);
  for(std::size_t i = 0; i < point3vec.size() - 1; ++i)
  {
    Add(point3vec[i], point3vec[i+1]);
  }

  std::vector<Point4> point4vec(1000);
  for(std::size_t i = 0; i < point4vec.size(); ++i)
  {
    Add(point4vec[i], point4vec[i+1]);
  }

}

and see if one of the loops gets vectorized while the other doesn’t.

  • 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-06-10T09:53:23+00:00Added an answer on June 10, 2026 at 9:53 am

    See -ftree-vectorizer-verbose=n at http://gcc.gnu.org/onlinedocs/gcc/Debugging-Options.html#index-ftree_002dvectorizer_002dverbose-690

    In newer versions of GCC use -fopt-info-vec -fopt-info-vec-missed.

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

Sidebar

Related Questions

I've read http://dbaspot.com/sqlserver-programming/463313-32-bit-clr-procedure-64-bit-sql-server.html Does that mean it's not possible to run a 32 bits
I read in http://support.microsoft.com/kb/298408 that IIS6.0 automatically responds with a "courtesy redirect" (HTTP 301)
I read in this article that a company has created a software capable of
... after having just read http://www.cocoadev.com/index.pl?CocoaInsecurity ... I am curious to know about your
I read this: http://symfony.com/doc/current/book/service_container.html It said: $mailer = $this->get('my_mailer'); As an added bonus, the
I just read this: http://haacked.com/archive/2008/11/20/anatomy-of-a-subtle-json-vulnerability.aspx I was under the impression that overwriting Object or
I have read here http://lostechies.com/jimmybogard/2009/09/18/the-case-for-two-way-mapping-in-automapper/ about how you probably shouldn't be trying to un-flatten
I successfully installed the menu-block module and I read on http://www.palantir.net/blog/better-know-module-menu-block-part-i that there is
I am trying to setup Jeash for Haxe, so I read this: http://old.haxe.org/com/libs/jeash/firststeps Now,
I've read xUnit Test Patterns. http://martinfowler.com/books.html There is 'Churchillian knock-off' expression in Martin Fowler's

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.