Forum Discussion
Altera_Forum
Honored Contributor
9 years agoGetting segmentation fault if Kernelinput gets bigger
Hello , I have following OpenCL-host code, this code convolves the inputsignal with the mask int main() { //inits context and program init_opencl(); soc_convolution(500,500); ...
Altera_Forum
Honored Contributor
9 years agoYou should insert printfs into your host code to find the exact function that is "segfault"ing. You are most likely overflowing the stack by declaring your data structure as "cl_uint inputSignal[inputSignalWidth][inputSignalHeight]"; allocating it using malloc will likely fix your problem.