Skip to content

Commit

Permalink
Applied format changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions committed Jun 5, 2024
1 parent 7f48780 commit e5c0185
Showing 1 changed file with 18 additions and 34 deletions.
52 changes: 18 additions & 34 deletions samples/matrix_multiply/src/MatrixMultiplyApplication.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,42 +164,30 @@ void MatrixMultiplyApplication::RecordCommands()
A_values[i] = MakeRandomMatrix(A_length);
B_values[i] = MakeRandomMatrix(B_length);

A_buffers[i] = GraphicsSystem::GetInstance()->CreateBuffer({"A_" + std::to_string(i),
BufferUsageFlagBit::SHADER_STORAGE,
A_length * sizeof(float),
&A_values[i][0]
A_buffers[i] = GraphicsSystem::GetInstance()->CreateBuffer({
"A_" + std::to_string(i), BufferUsageFlagBit::SHADER_STORAGE, A_length * sizeof(float), &A_values[i][0]
#if FASTCG_VULKAN
,
{},
true,
mpGraphicsContext
,
{}, true, mpGraphicsContext
#endif
});

B_buffers[i] = GraphicsSystem::GetInstance()->CreateBuffer({"B_" + std::to_string(i),
BufferUsageFlagBit::SHADER_STORAGE,
B_length * sizeof(float),
&B_values[i][0]
B_buffers[i] = GraphicsSystem::GetInstance()->CreateBuffer({
"B_" + std::to_string(i), BufferUsageFlagBit::SHADER_STORAGE, B_length * sizeof(float), &B_values[i][0]
#if FASTCG_VULKAN
,
{},
true,
mpGraphicsContext
,
{}, true, mpGraphicsContext
#endif
});

mC_buffers[i] = GraphicsSystem::GetInstance()->CreateBuffer(
{"C_" + std::to_string(i),
BufferUsageFlagBit::SHADER_STORAGE | BufferUsageFlagBit::DYNAMIC,
C_length * sizeof(float),
nullptr
mC_buffers[i] = GraphicsSystem::GetInstance()->CreateBuffer({
"C_" + std::to_string(i), BufferUsageFlagBit::SHADER_STORAGE | BufferUsageFlagBit::DYNAMIC,
C_length * sizeof(float), nullptr
#if FASTCG_VULKAN
,
{},
true,
mpGraphicsContext
,
{}, true, mpGraphicsContext
#endif
});
});

mC_values_cpu[i] = MakeZeroMatrix(C_length);
}
Expand Down Expand Up @@ -230,15 +218,11 @@ void MatrixMultiplyApplication::RecordCommands()
{
unsigned int mM, mN, mK;
} sizes{(unsigned int)mM, (unsigned int)mN, (unsigned int)mK};
const Buffer *pSizesBuffer = GraphicsSystem::GetInstance()->CreateBuffer({"Sizes",
BufferUsageFlagBit::UNIFORM,
sizeof(sizes),
&sizes
const Buffer *pSizesBuffer = GraphicsSystem::GetInstance()->CreateBuffer({
"Sizes", BufferUsageFlagBit::UNIFORM, sizeof(sizes), &sizes
#if FASTCG_VULKAN
,
{},
true,
mpGraphicsContext
,
{}, true, mpGraphicsContext
#endif
});

Expand Down

0 comments on commit e5c0185

Please sign in to comment.