Category "c"

no speedup using openmp simd and different result between icc and gcc [duplicate]

I am new to Openmp and now trying to use Openmp + SIMD intrinsics to speedup my program, but the result is far from expectation. /* program:s

bilinear interpolation with DSP CMSIS library - passing 2D array

I am struggling to obtain the correct results for the function with CMSIS DSP bilinear_interp. I've first tried a simple linear interpolation: float test_tabl

how to read data from a file in this exercise?

I have to do this exercise: short explanation: read a file, and store informations in a struct pointed to by a pointer. long explanation: I have a struct "pe

Code that compiles with gcc but not with g++

I am writing a program in c, but i need to use a c++ library to work with an ADC's. In my code I have a library that I wrote called scheduler, this library comp

How to debug a C application that is called by another process and ends very quickly in Visual Studio?

I can't attach to the C application process because it ends only milliseconds after being called. And the caller is an exe that I don't have the source code.

How do you assign a multidimensional array of pointers to a multidimensional array of values in C?

I'm working on a Sudoku Solver, and I have to evaluate values in RealPuzzle (without changing them), and then decide whether or not the desired number can go so

Migrate a "zmq_send" command to Python

I have a c function that publish data to a c++ subscriber, now I want to migrate this c function to Python: void setup_msg_publish() { int r; zmqcontext

SIMD - "sorting" zeros in a vector [duplicate]

Please tell me on this issue, for example, I have a vector __m128i - filled as an int, that is, each value takes 4 bytes: __m128i my_m128i = _

How to use software prefetch systematically?

After reading the accepted answer in When should we use prefetch? and examples from Prefetching Examples?, I still have a lot of issues with understanding when

Pointer to a typedef in a function?

I'm completely new to C and coding in general, please be patient with me. I want to learn how to use pointers with a typedef structure inside of a function. As

I am trying to load words from a text file into a binary search tree

I am trying to load words from a text file into a binary search tree. Each line of the file contains one word. #include <stdio.h> #include <stdlib.h>

Cobol MCH3601 error when calling C program

there is a MCH3601 when calling a C program in COBOL multiple times. In the first calls, it works well, but then it fails with that error (MCH3601)... I call t

How can I get the exact output? of the print f from a array using string? c programming language

I can't get the exact output I somehow get a text in a another language something like that, #include <stdio.h> #include <stdlib.h> int main() {

Freeing the Memory of a list that contain lists

I have an assignment where i have to create a radix sort method using linked lists. First i create a sequence/list of random numbers then perform radix sort on

Building LMDB master branch on Windows

I'm trying to build LMDB from master branch, because Windows incremental file growth patch is not merged into release branch. I'm using CMake and MSVC compiler.

value always coming back as 0 when the answer should not be 0

Trying to get a value back that usually should return 20 to 30 as s with this code int s = sentences / wordcount * 100; both sentences and wordcount come out a

To compare two programs with each other

Help me understand how the program works. I take it from the book of Steven Pratt “Program language C” I find on page № 289 exercise №6.

Golden-section search in C

I'm trying to write a program that uses Golden-section search method to find the maximum area of a triangle inside an ellipse that is generated by the function

C library for gRPC

I have not found support of the C language on grpc.io. Are there any "unofficial" libraries supporting gRPC in C? My whole project is in C. I'm seeing a few opt

Writing an image to a socket in C

I made a server that can serve html to a browser, but for some reason it wont send images. Every time I send an image over the socket, the browser receives some