Neko 1.99.9
A portable framework for high-order spectral element flow simulations
Loading...
Searching...
No Matches
bicgstab.c File Reference
#include <CL/cl.h>
#include <stdio.h>
#include <stdlib.h>
#include <device/device_config.h>
#include <device/opencl/jit.h>
#include <device/opencl/prgm_lib.h>
#include <device/opencl/check.h>
#include <device/opencl/buffer.h>
#include "bicgstab_kernel.cl.h"
Include dependency graph for bicgstab.c:

Go to the source code of this file.

Functions

void opencl_bicgstab_update_p (void *p, void *r, void *v, real *beta, real *omega, int *n, cl_command_queue cmd_queue)
 
void opencl_bicgstab_product_and_norm (void *a, void *b, void *mult, real_xp *res, int *n, cl_command_queue cmd_queue)
 
real_xp opencl_bicgstab_part1 (void *s, void *r, void *v, void *mult, real *alpha, int *n, cl_command_queue cmd_queue)
 
void opencl_bicgstab_part2 (void *x, void *r, void *p_hat, void *s_hat, void *s, void *t, void *f, void *mult, real *alpha, real *omega, real_xp *res, int *n, cl_command_queue cmd_queue)
 

Variables

static opencl_buffer_t redbuf = OPENCL_BUFFER_INIT
 

Function Documentation

◆ opencl_bicgstab_part1()

real_xp opencl_bicgstab_part1 ( void s,
void r,
void v,
void mult,
real alpha,
int n,
cl_command_queue  cmd_queue 
)

Fortran wrapper for BiCGStab part 1, \( s = r - \alpha v \), returning the process local \( s^T M s \)

Definition at line 160 of file bicgstab.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ opencl_bicgstab_part2()

void opencl_bicgstab_part2 ( void x,
void r,
void p_hat,
void s_hat,
void s,
void t,
void f,
void mult,
real alpha,
real omega,
real_xp res,
int n,
cl_command_queue  cmd_queue 
)

Fortran wrapper for BiCGStab part 2, \( x = x + \alpha \hat{p} + \omega \hat{s} \) and \( r = s - \omega t \). The process local \( r^T M r \) and \( f^T M r \) are returned in res.

Definition at line 218 of file bicgstab.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ opencl_bicgstab_product_and_norm()

void opencl_bicgstab_product_and_norm ( void a,
void b,
void mult,
real_xp res,
int n,
cl_command_queue  cmd_queue 
)

Fortran wrapper for a weighted inner product and squared norm, \( (a^T M b, b^T M b) \). The process local sums are returned in res.

Definition at line 104 of file bicgstab.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ opencl_bicgstab_update_p()

void opencl_bicgstab_update_p ( void p,
void r,
void v,
real beta,
real omega,
int n,
cl_command_queue  cmd_queue 
)

Fortran wrapper for the BiCGStab search direction update \( p = r + \beta (p - \omega v) \)

Definition at line 67 of file bicgstab.c.

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ redbuf

OpenCL host-side dispatch for the fused BiCGStab kernels.

The reductions return the process local sums; the Fortran side combines them across ranks. A two value reduction keeps the partial sums of the second value at buf_h[nb + group], so a single kernel launch and a single read back cover both. Partial sums, up to two values per work group

Definition at line 61 of file bicgstab.c.