Why is this cpu going a lot faster?
i wrote a c program, run at Intel i5-7500(kubuntu with virtualbox run at win10) and Intel Xeon E5-26xx v4(tenxun cloud). i think Intel i5-7500 will be faster(CPU MHz:3.4GHz), but Intel Xeon E5-26xx...
View ArticleWhy Parallel Merge sort runs faster with single thread?
I have the following Parallel Merge sort algorithm in openMP. OpenMP creates 8 threads by default, but it is way slower than sequential. But when I specify omp_set_num_threads(1), i.e. set number of...
View ArticleHow do I use jit_type_nfloat in c library libjit?
I faced a really bizarre behavior of libjit library.My task requires using arrays of long double. I played around with libjit arrays and found myself being not able to make libjit work with long double...
View ArticleEclipse C/C++ (CDT) import files into project - header file not found -...
I am trying to import files into an Eclipse C project and compile it. The build process cannot find the local header files. The header files are located in the src directory. How can I edit the include...
View ArticleInitialization issue of an array with gcc 4.8.5
For an assignment like thisfloat sums[feature_column] = {0.0}; where feature_column is integer, I get this error on gcc 4.8.5error: variable "sums" may not be initialized How can I solve that? Isn't...
View ArticleError: immediate cannot be moved by a single
I am trying to compile glibc-2.30 for aarch64. I am using very basic configuration:../configure \ --with-headers=/tmp/headers/include \ --disable-sanity-checks \ --enable-kernel=3.18.0 No error on...
View ArticleHow to warn about incompatible type for argument on void pointer in C?
In a example below, I want to know the call of func with a wrong type of argument - vptr, which should be called with an int pointer.void func(int * ptr){ } int main(){ void * vptr; func(vptr); } GCC...
View Articlecollect2: error: ld returned 1 exit status while compiling openssl
I'm trying to cross-compile openssl../Configure linux-generic32 --prefix=/usr/myopenssl make CC=/usr/bin/arm-linux-gnueabi-gcc AR=/usr/bin/arm-linux-gnueabi-ar RANLIB=/usr/bin/arm-linux-gnueabi-ranlib...
View ArticleWhy is `std::find_if` implemented by loop unrolling but `std::for_each` isn't?
The gcc implementation of the standard library implements find_if using loop unrolling for RA iterators, and other search functions (search, none_of, find, etc) are implemented by calling find_if to...
View ArticleLinking error trying to compile C code embedded with Python
I'm trying to import and run this python function inside C code:import requests import json url = 'http://127.0.0.1:5000/' def verify(): code = input('Show-me the code: ') r = requests.post(url,...
View ArticleERROR: Failed building wheel for pocketsphinx while trying to install...
I'm trying to install pocketsphinx and get following error:jandornhege@JanDornhegeUbuntu:~/Hermes/Basefunktions$ pip install pocketsphinx Collecting pocketsphinx Using cached...
View ArticleHow can a function be called without the call instruction in assembly?...
This question already has an answer here:What is inlining? 10 answersWhy is inlining considered faster than a function call? 16 answersWhat exactly is the “as-if” rule? 3 answersI'm learning to read...
View ArticleThe advantages of using 32bit registers/instructions in x86-64
Sometimes gcc uses 32bit register, when I would expect it to use a 64bit register. For example the following C code:unsigned long long div(unsigned long long a, unsigned long long b){ return a/b; } is...
View Articlecompiling ncurses code with gcc -lncurses flag seems to not be working
I'm writing a terminal based Tetris game using ncurses. I've segregated all of the ncurses code into a file called tetrisUI.c which i include a header file for in my main.c source file. When I compile...
View ArticleDoes gcc version matter for kernel modules
We've been compiling kernel modules for an embedded powerpc system for a few years now and generally things are ok with some rare unexplained stability problems. Recently a collegue pointed out that...
View ArticleError "Unable to locate package gcc-arm-none-eabi debian"
I want to compile C code on my BeagleBone Black board which has an ARM Cortex-A8. My operating system is Debian. When I run the makefile, I've get:no such file or directory: 'arm-none-eabi'So I tried...
View ArticleARM cross-compilation, "VFP registered used by x.out, not y.o" issue on Linux...
I am cross-compiling a project for an ARM Cortex-M4F target. I have been cross-compiling this project successfully for months on a Windows 7 PC and I have now to be able to cross-compile it also from a...
View ArticleWhat is linker, compiler, assembler and elaborator in an IDE like CodeBlocks?
IDE consists of a linker, compiler, assembler, and elaborator. I want to know about them as follow:What is their relation?How they are connected?What are their roles?Their preference. If possible, what...
View ArticleGCC inline asm constraints for XBurst (MXU2) SIMD registers?
We are rewriting gemmlowp MIPS SIMD code from MSA to MXU2, which is a different SIMD implementation than the MSA.In the original MSA, SIMD registers w0-w31 are aliases for floating point registers...
View ArticleApplication crashes when accessing specific data in the .rodata section
I had to rephrase this question and its title completely because my initial analysis turned out to be wrong (thanks for all the hints and suggestions!). The old title of the question was:GCC -O3 messes...
View Article