<commit_before>//
// Created by <NAME> on 20/07/16.
//

#ifndef UBITACK_VISION_TEXTUREUPDATE_H
#define UBITACK_VISION_TEXTUREUPDATE_H

#include <utVision.h>
#include <utMeasurement/Measurement.h>
#include <utVision/Image.h>

#ifdef HAVE_OPENCL
#include <opencv2/core/ocl.hpp>
#ifdef __APPLE__
#include "OpenCL/opencl.h"
#include "OpenCL/cl_gl.h"
#else
#include "CL/cl.h"
#include "CL/cl_gl.h"
#include "GL/gl.h"
#endif
#endif

namespace Ubitrack {
namespace Vision {

class UTVISION_EXPORT TextureUpdate {
public:
    TextureUpdate() : m_bTextureInitialized(false), m_texture(0), m_pow2Width(0), m_pow2Height(0) { }

    bool getImageFormat(const Measurement::ImageMeasurement& image, bool use_gpu, int& umatConvertCode,
            GLenum& imgFormat, int& numOfChannels);

    void initializeTexture(const Measurement::ImageMeasurement& image);
    void cleanupTexture();

    void updateTexture(const Measurement::ImageMeasurement& image);

    bool m_bTextureInitialized;
    GLuint m_texture;

#ifdef HAVE_OPENCL
    //OpenCL
  cl_mem m_clImage;
  cv::UMat m_convertedImage;
#endif

    unsigned m_pow2Width;
    unsigned m_pow2Height;
};

}} // Ubitrack::Vision
#endif //UBITACK_TEXTUREUPDATE_H<commit_msg>fixed spelling<commit_after>//
// Created by <NAME> on 20/07/16.
//

#ifndef UBITRACK_VISION_TEXTUREUPDATE_H
#define UBITRACK_VISION_TEXTUREUPDATE_H

#include <utVision.h>
#include <utMeasurement/Measurement.h>
#include <utVision/Image.h>

#ifdef HAVE_OPENCL
#include <opencv2/core/ocl.hpp>
#ifdef __APPLE__
#include "OpenCL/opencl.h"
#include "OpenCL/cl_gl.h"
#else
#include "CL/cl.h"
#include "CL/cl_gl.h"
#include "GL/gl.h"
#endif
#endif

namespace Ubitrack {
namespace Vision {

class UTVISION_EXPORT TextureUpdate {
public:
    TextureUpdate() : m_bTextureInitialized(false), m_texture(0), m_pow2Width(0), m_pow2Height(0) { }

    bool getImageFormat(const Measurement::ImageMeasurement& image, bool use_gpu, int& umatConvertCode,
            GLenum& imgFormat, int& numOfChannels);

    void initializeTexture(const Measurement::ImageMeasurement& image);
    void cleanupTexture();

    void updateTexture(const Measurement::ImageMeasurement& image);

    bool m_bTextureInitialized;
    GLuint m_texture;

#ifdef HAVE_OPENCL
    //OpenCL
  cl_mem m_clImage;
  cv::UMat m_convertedImage;
#endif

    unsigned m_pow2Width;
    unsigned m_pow2Height;
};

}} // Ubitrack::Vision
#endif //UBITRACK_TEXTUREUPDATE_H
{'fraction_non_alphanumeric': 0.11294311624072548, 'fraction_numerical': 0.011541632316570486, 'mean_word_length': 5.037313432835821, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4598906', 'n_tokens_mistral': 902, 'n_tokens_neox': 860, 'n_words': 178}