cctools
chirp_matrix.h
Go to the documentation of this file.
1 /*
2 Copyright (C) 2008- The University of Notre Dame
3 This software is distributed under the GNU General Public License.
4 See the file COPYING for details.
5 */
6 
7 #ifndef CHIRP_ARRAY_H
8 #define CHIRP_ARRAY_H
9 
10 #include "chirp_types.h"
11 
34 struct chirp_matrix *chirp_matrix_create(const char *host, const char *path, int width, int height, int element_size, int nhosts, time_t stoptime);
35 
44 struct chirp_matrix *chirp_matrix_open(const char *host, const char *path, time_t stoptime);
45 
54 int chirp_matrix_get_row(struct chirp_matrix *matrix, int y, void *data, time_t stoptime);
55 
65 int chirp_matrix_set_row(struct chirp_matrix *matrix, int y, const void *data, time_t stoptime);
66 
77 int chirp_matrix_get_col(struct chirp_matrix *matrix, int x, void *data, time_t stoptime);
78 
89 int chirp_matrix_set_col(struct chirp_matrix *matrix, int x, const void *data, time_t stoptime);
90 
102 int chirp_matrix_get_range(struct chirp_matrix *matrix, int x, int y, int width, int height, void *data, time_t stoptime);
103 
115 int chirp_matrix_set_range(struct chirp_matrix *matrix, int x, int y, int width, int height, const void *data, time_t stoptime);
116 
128 int chirp_matrix_get(struct chirp_matrix *matrix, int x, int y, void *data, time_t stoptime);
129 
141 int chirp_matrix_set(struct chirp_matrix *matrix, int x, int y, const void *data, time_t stoptime);
142 
146 int chirp_matrix_setacl(const char *host, const char *path, const char *subject, const char *rights, time_t stoptime);
147 
148 
154 int chirp_matrix_width(struct chirp_matrix *matrix);
155 
161 int chirp_matrix_height(struct chirp_matrix *matrix);
162 
168 int chirp_matrix_element_size(struct chirp_matrix *matrix);
169 
175 int chirp_matrix_nhosts(struct chirp_matrix *matrix);
176 
184 int chirp_matrix_nfiles(struct chirp_matrix *matrix);
185 
191 void chirp_matrix_fsync(struct chirp_matrix *matrix, time_t stoptime);
192 
198 void chirp_matrix_close(struct chirp_matrix *matrix, time_t stoptime);
199 
206 int chirp_matrix_delete(const char *host, const char *path, time_t stoptime);
207 
208 #endif
209 
210 /* vim: set noexpandtab tabstop=4: */
int chirp_matrix_set_range(struct chirp_matrix *matrix, int x, int y, int width, int height, const void *data, time_t stoptime)
Set a range of data.
struct chirp_matrix * chirp_matrix_create(const char *host, const char *path, int width, int height, int element_size, int nhosts, time_t stoptime)
Create a new distributed matrix.
int chirp_matrix_set_col(struct chirp_matrix *matrix, int x, const void *data, time_t stoptime)
Set all values in a column.
int chirp_matrix_get(struct chirp_matrix *matrix, int x, int y, void *data, time_t stoptime)
Get a single element.
int chirp_matrix_width(struct chirp_matrix *matrix)
Get the width of a matrix.
int chirp_matrix_get_col(struct chirp_matrix *matrix, int x, void *data, time_t stoptime)
Get all values in a column.
int chirp_matrix_get_range(struct chirp_matrix *matrix, int x, int y, int width, int height, void *data, time_t stoptime)
Get a range of data.
int chirp_matrix_height(struct chirp_matrix *matrix)
Get the height of a matrix.
int chirp_matrix_nfiles(struct chirp_matrix *matrix)
Get the number of files used by a matrix.
void chirp_matrix_fsync(struct chirp_matrix *matrix, time_t stoptime)
Force all data to disk.
int chirp_matrix_nhosts(struct chirp_matrix *matrix)
Get the number of hosts used by a matrix.
int chirp_matrix_setacl(const char *host, const char *path, const char *subject, const char *rights, time_t stoptime)
Set the acls on a matrix.
int chirp_matrix_get_row(struct chirp_matrix *matrix, int y, void *data, time_t stoptime)
Get all values in a row.
All of the structure and type definitions used by the Chirp API.
int chirp_matrix_delete(const char *host, const char *path, time_t stoptime)
Delete a matrix.
struct chirp_matrix * chirp_matrix_open(const char *host, const char *path, time_t stoptime)
Open an existing matrix.
void chirp_matrix_close(struct chirp_matrix *matrix, time_t stoptime)
Close a matrix and free all related resources.
int chirp_matrix_set_row(struct chirp_matrix *matrix, int y, const void *data, time_t stoptime)
Set all values in a row.
int chirp_matrix_set(struct chirp_matrix *matrix, int x, int y, const void *data, time_t stoptime)
Set a single element.
int chirp_matrix_element_size(struct chirp_matrix *matrix)
Get the element size of a matrix.