mirror of
https://github.com/vortexgpgpu/vortex.git
synced 2025-04-24 05:47:35 -04:00
bfs update
This commit is contained in:
parent
8a68c0c99f
commit
f60dfa8bb8
4 changed files with 28688 additions and 5 deletions
|
@ -131,6 +131,7 @@ void _clCmdParams(int argc, char* argv[]){
|
|||
// devices have no relationship with context
|
||||
void _clInit()
|
||||
{
|
||||
printf("_clInit()\n");
|
||||
int DEVICE_ID_INUSED = device_id_inused;
|
||||
cl_int resultCL;
|
||||
|
||||
|
@ -225,15 +226,18 @@ void _clInit()
|
|||
throw(string("InitCL()::Creating Command Queue. (clCreateCommandQueue)"));
|
||||
//-----------------------------------------------
|
||||
//--cambine-5: Load CL file, build CL program object, create CL kernel object
|
||||
std::string source_str = FileToString(kernel_file);
|
||||
/*std::string source_str = FileToString(kernel_file);
|
||||
const char * source = source_str.c_str();
|
||||
size_t sourceSize[] = { source_str.length() };
|
||||
size_t sourceSize[] = { source_str.length() };*/
|
||||
|
||||
oclHandles.program = clCreateProgramWithSource(oclHandles.context,
|
||||
oclHandles.program =
|
||||
clCreateProgramWithBuiltInKernels(oclHandles.context, 1, &oclHandles.devices[DEVICE_ID_INUSED], "BFS_1, BFS_2", &resultCL);
|
||||
|
||||
/*oclHandles.program = clCreateProgramWithSource(oclHandles.context,
|
||||
1,
|
||||
&source,
|
||||
sourceSize,
|
||||
&resultCL);
|
||||
&resultCL);*/
|
||||
|
||||
if ((resultCL != CL_SUCCESS) || (oclHandles.program == NULL))
|
||||
throw(string("InitCL()::Error: Loading Binary into cl_program. (clCreateProgramWithBinary)"));
|
||||
|
|
28677
benchmarks/opencl/bfs/graph4096.txt
Executable file
28677
benchmarks/opencl/bfs/graph4096.txt
Executable file
File diff suppressed because it is too large
Load diff
|
@ -189,7 +189,7 @@ int main(int argc, char *argv[]) {
|
|||
char *h_graph_mask, *h_updating_graph_mask, *h_graph_visited;
|
||||
|
||||
try {
|
||||
char *input_f = "../data/bfs/graph1MW_6.txt";
|
||||
char *input_f = "graph4096.txt";
|
||||
printf("Reading File\n");
|
||||
// Read in Graph from a file
|
||||
fp = fopen(input_f, "r");
|
||||
|
@ -198,6 +198,8 @@ int main(int argc, char *argv[]) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
printf("Reading File completed!\n");
|
||||
|
||||
int source = 0;
|
||||
|
||||
fscanf(fp, "%d", &no_of_nodes);
|
||||
|
|
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue