class nbla::Cpu

class Cpu : public nbla::BackendBase

Singleton class for storing some handles or configs for CPU Computation.

Public Functions

virtual vector<string> array_classes() const

Available array class list used in CPU Function implementations.

virtual void _set_array_classes(const vector<string> &a)

Set array class list.

Note

Dangerous to call. End users shouldn’t call.

virtual void register_array_class(const string &name)

Register array class to available list by name.

virtual shared_ptr<Allocator> caching_allocator()

Get a caching allocator.

virtual shared_ptr<Allocator> naive_allocator()

Get a no-cache allocator.

virtual void free_unused_host_caches()

Free all unused host memory caches.

virtual void device_synchronize(const string &device)

Synchronize host to device.

virtual void default_stream_synchronize(const string &device)

Synchronize host to default stream of device.

inline virtual void create_lms_streams(int device = -1)

Create non blockuing streams for data transfer.

Noting to do in CPU backend.