Neko 1.99.10
A portable framework for high-order spectral element flow simulations
Loading...
Searching...
No Matches
schwarz.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 "schwarz_kernel.cl.h"
Include dependency graph for schwarz.c:

Go to the source code of this file.

Macros

#define STR(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, cl_command_queue command_queue)
void opencl_schwarz_toext3d (void *a, void *b, int *nx, int *nel, cl_command_queue command_queue)
void opencl_schwarz_toreg3d (void *b, void *a, int *nx, int *nel, cl_command_queue command_queue)

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(command_queue, kernel, 1, NULL, \
&global_item_size, \
&local_item_size, 0, NULL, NULL)); \
CL_CHECK(clReleaseKernel(kernel)); \
} \
break
double real
#define STR(X)
void * schwarz_program

◆ STR

#define STR ( X)
Value:
#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,
cl_command_queue command_queue )

Definition at line 50 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,
cl_command_queue command_queue )

Definition at line 111 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,
cl_command_queue command_queue )

Definition at line 135 of file schwarz.c.

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