Yet Another eXchange Tool 0.11.3
Loading...
Searching...
No Matches
xt_gpu.h File Reference

routines for using GPU devices More...

#include <stddef.h>
#include "core/ppm_visibility.h"
Include dependency graph for xt_gpu.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  xt_gpu_vtable
 

Macros

#define XT_GPU_INSTR_PUSH(arg)
 
#define XT_GPU_INSTR_POP
 

Enumerations

enum  xt_memtype { XT_MEMTYPE_HOST , XT_MEMTYPE_DEVICE , XT_MEMTYPE_COUNT }
 

Functions

PPM_DSO_INTERNAL void xt_gpu_init (void)
 
PPM_DSO_INTERNAL void * xt_gpu_malloc (size_t alloc_size, enum xt_memtype memtype)
 
PPM_DSO_INTERNAL void xt_gpu_free (void *ptr, enum xt_memtype memtype)
 
PPM_DSO_INTERNAL void xt_gpu_memcpy (void *dst, void const *src, size_t buffer_size, enum xt_memtype dst_memtype, enum xt_memtype src_memtype)
 
enum xt_memtype xt_gpu_get_memtype (const void *ptr)
 
PPM_DSO_INTERNAL int xt_gpu_instr_push (char const *name)
 
PPM_DSO_INTERNAL int xt_gpu_instr_pop (void)
 

Detailed Description

routines for using GPU devices

Author
Jörg Behrens behre.nosp@m.ns@d.nosp@m.krz.d.nosp@m.e Moritz Hanke hanke.nosp@m.@dkr.nosp@m.z.de Thomas Jahns jahns.nosp@m.@dkr.nosp@m.z.de

Definition in file xt_gpu.h.

Macro Definition Documentation

◆ XT_GPU_INSTR_POP

#define XT_GPU_INSTR_POP

Definition at line 60 of file xt_gpu.h.

◆ XT_GPU_INSTR_PUSH

#define XT_GPU_INSTR_PUSH ( arg)

Definition at line 59 of file xt_gpu.h.

Enumeration Type Documentation

◆ xt_memtype

enum xt_memtype
Enumerator
XT_MEMTYPE_HOST 
XT_MEMTYPE_DEVICE 
XT_MEMTYPE_COUNT 

Definition at line 68 of file xt_gpu.h.

Function Documentation

◆ xt_gpu_free()

PPM_DSO_INTERNAL void xt_gpu_free ( void * ptr,
enum xt_memtype memtype )

frees memory that was previously allocated using xt_gpu_malloc

Parameters
[in]ptrpointer to be freed
[in]memtypetype memory associated to ptr

Definition at line 187 of file xt_gpu.c.

Here is the caller graph for this function:

◆ xt_gpu_get_memtype()

enum xt_memtype xt_gpu_get_memtype ( const void * ptr)

determines the type of memory associated with the provided pointer

Parameters
[in]ptrpointer to be checked
Returns
type of memory associated to ptr

Definition at line 197 of file xt_gpu.c.

Here is the caller graph for this function:

◆ xt_gpu_init()

PPM_DSO_INTERNAL void xt_gpu_init ( void )

initialises xt_gpu

Remarks
if yaxt was compiled with CUDA support, xt_gpu will try to use it

Definition at line 126 of file xt_gpu.c.

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

◆ xt_gpu_instr_pop()

PPM_DSO_INTERNAL int xt_gpu_instr_pop ( void )

Definition at line 205 of file xt_gpu.c.

◆ xt_gpu_instr_push()

PPM_DSO_INTERNAL int xt_gpu_instr_push ( char const * name)

Definition at line 201 of file xt_gpu.c.

◆ xt_gpu_malloc()

PPM_DSO_INTERNAL void * xt_gpu_malloc ( size_t alloc_size,
enum xt_memtype memtype )

allocates memory of the specified type

Parameters
[in]alloc_sizenumber of bytes to be allocated
[in]memtypetype of memory to be allocated
Returns
allocated memory of specified size and memory type
NULL, if allocation failed

Definition at line 183 of file xt_gpu.c.

Here is the caller graph for this function:

◆ xt_gpu_memcpy()

PPM_DSO_INTERNAL void xt_gpu_memcpy ( void * dst,
void const * src,
size_t buffer_size,
enum xt_memtype dst_memtype,
enum xt_memtype src_memtype )

copies memory from src to dst

Parameters
[in]dstpointer to destination memory
[in]srcpointer to source memory
[in]buffer_sizenumber of bytes to be copied
[in]dst_memtypetype of destination memory
[in]src_memtypetype of source memory

Definition at line 191 of file xt_gpu.c.

Here is the caller graph for this function: