Neko  0.9.99
A portable framework for high-order spectral element flow simulations
schwarz.c File Reference
#include <CL/cl.h>
#include <stdio.h>
#include <device/device_config.h>
#include <device/opencl/jit.h>
#include <device/opencl/prgm_lib.h>
#include <device/opencl/check.h>
#include "schwarz_kernel.cl.h"
Include dependency graph for schwarz.c:

Go to the source code of this file.

Macros

#define STR(X)   #X
 
#define CASE(NX)
 

Functions

void opencl_schwarz_extrude (void *arr1, int *l1, real *f1, void *arr2, int *l2, real *f2, int *nx, int *nel)
 
void opencl_schwarz_toext3d (void *a, void *b, int *nx, int *nel)
 
void opencl_schwarz_toreg3d (void *b, void *a, int *nx, int *nel)
 

Macro Definition Documentation

◆ CASE

#define CASE (   NX)
Value:
case NX: \
{ \
\
cl_kernel kernel = clCreateKernel(schwarz_program, \
STR(schwarz_extrude_kernel_nx##NX), \
&err); \
CL_CHECK(err); \
CL_CHECK(clSetKernelArg(kernel, 0, sizeof(cl_mem), (void *) &arr1)); \
CL_CHECK(clSetKernelArg(kernel, 1, sizeof(int), l1)); \
CL_CHECK(clSetKernelArg(kernel, 2, sizeof(real), f1)); \
CL_CHECK(clSetKernelArg(kernel, 3, sizeof(cl_mem), (void *) &arr2)); \
CL_CHECK(clSetKernelArg(kernel, 4, sizeof(int), l2)); \
CL_CHECK(clSetKernelArg(kernel, 5, sizeof(real), f2)); \
CL_CHECK(clEnqueueNDRangeKernel((cl_command_queue) glb_cmd_queue, \
kernel, 1, NULL, &global_item_size, \
&local_item_size, 0, NULL, NULL)); \
} \
break
double real
Definition: device_config.h:12
void * glb_cmd_queue
#define CL_CHECK(err)
Definition: check.h:12
void * schwarz_program
#define STR(X)

◆ STR

#define STR (   X)    #X

Function Documentation

◆ opencl_schwarz_extrude()

void opencl_schwarz_extrude ( void *  arr1,
int *  l1,
real f1,
void *  arr2,
int *  l2,
real f2,
int *  nx,
int *  nel 
)

Definition at line 49 of file schwarz.c.

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

◆ opencl_schwarz_toext3d()

void opencl_schwarz_toext3d ( void *  a,
void *  b,
int *  nx,
int *  nel 
)

Definition at line 102 of file schwarz.c.

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

◆ opencl_schwarz_toreg3d()

void opencl_schwarz_toreg3d ( void *  b,
void *  a,
int *  nx,
int *  nel 
)

Definition at line 124 of file schwarz.c.

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