void weight_vector_bound_cuda::update_buffer_configuration(buffer_cuda_size_configuration& buffer_configuration) const
{
    std::vector<size_t> per_entry_sizes = get_sizes_of_additional_buffers_per_entry();
    for(std::vector<size_t>::const_iterator it = per_entry_sizes.begin(); it != per_entry_sizes.end(); ++it)
        buffer_configuration.add_per_entry_buffer(*it);

    std::vector<unsigned int> tex_per_entry = get_linear_addressing_through_texture_per_entry();
    for(std::vector<unsigned int>::const_iterator it = tex_per_entry.begin(); it != tex_per_entry.end(); ++it)
        buffer_configuration.add_per_entry_linear_addressing_through_texture(*it);
}
void weight_vector_bound_cuda::update_buffer_configuration(
    buffer_cuda_size_configuration& buffer_configuration,
    unsigned int updater_entry_count) const
{
    std::vector<size_t> per_entry_sizes = get_sizes_of_additional_buffers_per_entry();
    for(std::vector<size_t>::const_iterator it = per_entry_sizes.begin(); it != per_entry_sizes.end(); ++it)
        buffer_configuration.add_constant_buffer(*it * updater_entry_count);
}
示例#3
0
		void layer_hessian_cuda::update_buffer_configuration(buffer_cuda_size_configuration& buffer_configuration) const
		{
			std::vector<size_t> sizes = get_sizes_of_additional_buffers_per_entry();
			for(std::vector<size_t>::const_iterator it = sizes.begin(); it != sizes.end(); ++it)
				buffer_configuration.add_per_entry_buffer(*it);

			std::vector<size_t> fixed_sized = get_sizes_of_additional_buffers_fixed();
			for(std::vector<size_t>::const_iterator it = fixed_sized.begin(); it != fixed_sized.end(); ++it)
				buffer_configuration.add_constant_buffer(*it);

			buffer_configuration.add_per_entry_buffer(output_elem_count_per_entry * sizeof(float));

			if (backprop_required && !is_in_place_backprop())
				buffer_configuration.add_per_entry_buffer(input_elem_count_per_entry * sizeof(float));

			std::vector<unsigned int> tex_per_entry = get_linear_addressing_through_texture_per_entry();
			for(std::vector<unsigned int>::const_iterator it = tex_per_entry.begin(); it != tex_per_entry.end(); ++it)
				buffer_configuration.add_per_entry_linear_addressing_through_texture(*it);
		}