Arax
-8d09c51940345c86062e8ef2427c705ae66e5926
A Runtime Framework for Decoupling Applications from Heterogeneous Accelerators
Loading...
Searching...
No Matches
arax_ptr.c
Go to the documentation of this file.
1
#include "
arax_ptr.h
"
2
#include "
arax_pipe.h
"
3
4
int
arax_ptr_valid
(
const
void
*ptr)
5
{
6
arax_pipe_s
*pipe =
arax_init
();
7
void
*vp = pipe;
8
9
if
(ptr < vp)
// Before segment start
10
return
0;
// not valid
11
12
vp += pipe->
shm_size
;
// Move to end of segment
13
14
if
(ptr < vp)
// Before segment end
15
return
1;
// valid
16
17
return
0;
// Not valid
18
}
arax_pipe.h
arax_pipe_s
struct arax_pipe arax_pipe_s
arax_ptr.h
arax_ptr_valid
int arax_ptr_valid(const void *ptr)
Definition
arax_ptr.c:4
arax_init
arax_pipe_s * arax_init()
Definition
impl.c:132
arax_pipe::shm_size
uint64_t shm_size
Definition
arax_pipe.h:28
src
core
arax_ptr.c
Generated by
1.13.2