<commit_before>// This file is distributed under the MIT license.
// See the LICENSE file for details.

#pragma once

#ifndef VSNRAY_SCHED_H
#define VSNRAY_SCHED_H

#include "camera.h"

namespace visionaray
{

class render_target;

//-------------------------------------------------------------------------------------------------
// Pixel sampler tags for use in scheduler params
//

namespace pixel_sampler
{
struct uniform_type {};
struct jittered_type {};
struct jittered_blend_type {};
}


//-------------------------------------------------------------------------------------------------
// Param structs for different pixel sampling strategies
//

template <typename RT, typename PxSamplerT, typename ...Args>
struct sched_params
{
    typedef RT                          rt_type;
    typedef typename RT::color_traits   color_traits;
    typedef PxSamplerT                  pixel_sampler_type;

    camera const& cam;
    RT& rt;
};

template <typename MT, typename V, typename RT, typename PxSamplerT, typename ...Args>
struct sched_params<MT, V, RT, PxSamplerT, Args...>
{
    using rt_type               = RT;
    using color_traits          = typename RT::color_traits;
    using pixel_sampler_type    = PxSamplerT;

    MT const& view_matrix;
    MT const& proj_matrix;
    V const& viewport;
    RT& rt;
};


//-------------------------------------------------------------------------------------------------
// Sched params factory
//

template <typename PxSamplerT, typename RT>
sched_params<RT, PxSamplerT> make_sched_params(camera const& cam, RT& rt)
{
    return sched_params<RT, PxSamplerT>{ cam, rt };
}

template <typename PxSamplerT, typename MT, typename V, typename RT>
sched_params<MT, V, RT, PxSamplerT> make_sched_params(MT const& view_matrix, MT const& proj_matrix,
    V const& viewport, RT& rt)
{
    return sched_params<MT, V, RT, PxSamplerT>{ view_matrix, proj_matrix, viewport, rt };
}

} // visionaray
<commit_msg>VC compile fix<commit_after>// This file is distributed under the MIT license.
// See the LICENSE file for details.

#pragma once

#ifndef VSNRAY_SCHED_H
#define VSNRAY_SCHED_H

#include "camera.h"

namespace visionaray
{

class render_target;

//-------------------------------------------------------------------------------------------------
// Pixel sampler tags for use in scheduler params
//

namespace pixel_sampler
{
struct uniform_type {};
struct jittered_type {};
struct jittered_blend_type {};
}


//-------------------------------------------------------------------------------------------------
// Param structs for different pixel sampling strategies
//

template <typename... Args>
struct sched_params;

template <typename RT, typename PxSamplerT>
struct sched_params<RT, PxSamplerT>
{
    typedef RT                          rt_type;
    typedef typename RT::color_traits   color_traits;
    typedef PxSamplerT                  pixel_sampler_type;

    camera const& cam;
    RT& rt;
};

template <typename MT, typename V, typename RT, typename PxSamplerT>
struct sched_params<MT, V, RT, PxSamplerT>
{
    using rt_type               = RT;
    using color_traits          = typename RT::color_traits;
    using pixel_sampler_type    = PxSamplerT;

    MT const& view_matrix;
    MT const& proj_matrix;
    V const& viewport;
    RT& rt;
};


//-------------------------------------------------------------------------------------------------
// Sched params factory
//

template <typename PxSamplerT, typename RT>
sched_params<RT, PxSamplerT> make_sched_params(camera const& cam, RT& rt)
{
    return sched_params<RT, PxSamplerT>{ cam, rt };
}

template <typename PxSamplerT, typename MT, typename V, typename RT>
sched_params<MT, V, RT, PxSamplerT> make_sched_params(MT const& view_matrix, MT const& proj_matrix,
    V const& viewport, RT& rt)
{
    return sched_params<MT, V, RT, PxSamplerT>{ view_matrix, proj_matrix, viewport, rt };
}

} // visionaray

{'fraction_non_alphanumeric': 0.22808358817533128, 'fraction_numerical': 0.0, 'mean_word_length': 1.9225614296351452, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 23, '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': '3372367', 'n_tokens_mistral': 1147, 'n_tokens_neox': 1106, 'n_words': 335}