<commit_before>#pragma once

// 3.6.4 Accessors

#include "access.h"
#include "../common.h"

namespace cl {
namespace sycl {

namespace detail {

// Forward declaration
namespace kernel_ {
	class source;
}

class accessor_base {
};

// 3.6.4.3 Core accessors class
template <typename DataType, int dimensions, access::mode mode, access::target target>
class accessor_core : public accessor_base {
public:
	// Returns the size of the underlying buffer in number of elements.
	size_t get_size() const;

	// Returns the cl_mem object corresponding to the access.
	// TODO: Only available when target is cl_image or cl_buffer
	virtual cl_mem get_cl_mem_object() const {
		return nullptr;
	}

	// Returns the cl_event object corresponding to the last command to access the memory object.
	// TODO: Only available when target is cl_image or cl_buffer.
	cl_event get_cl_event_object() const;

protected:
	friend class kernel_::source;

	virtual void* resource() const {
		return nullptr;
	}

	virtual size_t argument_size() const {
		return 0;
	}
};

template<bool>
struct select_target;

// This does not compile with enums (at least in MSVC 2013), use ints instead
template <typename DataType, int dimensions, int mode, int target, typename = select_target<true>>
class accessor_;<commit_msg>Added typedefs to accessor class.<commit_after>#pragma once

// 3.4.6 Accessors

#include "access.h"
#include "../common.h"

namespace cl {
namespace sycl {

namespace detail {

// Forward declaration
namespace kernel_ {
	class source;
}

class accessor_base {
};

// 3.6.4.3 Core accessors class
template <typename DataType, int dimensions, access::mode mode, access::target target>
class accessor_core : public accessor_base {
public:
	using value_type = DataType;
	using reference = value_type&;
	using const_reference = const value_type&;

	// Returns the size of the underlying buffer in number of elements.
	size_t get_size() const;

	// Returns the cl_mem object corresponding to the access.
	// TODO: Only available when target is cl_image or cl_buffer
	virtual cl_mem get_cl_mem_object() const {
		return nullptr;
	}

	// Returns the cl_event object corresponding to the last command to access the memory object.
	// TODO: Only available when target is cl_image or cl_buffer.
	cl_event get_cl_event_object() const;

protected:
	friend class kernel_::source;

	virtual void* resource() const {
		return nullptr;
	}

	virtual size_t argument_size() const {
		return 0;
	}
};

template<bool>
struct select_target;

// This does not compile with enums (at least in MSVC 2013), use ints instead
template <typename DataType, int dimensions, int mode, int target, typename = select_target<true>>
class accessor_;
{'fraction_non_alphanumeric': 0.08404294705664568, 'fraction_numerical': 0.008885597926693817, 'mean_word_length': 4.350495049504951, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '2973172', 'n_tokens_mistral': 831, 'n_tokens_neox': 797, 'n_words': 311}