\Device\NUL
The file is not a valid win32
You execute the library ?
𝕰𝖉𝖚𝖆𝖗𝖉𝖔
You execute the library ?
I invoke it using deno ffi
𝕰𝖉𝖚𝖆𝖗𝖉𝖔
I invoke it using deno ffi
Foreing function interface
𝕰𝖉𝖚𝖆𝖗𝖉𝖔
Only in windows its the problem, i tried in linux with .so files and worked
Hafiz Hilman
I met a C code like this in a book. char *r, *malloc(); r = malloc(10); What is the malloc doing in the variable declaration?
Sahil
Does anybody has any freelancing project for dev developer?
Muhammadkarim
I don't understand that
M͓̽ ͓̽a͓̽n͓̽k͓̽ ͓̽I͓̽N͓̽D͓̽
Hello my Friends In qt creator may I write c codes?
M͓̽ ͓̽a͓̽n͓̽k͓̽ ͓̽I͓̽N͓̽D͓̽
hi, yes
Thanks How?
Ighor
Thanks How?
you can create Cmake project and open it
Ighor
Cmake is now default in Qt Creator
M͓̽ ͓̽a͓̽n͓̽k͓̽ ͓̽I͓̽N͓̽D͓̽
you can create Cmake project and open it
Ok thank you so much ❤❤
M͓̽ ͓̽a͓̽n͓̽k͓̽ ͓̽I͓̽N͓̽D͓̽
Ighor
In linux?
on every platform
Chat Boss
Ali Ibragimov sent a huge message, it has been re-uploaded as a file Which description fits the following function? void funct(char *buffer) { static char B..
Anonymous
i need help
alessandro
is there a complete guideline about write in binary mode?
alessandro
i mean text
Dm
You got a job after a c++ course?
Something like this. You can pm me if you want details
/
umm
yes i need to know that
/
nobody knows how the a GPT disk is booted?
Shady
How can I write a program to print the number of distinct outcomes when “n” dice are rolled?
gp9
Hi everyone)
Anonymous
How can I write a program to print the number of distinct outcomes when “n” dice are rolled?
There are 6^n outcomes for n rolls of the dice. If by distinct you mean different outcomes on each roll, then there are n! outcomes.
Shady
There are 6^n outcomes for n rolls of the dice. If by distinct you mean different outcomes on each roll, then there are n! outcomes.
Like when 2 dice are thrown, Let us assume two outcomes are (2,3) and (3,2) In this we have to count these two outcomes as 1
Anonymous
nobody knows how the a GPT disk is booted?
Booting is a huge topic. Just ask a specific question. People might answer if they know. Booting doesn't concern itself with the partition table (MBR or GPT). In particular, if you are using a GPT partitioning scheme, then it is highly likely that you are booting a UEFI system. The UEFI can recognise an EFI partition and therefore load the bootloader directly from there unlike on an old BIOS system where you need the bootloader split across multiple stages with each stage progressively doing more work to get ato a stage where the bootloader can read from a specific disk partition and load the kernel from there. That is why BIOS based systems require a ramdisk which contains file system code. UEFI systems got rid of this requirement.
Anonymous
Like when 2 dice are thrown, Let us assume two outcomes are (2,3) and (3,2) In this we have to count these two outcomes as 1
If you have 7 dice then, is the outcome 1,1,1,1,1,1,2 same as the outcome 2,1,1,1,1,1,1
Anonymous
Yes. We have to count them as 1
This is not straightforward. Take any particular outcome of n rolls of a dice. You want to count all permutations of this outcome as the same. A particular outcome may be permuted in n!/(N1!)(N2!)(N3!)...(N6!) ways where N1 is the total number of 1s, N2 is the total number of 2s,...,N6 is the total number of 6s. So your program must sum over these different combinations . N1+N2+...+N6 = n. The number of different integer combinations that can sum to n with 0<=Ni<=n is (n+5)!/6!(n-1)!. So you will have that many summations in your program
Anonymous
*UEFI got rid of that requirement provided you use a file system supported by UEFI bootloaders
I mentioned that specifically saying UEFI can read directly from an EFI partition. It has the code hardwired to read an EFI partition
Ludovic 'Archivist'
I mentioned that specifically saying UEFI can read directly from an EFI partition. It has the code hardwired to read an EFI partition
It can also bootstrap from some other partition formats and read them directly which is what I meant. It can allow to read a Linux kernel from an ext2 partition without having a stage for that for example. (it doesn't work with OpenBSD ufs :pepehands:)
Ludovic 'Archivist'
If I can try for a catastrophe, I will try for a catastrophe
Ludovic 'Archivist'
Disaster follows in my wake for that is what I sign on autographs
Anonymous
You know me and my crazy schemes
According to Wiki, the UEFI mandates FAT16 or FAT32 partitioning scheme for the system EFI partition. Have you tried an EXT2 filesystem for the EFI partition?
Anonymous
Even archlinux Wiki mentions the same - https://wiki.archlinux.org/title/EFI_system_partition
Ludovic 'Archivist'
Anonymous
Yup, what that means is that UEFI mandates implementers to implement at least FAT16 and FAT32
Yes I understood that part. That is why I asked if you have tried it on EXT2 or EXT4?
Ludovic 'Archivist'
Levi
Please , anyone can tell me what should I do after completing a course . To get better at c++ .
Anton
Hi everyone. I’m struggling with algorithm on A x 2*B+1 and 2*B+1 x C matrices multiplication using SIMD. Is there any good resource out there on this particular case? I would greatly appreciate if someone could show me one.
● Igor
I don't understand why my main.c does not compile. I am including the proper header file but it says some functions are undefined... /usr/bin/ld: /tmp/ccni9yBC.o: in function `main': main.c:(.text+0x30): undefined reference to `map_get' /usr/bin/ld: main.c:(.text+0x71): undefined reference to `map_put' /usr/bin/ld: main.c:(.text+0x87): undefined reference to `map_get' And they are defined in hashmap.h and hashmap.c Files are found here: https://github.com/igoracmelo/studying-c/tree/master/hashmap
M͓̽ ͓̽a͓̽n͓̽k͓̽ ͓̽I͓̽N͓̽D͓̽
Cmake is now default in Qt Creator
Excuse me again C in qt hasn't GUI environment?
Chat Boss
C R sent a huge message, it has been re-uploaded as a file Hello I am doing basic one program of overflow in which I have a doubt Program: #include<bi..
Ighor
Excuse me again C in qt hasn't GUI environment?
Qt Creator can open non Qt projects
Ighor
Qt Creator can open non Qt projects
it just runs cmake, make and gcc/g++, also gdb when needed, so it is full set of plain C development
Anonymous
I don't understand why my main.c does not compile. I am including the proper header file but it says some functions are undefined... /usr/bin/ld: /tmp/ccni9yBC.o: in function `main': main.c:(.text+0x30): undefined reference to `map_get' /usr/bin/ld: main.c:(.text+0x71): undefined reference to `map_put' /usr/bin/ld: main.c:(.text+0x87): undefined reference to `map_get' And they are defined in hashmap.h and hashmap.c Files are found here: https://github.com/igoracmelo/studying-c/tree/master/hashmap
You have to link hashmap.o with main.o. I guess you tried compiling just main.c, hoping the compiler would find hashmap.c on its own. That is not how a C/C++ compiler works. You have to specify all the files that need to be compiled explicitly. Only then the compiler will attempt to link these files together and piece together missing information at the linking stage.
M͓̽ ͓̽a͓̽n͓̽k͓̽ ͓̽I͓̽N͓̽D͓̽
Anonymous
Hi everyone. I’m struggling with algorithm on A x 2*B+1 and 2*B+1 x C matrices multiplication using SIMD. Is there any good resource out there on this particular case? I would greatly appreciate if someone could show me one.
What algorithm are you using for multiplying the matrices? If you are using the naive n^3 algorithm, then vectorizing it is straightforward. If you are using Strassen's algorithm then there is quite a bit of work involved. For naive algorithm, you would've computing c[i][j] as Σ(a[i][k]*b[k][j]) for i,j,k running through the respective dimensions. Each element c[i][j] in the destination matrix is the dot product of row vector a[i] with column vector b[j] i.e. Σ(a[i][k]*b[k][j]) The naive way to do this would be to increase i,j and k all by 1 at each step and carry out the multiplications n^3 times which is what gives the complexity. This is also inefficient because calculating the value of each cell in the destination matrix is a memory bound operation that increases the latency involved. The easiest way to vectorize this would be to evaluate the dot product of a row vector from matrix A with 4 column vectors from matrix B to compute 4 elements in the destination matrix at the same time. This is shown in the image below.
Anonymous
Thanks for replying. I'm familiar with Strassen and naive way. The problem is that I want to achieve vectorization manually: using Intel intrinsics only. Do you think it worth trying, or should I let the compiler do the job?
The compiler won't be able to do it in most of the cases because the optimisations that a compiler does are most often spatial cache friendly optimisations. But matrix multiplication is not typically a spatial cache friendly algorithm. Hence the compiler won't specifically be able to do the vectorization optimization that I showed in the image above even with the highest optimization level enabled. You have to request for it manually using Intel Intrinsics. It is entirely possible that a compiler is built to recognise direct matrix multiplications and carry out SIMD operations for it but in practice I haven't seen such optimizations directly.
Anonymous
C R sent a huge message, it has been re-uploaded as a file Hello I am doing basic one program of overflow in which I have a doubt Program: #include<bi..
If a long is 32 bits on your machine the maximum value it can store is 4294967295 which is less than 1000000000.
Anonymous
Thanks for replying. I'm familiar with Strassen and naive way. The problem is that I want to achieve vectorization manually: using Intel intrinsics only. Do you think it worth trying, or should I let the compiler do the job?
Here is a Stackoverflow link on trying to auto vectorize matrix multiplication code : https://stackoverflow.com/questions/43512852/c-matrix-multiplication-auto-vectorization The author is forcing the compiler to auto vectorize the naive matrix multiplication algorithm but the compiler specifically warns that it won't be able to do so because of non contiguous array access (in matrix B, you are accessing elements across a column which are non contiguous). This is the reason why, you must explicitly ensure that both matrices are not stored in row major form and then only attempt to auto vectorize matrix multiplication or you must use Intrinsics yourself to force vectorization.
Anton
Here is a Stackoverflow link on trying to auto vectorize matrix multiplication code : https://stackoverflow.com/questions/43512852/c-matrix-multiplication-auto-vectorization The author is forcing the compiler to auto vectorize the naive matrix multiplication algorithm but the compiler specifically warns that it won't be able to do so because of non contiguous array access (in matrix B, you are accessing elements across a column which are non contiguous). This is the reason why, you must explicitly ensure that both matrices are not stored in row major form and then only attempt to auto vectorize matrix multiplication or you must use Intrinsics yourself to force vectorization.
I've recently stumbled upon the article with a somewhat similiar idea, and actually I wanted to share godbolt code, taken from the same article, where some form of vectorization is achieved: shorturl.at/xFGT7 https://siboehm.com/articles/22/Fast-MMM-on-CPU You mentioned spatial locality: can I increase it with a contiguous pool of memory in order to make the algorithm more cache friendly in this regard? I can't use stack for the pool because there will be enormous amounts of data.
Lurich
Hello can you help me ? I have a problem in c++ language
ÐΞΛÐ HΛϾКΞЯ
Ahmed
What is the difference between iostream and studio.h?
Ahmed
And how many libraries c++ has?
Ahmed
And do we use all of them?
Doreece
Hi Do you have any idea how to show the binary form of a double?
Dm
And do we use all of them?
just google this question. The main library which provided with compiler is STL. It has minimal amount of basic data structures/algorithms and some others stuff (like threads, times, I/O). "do we use all of them?" totally strange question. You use it if you need it. You can work with boost types or some proprietal (ex. embedded) and forget about STL but in general all components from STL are useful.
Dm
Hi Do you have any idea how to show the binary form of a double?
convert it to uint32_t (but you have to use reinterpret_cast or C style cast to cast address of double in memory) and use binary shift and binary and (&) double a = 10.0; uint32_t b = *(uint32_t*) &a;
Dm
What STL is?
standard library (read my prev message to understand what inside stl). Just google it please. it will be much faster to understand.
Ahmed
Thanks man
Tom
Hello guys i have a car rental system to implement in c++
Tom
Can someone suggest me any ideas to start with this project?