| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 2647565 commit e3fdb1e
5 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -17,7 +17,7 @@ or Linux or download it from source: | |||
| 17 | 17 | ||
| 18 | 18 | ## Easy to use | |
| 19 | 19 | ||
| 20 | - The [array](\ref construct_mat) object is beautifully simple. | ||
| 20 | + The [array](\ref af::array) object is beautifully simple. | ||
| 21 | 21 | ||
| 22 | 22 | Array-based notation effectively expresses computational algorithms in | |
| 23 | 23 | readable math-resembling notation. You _do not_ need expertise in | |
@@ -92,9 +92,9 @@ Read more about how [ArrayFire JIT](http://arrayfire.com/performance-of-arrayfir | |||
| 92 | 92 | ||
| 93 | 93 | ## Simple Example | |
| 94 | 94 | ||
| 95 | - Here's a live example to let you see ArrayFire code. You create [arrays](\ref construct_mat) | ||
| 95 | + Here's a live example to let you see ArrayFire code. You create [arrays](\ref af::array) | ||
| 96 | 96 | which reside on CUDA or OpenCL devices. Then you can use | |
| 97 | - [ArrayFire functions](modules.htm) on those [arrays](\ref construct_mat). | ||
| 97 | + [ArrayFire functions](modules.htm) on those [arrays](\ref af::array). | ||
| 98 | 98 | ||
| 99 | 99 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.cpp} | |
| 100 | 100 | // sample 40 million points on the GPU | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -48,7 +48,7 @@ which cannot freed until the `array` object goes out of scope. As device memory | |||
| 48 | 48 | allocation can be expensive, ArrayFire also includes a memory manager which | |
| 49 | 49 | will re-use device memory whenever possible. | |
| 50 | 50 | ||
| 51 | - Arrays can be created using one of the [array constructors](\ref #construct_mat). | ||
| 51 | + Arrays can be created using one of the [array constructors](\ref af::array). | ||
| 52 | 52 | Below we show how to create 1D, 2D, and 3D arrays with uninitialized values: | |
| 53 | 53 | ||
| 54 | 54 | \snippet test/getting_started.cpp ex_getting_started_constructors | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -163,11 +163,6 @@ namespace af | |||
| 163 | 163 | const array::array_proxy slices(int first, int last) const; | |
| 164 | 164 | }; | |
| 165 | 165 | ||
| 166 | - //array(af_array in, const array *par, af_index_t seqs[4]); | ||
| 167 | - /** | ||
| 168 | - \ingroup construct_mat | ||
| 169 | - @{ | ||
| 170 | - */ | ||
| 171 | 166 | /** | |
| 172 | 167 | Create an uninitialized array (no data, undefined size) | |
| 173 | 168 | ||
@@ -553,15 +548,6 @@ namespace af | |||
| 553 | 548 | const dim_t dim0, const dim_t dim1 = 1, | |
| 554 | 549 | const dim_t dim2 = 1, const dim_t dim3 = 1); | |
| 555 | 550 | ||
| 556 | - /** | ||
| 557 | - @} | ||
| 558 | - */ | ||
| 559 | - | ||
| 560 | - /** | ||
| 561 | - \ingroup method_mat | ||
| 562 | - @{ | ||
| 563 | - */ | ||
| 564 | - | ||
| 565 | 551 | /** | |
| 566 | 552 | get the \ref af_array handle | |
| 567 | 553 | */ | |
@@ -720,22 +706,12 @@ namespace af | |||
| 720 | 706 | template<typename T> T scalar() const; | |
| 721 | 707 | ||
| 722 | 708 | /** | |
| 723 | - @} | ||
| 724 | - */ | ||
| 725 | - | ||
| 726 | - | ||
| 727 | - /** | ||
| 728 | - Get the device pointer from the array and lock the buffer in memory manager. | ||
| 729 | - @{ | ||
| 709 | + \brief Get the device pointer from the array and lock the buffer in memory manager. | ||
| 730 | 710 | ||
| 731 | 711 | The device memory returned by this function is not freed until unlock() is called. | |
| 732 | 712 | ||
| 733 | - \ingroup device_mat | ||
| 734 | 713 | */ | |
| 735 | 714 | template<typename T> T* device() const; | |
| 736 | - /** | ||
| 737 | - @} | ||
| 738 | - */ | ||
| 739 | 715 | ||
| 740 | 716 | // INDEXING | |
| 741 | 717 | // Single arguments | |
@@ -884,7 +860,6 @@ namespace af | |||
| 884 | 860 | /// | |
| 885 | 861 | /// \param[in] type is the desired type(f32, s64, etc.) | |
| 886 | 862 | /// \returns an array with the type specified by \p type | |
| 887 | - /// \ingroup method_mat | ||
| 888 | 863 | const array as(dtype type) const; | |
| 889 | 864 | ||
| 890 | 865 | ||
@@ -893,12 +868,10 @@ namespace af | |||
| 893 | 868 | /// \brief Get the transposed the array | |
| 894 | 869 | /// | |
| 895 | 870 | /// \returns Transposed matrix | |
| 896 | - /// \ingroup method_mat | ||
| 897 | 871 | array T() const; | |
| 898 | 872 | /// \brief Get the conjugate-transpose of the current array | |
| 899 | 873 | /// | |
| 900 | 874 | /// \returns conjugate-transpose matrix | |
| 901 | - /// \ingroup method_mat | ||
| 902 | 875 | array H() const; | |
| 903 | 876 | ||
| 904 | 877 | #define ASSIGN_(OP2) \ | |
@@ -1366,7 +1339,7 @@ namespace af | |||
| 1366 | 1339 | ||
| 1367 | 1340 | /// Evaluate an expression (nonblocking). | |
| 1368 | 1341 | /** | |
| 1369 | - \ingroup method_mat | ||
| 1342 | + \ingroup data_mat | ||
| 1370 | 1343 | @{ | |
| 1371 | 1344 | */ | |
| 1372 | 1345 | inline array &eval(array &a) { a.eval(); return a; } | |
@@ -1432,10 +1405,6 @@ namespace af | |||
| 1432 | 1405 | #if AF_API_VERSION >= 37 | |
| 1433 | 1406 | ||
| 1434 | 1407 | /// Evaluate an expression (nonblocking). | |
| 1435 | - /** | ||
| 1436 | - \ingroup method_mat | ||
| 1437 | - @{ | ||
| 1438 | - */ | ||
| 1439 | 1408 | inline const array &eval(const array &a) { a.eval(); return a; } | |
| 1440 | 1409 | ||
| 1441 | 1410 | #if AF_COMPILER_CXX_VARIADIC_TEMPLATES | |
@@ -1506,14 +1475,14 @@ extern "C" { | |||
| 1506 | 1475 | #endif | |
| 1507 | 1476 | ||
| 1508 | 1477 | /** | |
| 1509 | - \ingroup construct_mat | ||
| 1478 | + \ingroup c_api_mat | ||
| 1510 | 1479 | @{ | |
| 1511 | 1480 | */ | |
| 1512 | 1481 | ||
| 1513 | 1482 | /** | |
| 1514 | 1483 | Create an \ref af_array handle initialized with user defined data | |
| 1515 | 1484 | ||
| 1516 | - This function will create an \ref af_array handle from the memory provided in \p data | ||
| 1485 | + This function will create an \ref af_array handle from the memory provided in \p data. | ||
| 1517 | 1486 | ||
| 1518 | 1487 | \param[out] arr The pointer to the returned object. | |
| 1519 | 1488 | \param[in] data The data which will be loaded into the array | |
@@ -1528,6 +1497,9 @@ extern "C" { | |||
| 1528 | 1497 | /** | |
| 1529 | 1498 | Create af_array handle | |
| 1530 | 1499 | ||
| 1500 | + To release the memory allocated by this call you would have to | ||
| 1501 | + call \ref af_release_array once your use of this \ref af_array is complete. | ||
| 1502 | + | ||
| 1531 | 1503 | \param[out] arr The pointer to the retured object. | |
| 1532 | 1504 | \param[in] ndims The number of dimensions read from the \p dims parameter | |
| 1533 | 1505 | \param[in] dims A C pointer with \p ndims elements. Each value represents the size of that dimension | |
@@ -1538,13 +1510,6 @@ extern "C" { | |||
| 1538 | 1510 | AFAPI af_err af_create_handle(af_array *arr, const unsigned ndims, const dim_t * const dims, const af_dtype type); | |
| 1539 | 1511 | ||
| 1540 | 1512 | /** | |
| 1541 | - @} | ||
| 1542 | - */ | ||
| 1543 | - | ||
| 1544 | - /** | ||
| 1545 | - \ingroup method_mat | ||
| 1546 | - @{ | ||
| 1547 | - | ||
| 1548 | 1513 | Deep copy an array to another | |
| 1549 | 1514 | */ | |
| 1550 | 1515 | AFAPI af_err af_copy_array(af_array *arr, const af_array in); | |
@@ -1575,25 +1540,16 @@ extern "C" { | |||
| 1575 | 1540 | ||
| 1576 | 1541 | #if AF_API_VERSION >= 31 | |
| 1577 | 1542 | /** | |
| 1578 | - \ingroup method_mat | ||
| 1579 | - @{ | ||
| 1580 | - | ||
| 1581 | 1543 | Get the reference count of \ref af_array | |
| 1582 | 1544 | */ | |
| 1583 | 1545 | AFAPI af_err af_get_data_ref_count(int *use_count, const af_array in); | |
| 1584 | 1546 | #endif | |
| 1585 | 1547 | ||
| 1586 | - | ||
| 1587 | 1548 | /** | |
| 1588 | 1549 | Evaluate any expressions in the Array | |
| 1589 | 1550 | */ | |
| 1590 | 1551 | AFAPI af_err af_eval(af_array in); | |
| 1591 | 1552 | ||
| 1592 | - /** | ||
| 1593 | - @} | ||
| 1594 | - */ | ||
| 1595 | - | ||
| 1596 | - | ||
| 1597 | 1553 | #if AF_API_VERSION >= 34 | |
| 1598 | 1554 | /** | |
| 1599 | 1555 | Evaluate multiple arrays together | |
@@ -1614,14 +1570,7 @@ extern "C" { | |||
| 1614 | 1570 | */ | |
| 1615 | 1571 | AFAPI af_err af_get_manual_eval_flag(bool *flag); | |
| 1616 | 1572 | #endif | |
| 1617 | - /** | ||
| 1618 | - @} | ||
| 1619 | - */ | ||
| 1620 | 1573 | ||
| 1621 | - /** | ||
| 1622 | - \ingroup method_mat | ||
| 1623 | - @{ | ||
| 1624 | - */ | ||
| 1625 | 1574 | /** | |
| 1626 | 1575 | \brief Get the total number of elements across all dimensions of the array | |
| 1627 | 1576 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -351,7 +351,7 @@ extern "C" { | |||
| 351 | 351 | ||
| 352 | 352 | /** | |
| 353 | 353 | Create array from device memory | |
| 354 | - \ingroup construct_mat | ||
| 354 | + \ingroup c_api_mat | ||
| 355 | 355 | */ | |
| 356 | 356 | AFAPI af_err af_device_array(af_array *arr, void *data, const unsigned ndims, const dim_t * const dims, const af_dtype type); | |
| 357 | 357 | ||
@@ -380,9 +380,9 @@ extern "C" { | |||
| 380 | 380 | \param [in] msg A message to print before the table | |
| 381 | 381 | \param [in] device_id print the memory info of the specified device. | |
| 382 | 382 | -1 signifies active device. | |
| 383 | - | ||
| 383 | + | ||
| 384 | 384 | \returns AF_SUCCESS if successful | |
| 385 | - | ||
| 385 | + | ||
| 386 | 386 | \ingroup device_func_mem | |
| 387 | 387 | */ | |
| 388 | 388 | AFAPI af_err af_print_mem_info(const char *msg, const int device_id); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -31,18 +31,15 @@ | |||
| 31 | 31 | ||
| 32 | 32 | Array constructors, random number generation, transpose, indexing, etc. | |
| 33 | 33 | ||
| 34 | - @defgroup construct_mat Constructors of array class | ||
| 35 | - Construct an array object | ||
| 36 | - | ||
| 37 | - @defgroup method_mat Methods of array class | ||
| 38 | - Get information about the array object | ||
| 39 | - | ||
| 40 | 34 | @defgroup device_mat Managing devices in ArrayFire | |
| 41 | 35 | getting device pointer, allocating and freeing memory | |
| 42 | 36 | ||
| 43 | 37 | @defgroup data_mat Functions to create arrays. | |
| 44 | 38 | constant, random, range, etc. | |
| 45 | 39 | ||
| 40 | + @defgroup c_api_mat C API to manage arrays | ||
| 41 | + Create, release, copy, fetch-properties of \ref af_array | ||
| 42 | + | ||
| 46 | 43 | @defgroup index_mat Assignment & Indexing operation on arrays | |
| 47 | 44 | Access sub regions of an array object | |
| 48 | 45 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments