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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T03:58:20+00:00 2026-05-30T03:58:20+00:00

I need to move a small 2D array of values around a much larger

  • 0

I need to move a small 2D array of values around a much larger 2D array of values, and set any values of the larger array that are greater than the corresponding values in the smaller array to the values of the smaller array. Think image compositing, sort of, but using two 2D arrays of floats. I need to do this a ton of times as fast as possible. Just wondering if there is some way to optimize using NEON Assembly, the Accelerate framework or some other method I haven’t heard of. Is anything going to be much faster than a double nested for loop to compare and replace values? For example, would it possibly be faster to store the values as a 1D array instead of a 2D array? Or faster to access the values across rows rather than down each column? Just trying to squeeze out any extra speed I can get, but not sure how.

  • 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-30T03:58:22+00:00Added an answer on May 30, 2026 at 3:58 am

    I don’t know of any functions in the Accelerate framework that will do what you want. You can definitely use NEON to accelerate it, without going directly to assembly language, using the vmin_f32 intrinsic to process two pairs of floats at a time, or using vminq_f32 to process four pairs at a time.

    These links might help get you started using the intrinsics, but I don’t really have any better advice for you:

    How to use the multiply and accumulate intrinsics in ARM Cortex-a8?
    ARM Information Center – NEON Intrinsics
    ARM NEON Optimization. An Example

    I found those by googling neon intrinsics tutorial.

    Also, the developer tools package includes some ARM architecture documentation:

    Xcode 4.2: /Developer/Library/PrivateFrameworks/DTISAReferenceGuide.framework/Versions/A/Resources/ARMISA.pdf
    Xcode 4.3: /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/Frameworks/DTISAReferenceGuide.framework/Versions/A/Resources/ARMISA.pdf

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

Sidebar

Related Questions

I need to move backwards through an array, so I have code like this:
I need to move .NET code to the Compact Framework. That code uses HttpUtility.UrlEncode
I need to move text that the user has entered into a large multi-line
I have a need to move an item in an IEnumerable<> up, that is
I have a small LAMP application that I want to move to Amazon I
I have a 256x256 texture in my view frustum that I need to move
I have a small SQL Server database that I need to copy on command
I need to display a set of Icons on a windows form and move
It seems that a lot of small business people have a need for some
We need to move off traditional FTP for security purposes (it transmits it's passwords

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.