MCPcopy Create free account
hub / github.com/NVIDIA/cuda-samples / createLinearSystem

Function createLinearSystem

cpp/3_CUDA_Features/jacobiCudaGraphs/main.cpp:190–199  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

188}
189
190void createLinearSystem(float *A, double *b)
191{
192 int i, j;
193 for (i = 0; i < N_ROWS; i++) {
194 b[i] = 2.0 * N_ROWS;
195 for (j = 0; j < N_ROWS; j++)
196 A[i * N_ROWS + j] = 1.0;
197 A[i * N_ROWS + i] = N_ROWS + 1.0;
198 }
199}
200
201void JacobiMethodCPU(float *A, double *b, float conv_threshold, int max_iter, int *num_iter, double *x)
202{

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected