Category : apple-silicon

I’m attempting to compile a hello world program on the new Apple Silicon. I’m in Visual Studio Code running under emulation with Rosetta 2. This is my code: #include <iostream> int main() { std::cout << "Hello World!"; return 0; } I get the error: [Running] cd "/Users/jacob/Documents/VS Code/" && g++ helloWorld.cpp -o helloWorld && "/Users/jacob/Documents/VS ..

Read more

I have a simple C application: #include <stdio.h> int main() { printf("Hello, world!n"); } When I build this on an Apple Silicon device, targeting arm64, but using a build system that is compiled for x86_64, the final binary cannot be executed and is reported as "killed" according to the shell: # arch simulates the build ..

Read more

I have a basic C program: #include <stdio.h> int main() { printf("Hello, world!n"); } When I compile this directly using cc on an Apple Silicon device, it produces an arm64 executable: % cc hello.c -o hello % file hello hello: Mach-O 64-bit executable arm64 % ./hello Hello, world! However, when I build it through a ..

Read more

I use Apple’s SIMD library and I need to do some masking operations. I want to get a mask from a comparison of two vectors like the _mm256_cmpeq_epi8 operation does in AVX2. Does Apple’s SIMD library have some sort of _mm256_cmpeq_epi8 AVX2 instruction? Or maybe some other vector-efficient approaches? Source: Windows Que..

Read more