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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T17:42:34+00:00 2026-06-15T17:42:34+00:00

Here is simple binarization function void binarize(void *output, const void *input, int begin, int

  • 0

Here is simple binarization function

void binarize(void *output, const void *input, int begin, int end, uint8_t threshold) {
#ifdef __ARM_NEON__
    uint8x16_t thresholdVector = vdupq_n_u8(threshold);
    uint8x16_t highValueVector = vdupq_n_u8(255);
    uint8x16_t* __restrict inputVector = (uint8x16_t*)input;
    uint8x16_t* __restrict outputVector = (uint8x16_t*)output;
    for ( ; begin < end; begin += 16, ++inputVector, ++outputVector) {
        *outputVector = (*inputVector > thresholdVector) & highValueVector;
    }
#endif
}

It works fine on iOS. However when I’m compiling it for Android it gives me an error:

error: invalid operands of types ‘uint8x16_t {aka __vector(16)
__builtin_neon_uqi}’ and ‘uint8x16_t {aka __vector(16) __builtin_neon_uqi}’ to binary ‘operator>’

I use this flag in Android.mk to enable NEON:

ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
      LOCAL_ARM_NEON := true
endif
  • 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-15T17:42:35+00:00Added an answer on June 15, 2026 at 5:42 pm

    The difference comes because of different compilers. For iOS you are compiling with Clang but for Android you are building the code with GCC (unless you override the defaults).

    GCC is much more stupid about vector types and could not use them with C/C++ operators like > or &. So you have two basic options:

    1. Try to compile with Clang from the latest Android NDK r8c

      Put NDK_TOOLCHAIN_VERSION=clang3.1 to your Application.mk for this.

    2. Rewrite your code explicitly using vld1q_u8 for load, vst1q_u8 for store, vcgtq_u8 for operator > and vandq_u8 for operator &
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here simple code I am not getting the expected output. #include<stdio.h> int main() {
Here is simple PHP code echo '<form method=POST action=calcbyme.php></br> enter value1 :<input type=text name=f1></br>
Here is simple form contain multiple checkboxes options and textarea input: <form method=post name=form1
I have here simple query using group function.Here is the query SELECT DECODE (DIRAPP,
Here my simple accordion : <script type=text/javascript> $(function() { $(dt.title).click(function() { $(div.info).slideUp(slow); $(this).next(div.info:hidden).slideDown(normal );
Here is simple example I did: http://jsfiddle.net/J3rBX/ My purpose: when I mouseover that input,
Here a simple C# piece of code: Convert.ToInt32(TimeSpan.FromMinutes(5).TotalMilliseconds); //which brings me 300000 (int)TimeSpan.FromMinutes(5).Milliseconds; //which
So,here a simple method with a block -(void)getPointsInRange:(double)radius nearByPoint:(SGPoint *)nearByPoint { SGStorageQuery *query =
I've gotta be missing something simple here. Take the following code: public IEnumerable<int> getInt(){
here my simple code to add filename and their associated icon to virtualtreeview PFileInfoRec

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.