PeriDyno 1.0.0
Loading...
Searching...
No Matches
VkDeviceArray2D.h
Go to the documentation of this file.
1#pragma once
2#include "VkVariable.h"
3#include "VulkanBuffer.h"
4
5namespace dyno {
6
8 {
9 uint32_t nx;
10 uint32_t ny;
11 };
12
13 template<typename T>
15 {
16
17 public:
19
20 VkDeviceArray2D(uint32_t nx, uint32_t ny);
21
23
24 void resize(uint32_t nx, uint32_t ny, VkBufferUsageFlags usageFlags = 0);
25
26
27 VariableType type() override;
28
29 uint32_t bufferSize() override { return sizeof(T)*m_num; }
30
31 void clear();
32
34
35 inline uint32_t size() const { return m_num; }
36 inline uint32_t nx() const { return m_nx; }
37 inline uint32_t ny() const { return m_ny; }
38
39 private:
40 uint32_t m_nx = 0;
41 uint32_t m_ny = 0;
42
43 uint32_t m_num = 0;
44 };
45}
46
47#include "VkDeviceArray2D.inl"
uint32_t nx() const
uint32_t bufferSize() override
uint32_t ny() const
uint32_t size() const
VariableType type() override
void resize(uint32_t nx, uint32_t ny, VkBufferUsageFlags usageFlags=0)
#define T(t)
This is an implementation of AdditiveCCD based on peridyno.
Definition Array.h:25
VariableType
Definition VkVariable.h:14