Results

struct atc_results

C equivalent of atc::Results. Although its fields should not be modified, even if they are this should normally not lead to memory errors.

Public Members

bool success

Normally true, set to false in case this struct is the result of a failed ATC function call (an exception was thrown). If false, the other values in this struct are meaningless.

size_t compressed_size
const char *compressed_data

If not NULL, represents an array of length compressed_size.

double compression_factor
size_t decompressed_sizes_length
const size_t *decompressed_sizes

If not NULL, represents an array of length decompressed_sizes_length.

double error
size_t timings_length
const atc_timing *timings

Instead of an std::map<std::string, double>, timings in the C API are stored as an array of atc_timing structs of length timings_length.

atc_results_impl *impl

An opaque pointer to the private implementation, should not be used by the user. Modifying this field almost certainly leads to crashes and/or memory corruption upon calling atc_destroy_results .

void atc_destroy_results(atc_results *results)

Destroys all resources associated with this atc_results struct. Must be explicitly called by the user for each atc_results struct received from ATC to avoid memory leaks. The struct should never be used anymore after destruction.

struct atc_timing

Represents a single timing tuple.

Public Members

const char *name
double timing

The name of the section that was timed.