Skip to content

Commit 6a55816

Browse files
committed
Including a large sparse matrix
1 parent d6a5663 commit 6a55816

File tree

6 files changed

+15
-16
lines changed

6 files changed

+15
-16
lines changed

chapter_09/ch9__config.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
#include "../utils.h"
1515
#include "../datasets_info.h" //Credit card dataset info
1616

17-
#define CH9__FILEPATH LOREM_IPSUM_DATASET_PATH
18-
#define CH9__INPUT_ARRAY_LENGTH LOREM_IPSUM_DATASET_BYTES
17+
#define CH9__FILEPATH THE_KING_JAMES_BIBLE_PATH
18+
#define CH9__INPUT_ARRAY_LENGTH THE_KING_JAMES_BIBLE_BYTES
1919
#define CH9__OUTPUT_ARRAY_LENGTH 5
2020

2121
#define CH9__HISTOGRAM_WITH_BLOCK_PARTITIONING "HISTOGRAM_WITH_BLOCK_PARTITIONING"

chapter_10/ch10__config.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414
#include "../utils.h"
1515
#include "../datasets_info.h" //Credit card dataset info
1616

17-
#define CH10__INPUT_NON_ZERO_LENGTH 7
18-
#define CH10__INPUT_ROWS 4
19-
#define CH10__INPUT_COLS 4
20-
#define CH10__INPUT_LARGEST_NONZERO_ROW_WIDTH 3
17+
#define CH10__INPUT_NON_ZERO_LENGTH 80666//7
18+
#define CH10__INPUT_ROWS 3000//4
19+
#define CH10__INPUT_COLS 3000//4
20+
#define CH10__INPUT_LARGEST_NONZERO_ROW_WIDTH 48//3
2121

2222
#define CH10__CSR_EXAMPLE_NAME "nz" NUM2STR(CH10__INPUT_NON_ZERO_LENGTH) "_" NUM2STR(CH10__INPUT_ROWS) "x" NUM2STR(CH10__INPUT_COLS)
2323
#define CH10__CSR_EXAMPLE_PATH "../datasets/sparse/" CH10__CSR_EXAMPLE_NAME "/" CH10__CSR_EXAMPLE_NAME "_"

chapter_10/ch10__spmv.cu

+1-1
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ void ch10__spmv(env_e env, kernel_config_t config){
205205
}
206206

207207
printf("Last %d values:\n", PRINT_LENGTH);
208-
nvixnu__array_map(y, sizeof(double), 4, nvixnu__print_item_double);
208+
nvixnu__array_map(y + CH10__INPUT_ROWS - PRINT_LENGTH, sizeof(double), PRINT_LENGTH, nvixnu__print_item_double);
209209

210210
free(csr.data);
211211
free(csr.col_idx);

chapter_12/ch12__bfs.cu

+1-2
Original file line numberDiff line numberDiff line change
@@ -205,8 +205,7 @@ void ch12__bfs(env_e env, kernel_config_t config){
205205
}
206206

207207
printf("Last %d values:\n", PRINT_LENGTH);
208-
//nvixnu__array_map(bfs.labels + bfs.dest_length - PRINT_LENGTH, sizeof(int), PRINT_LENGTH, nvixnu__print_item_int);
209-
nvixnu__array_map(bfs.labels, sizeof(int), bfs.edges_length-1, nvixnu__print_item_int);
208+
nvixnu__array_map(bfs.labels + bfs.dest_length - PRINT_LENGTH, sizeof(int), PRINT_LENGTH, nvixnu__print_item_int);
210209

211210
free(bfs.dest);
212211
free(bfs.edges);

chapter_12/ch12__config.h

+5-5
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@
1414
#include "../utils.h"
1515
#include "../datasets_info.h"
1616

17-
#define CH12__DEST_FILEPATH "../datasets/graphs/example_destination.txt"
18-
#define CH12__DEST_LENGTH 15
17+
#define CH12__DEST_FILEPATH "../datasets/sparse/nz80666_3000x3000/nz80666_3000x3000_col_idx.txt"
18+
#define CH12__DEST_LENGTH 80666
1919

20-
#define CH12__EDGES_FILEPATH "../datasets/graphs/example_edges.txt"
21-
#define CH12__EDGES_LENGTH 10
20+
#define CH12__EDGES_FILEPATH "../datasets/sparse/nz80666_3000x3000/nz80666_3000x3000_row_ptr.txt"
21+
#define CH12__EDGES_LENGTH 3001
2222

23-
#define CH12__MAX_FRONTIER_LENGTH 10
23+
#define CH12__MAX_FRONTIER_LENGTH 50
2424

2525
#define CH12__BLOCK_LEVEL_QUEUE "BLOCK_LEVEL_QUEUE"
2626

datasets_info.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
#define CREDIT_CARD_DATASET_LENGTH CREDIT_CARD_DATASET_ROWS*CREDIT_CARD_DATASET_COLS
1818
#define CREDIT_CARD_DATASET_PATH "../datasets/credit_card_fraud/" NUM2STR(CREDIT_CARD_DATASET_ROWS) "x" NUM2STR(CREDIT_CARD_DATASET_COLS) ".csv"
1919

20-
#define LOREM_IPSUM_DATASET_BYTES 10000
21-
#define LOREM_IPSUM_DATASET_PATH "../datasets/lorem_ipsum/lipsum_17p_1478w_10000b.txt"
20+
#define THE_KING_JAMES_BIBLE_BYTES 4332499
21+
#define THE_KING_JAMES_BIBLE_PATH "../datasets/texts/the-king-james-bible.txt"
2222

2323
#define PARALLEL_CAPACITOR_BETWEEN_PLATES_POINTS 2607745
2424
#define PARALLEL_CAPACITOR_BETWEEN_PLATES_PATH "../datasets/parallel_capacitor_between_plates/TRI5210112_PTS2607745_p.txt"

0 commit comments

Comments
 (0)