cm_cusp_cuda_exports.h 962 Bytes
Newer Older
1
2
3
#pragma once

#include <vector>
4
#include <GL/gl.h>
5
6
7
8
9
10
11
12

class CuspGPUData;

CuspGPUData* CUSP_CM_createGpuData(int width, int height);
void CUSP_CM_destroyGpuData(CuspGPUData *data);
void CUSP_CM_resizeGpuData(CuspGPUData& data, int width, int height);
void CUSP_CM_buildEquationSystem(CuspGPUData& data, const unsigned char* image, int width, int height,
                                 float alpha, float beta, float gamma,
13
14
                                 float gradientScaling,
                                 bool isUpsideDown = true);
15
16
17
18
void CUSP_CM_setInitialSolution(CuspGPUData& data, const std::vector<float>& values);
void CUSP_CM_uploadSystem(CuspGPUData &data);
void CUSP_CM_downloadSolution(CuspGPUData &data);
void CUSP_CM_solveSystem(CuspGPUData& data, int iterations, float precision);
19
20
21
22
const float* CUSP_CM_getSolutionPtr(const CuspGPUData& data);

void CUSP_CM_copyTex(GLuint tex_in, GLuint tex_out, int width, int height);
void CUSP_CM_initCuda();