AGX Dynamics 2.42.1.1
Loading...
Searching...
No Matches
Channel.h
Go to the documentation of this file.
1/*
2Copyright 2007-2025. Algoryx Simulation AB.
3
4All AGX source code, intellectual property, documentation, sample code,
5tutorials, scene files and technical white papers, are copyrighted, proprietary
6and confidential material of Algoryx Simulation AB. You may not download, read,
7store, distribute, publish, copy or otherwise disseminate, use or expose this
8material unless having a written signed agreement with Algoryx Simulation AB, or having been
9advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10valid commercial license from Algoryx Simulation AB.
11
12Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13from using this software, unless otherwise stated in written agreements with
14Algoryx Simulation AB.
15*/
16
17#ifndef AGXDATA_CHANNEL_H
18#define AGXDATA_CHANNEL_H
19
20#include <agx/agxCore_export.h>
21#include <agx/Device.h>
22
23namespace agxData
24{
25 class Buffer;
26
33 {
34 public:
35
40
46 Channel(Buffer *target, Buffer *source);
47
50
51
52 void connect(Buffer *target, Buffer *source);
53
62 agx::SyncTag *transfer(size_t targetOffset, size_t sourceOffset, size_t numElements, bool blocking);
63
69
70
74 void flip();
75
79 Buffer *getTargetBuffer();
80
84 Buffer *getSourceBuffer();
85
86 private:
87 bool m_active;
88 Buffer *m_target;
89 Buffer *m_source;
90 void *m_transformBuffer;
91 size_t m_transformBufferSize;
92 size_t m_currentTransferSize;
93 size_t m_targetOffset;
94 };
95
96 /* Implementation */
99
100}
101
102
103#endif /* _AGXDATA_CHANNEL_H_ */
#define AGXCORE_EXPORT
Abstract representation of a data buffer.
Definition: Buffer.h:56
A channel is a directional data transfer connection between two buffers.
Definition: Channel.h:33
Buffer * getTargetBuffer()
Definition: Channel.h:97
void connect(Buffer *target, Buffer *source)
Channel(Buffer *target, Buffer *source)
Constructor.
Channel()
Default constructor.
Buffer * getSourceBuffer()
Definition: Channel.h:98
void postTransfer()
Perform local data copying and transformations if needed.
~Channel()
Destructor.
agx::SyncTag * transfer(size_t targetOffset, size_t sourceOffset, size_t numElements, bool blocking)
Transmit data on the channel.
void flip()
Flip the direction of the channel.
#define AGX_FORCE_INLINE
Definition: macros.h:58
Contains classes for low level data storage for AGX.
Definition: Container.h:23