Skip to content
Snippets Groups Projects
MemoryProcessing.cuh 563 B
Newer Older
数学の武士's avatar
.
数学の武士 committed
#pragma once
#include "TemplateParameters.h"
#include <cstddef>

namespace memproc
{
    template <MemType memtype>
    bool alloc(void *&array, const size_t new_size);

    template <MemType memtype>
    bool realloc(void *&array, size_t &allocated_size, const size_t new_size);

    template<MemType memtype>
    bool dealloc(void *&array, size_t &allocated_size);

    template<MemType memtype>
    bool dealloc(void *&array);

    template <MemType dst_memtype, MemType src_memtype>
    bool memcopy(void *dst, const void* src, const size_t copy_elem_size);
}