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 8912601
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T04:14:36+00:00 2026-06-15T04:14:36+00:00

In SSE, if I have a 128-bit register containing 4 floats i.e. A =

  • 0

In SSE, if I have a 128-bit register containing 4 floats i.e.

A = a b c d ('a','b','c','d' are floats and 'A' is a 128-bit SSE register)

and

B = e f g h

then if I want

C = a e b f

I can simply do:

C = _mm_unpacklo_ps(A,B);

Similarly if I want

D = c g d h

I can do:

D = _mm_unpackhi_ps(A,B);

If I have an AVX register containing doubles, is it possible to do the same with a single instruction?

Based on how these intrinsics work, I know that I can’t use _mm256_unpacklo_pd(), _mm256_shuffle_pd(), _mm256_permute2f128_pd() or _mm256_blend_pd(). Is there any instruction apart from these that I can use or do I have to use a combination of the above instructions?

  • 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-15T04:14:37+00:00Added an answer on June 15, 2026 at 4:14 am

    One way that I can think of is the following:

    A1 = _mm256_unpacklo_pd(A,B);
    A2 = _mm256_unpackhi_pd(A,B);
    
    C = _mm256_permute2f128_pd(A1,A2,0x20);
    D = _mm256_permute2f128_pd(A1,A2,0x31);
    

    If anyone has a better solution, please do post below.

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

Sidebar

Related Questions

If I have an AVX register with 4 doubles in them and I want
The SSE shift instructions I have found can only shift by the same amount
I'm working on converting a bit of code to SSE, and while I have
I have some performance-heavy code that performs bit manipulations. It can be reduced to
I have a database of 3D models. I want user can rotate the model
x86 does not have an SSE instruction to convert from unsigned int32 to floating
I have some problem with SSE on ubuntu linux system. example source code on
I have to optimize a piece of code using SSE extensions. My target platforms
In some code I have converted to SSE I preform some ray tracing, tracing
I am new to optimizing code with SSE/SSE2 instructions and until now I have

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.