mirror of
https://github.com/TREX-CoE/Sherman-Morrison.git
synced 2024-12-26 06:15:08 +01:00
6bb95f068d
- Added NVTX annotations to GPU kernel.
48 lines
917 B
C
48 lines
917 B
C
#pragma once
|
|
|
|
#include <stdint.h>
|
|
#include <stdlib.h>
|
|
#include <stdio.h>
|
|
|
|
void print_dm(const double* mat, uint16_t m, uint16_t n, uint16_t ldm, char* name)
|
|
{
|
|
printf("%s = \n", name);
|
|
for (uint16_t i = 0; i < m; ++i)
|
|
{
|
|
for (uint16_t j = 0; j < n; ++j)
|
|
{
|
|
printf("%9.3f ", mat[i * ldm + j]);
|
|
}
|
|
printf("\n");
|
|
}
|
|
printf("\n");
|
|
}
|
|
|
|
void print_im(const int* mat, uint16_t m, uint16_t n, uint16_t ldm, char* name)
|
|
{
|
|
printf("%s = \n", name);
|
|
for (uint16_t i = 0; i < m; ++i)
|
|
{
|
|
for (uint16_t j = 0; j < n; ++j)
|
|
{
|
|
printf("%d ", mat[i * ldm + j]);
|
|
}
|
|
printf("\n");
|
|
}
|
|
printf("\n");
|
|
}
|
|
|
|
void print_m_t(const double* mat, uint16_t m, uint16_t n, uint16_t ldm, char* name)
|
|
{
|
|
printf("%s = \n", name);
|
|
for (uint16_t i = 0; i < m; ++i)
|
|
{
|
|
for (uint16_t j = 0; j < n; ++j)
|
|
{
|
|
printf("%9.3f ", mat[j * ldm + i]);
|
|
}
|
|
printf("\n");
|
|
}
|
|
printf("\n");
|
|
}
|