Category : arm64

for an application I am trying to use NumPy from C++ on a Mac M1. Unfortunately I get a segmentation fault when calling import_array(). My small test program looks like this: #define PY_SSIZE_T_CLEAN #define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION #include <Python.h> #include <numpy/arrayobject.h> int main(int argc, char *argv[]) { import_array(); if (PyErr_Occurred()) { std::cerr << "Failed to import ..

Read more

env: docker. gcc10 in arm64 debian. gcc7 in x86_64 debian. #include <cstdio> #include <limits> #include <cstdint> int main(int args, char *argv[]) { double d = std::numeric_limits<int64_t>::max(); int64_t t = static_cast<int64_t>(d); printf("%lldn", t); return 0; } Output: arm64: 9223372036854775807 x86_64: -9223372036854775808 Can someone help me understand why there is a difference? Source: Windows Que..

Read more

env: docker. gcc10 in arm64 debian. gcc7 in x86_64 debian. #include <cstdio> #include <limits> #include <cstdint> int main(int args, char *argv[]) { double d = std::numeric_limits<int64_t>::max(); int64_t t = static_cast<int64_t>(d); printf("%lldn", t); return 0; } Output: arm64: 9223372036854775807 x86_64: -9223372036854775808 Can someone help me understand why there is a difference? Source: Windows Que..

Read more

Having linked all the libraries in cmake and wrtten code that’d open a window with GLFW, running build with the make command returns such output: [main] Building folder: game [build] Starting build [proc] Executing command: /opt/homebrew/bin/cmake –build /Users/matt/projects/game/build –config Debug –target all -j 10 — [build] Consolidate compiler generated dependencies of target game [build] [ ..

Read more