class dnnl::graph::allocator

Overview

Allocator. More…

#include <dnnl_graph.hpp>

class allocator: public allocator_handle
{
public:
    // construction

    allocator(
        dnnl_graph_host_allocate_f host_malloc,
        dnnl_graph_host_deallocate_f host_free
        );

    allocator();
};

Detailed Documentation

Allocator.

Construction

allocator(
    dnnl_graph_host_allocate_f host_malloc,
    dnnl_graph_host_deallocate_f host_free
    )

Constructs an allocator according to given function pointers.

Parameters:

host_malloc

A pointer to malloc function for CPU

host_free

A pointer to free function for CPU

allocator()

Default constructor.