Commit ab48487c authored by Yliès's avatar Yliès

added C/team 2's files

parent 78d5b5ed

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

################################################################################
# Automatically-generated file. Do not edit!
################################################################################
-include ../makefile.init
RM := rm -rf
# All of the sources participating in the build are defined here
-include sources.mk
-include src/subdir.mk
-include subdir.mk
-include objects.mk
ifneq ($(MAKECMDGOALS),clean)
ifneq ($(strip $(C++_DEPS)),)
-include $(C++_DEPS)
endif
ifneq ($(strip $(C_DEPS)),)
-include $(C_DEPS)
endif
ifneq ($(strip $(CC_DEPS)),)
-include $(CC_DEPS)
endif
ifneq ($(strip $(CPP_DEPS)),)
-include $(CPP_DEPS)
endif
ifneq ($(strip $(CXX_DEPS)),)
-include $(CXX_DEPS)
endif
ifneq ($(strip $(C_UPPER_DEPS)),)
-include $(C_UPPER_DEPS)
endif
endif
-include ../makefile.defs
# Add inputs and outputs from these tool invocations to the build variables
# All Target
all: CaseStudy2
# Tool invocations
CaseStudy2: $(OBJS) $(USER_OBJS)
@echo 'Building target: $@'
@echo 'Invoking: GCC C++ Linker'
g++ -o "CaseStudy2" $(OBJS) $(USER_OBJS) $(LIBS)
@echo 'Finished building target: $@'
@echo ' '
# Other Targets
clean:
-$(RM) $(OBJS)$(C++_DEPS)$(C_DEPS)$(CC_DEPS)$(CPP_DEPS)$(EXECUTABLES)$(CXX_DEPS)$(C_UPPER_DEPS) CaseStudy2
-@echo ' '
.PHONY: all clean dependents
.SECONDARY:
-include ../makefile.targets
################################################################################
# Automatically-generated file. Do not edit!
################################################################################
USER_OBJS :=
LIBS := -lrt -lpthread -lgomp
################################################################################
# Automatically-generated file. Do not edit!
################################################################################
O_SRCS :=
CPP_SRCS :=
C_UPPER_SRCS :=
C_SRCS :=
S_UPPER_SRCS :=
OBJ_SRCS :=
ASM_SRCS :=
CXX_SRCS :=
C++_SRCS :=
CC_SRCS :=
OBJS :=
C++_DEPS :=
C_DEPS :=
CC_DEPS :=
CPP_DEPS :=
EXECUTABLES :=
CXX_DEPS :=
C_UPPER_DEPS :=
# Every subdirectory with source files must be described here
SUBDIRS := \
src \
src/CaseStudy2.d: ../src/CaseStudy2.cpp ../src/MonLib.h
../src/MonLib.h:
################################################################################
# Automatically-generated file. Do not edit!
################################################################################
# Add inputs and outputs from these tool invocations to the build variables
CPP_SRCS += \
../src/CaseStudy2.cpp
OBJS += \
./src/CaseStudy2.o
CPP_DEPS += \
./src/CaseStudy2.d
# Each subdirectory must supply rules for building sources it contributes
src/%.o: ../src/%.cpp
@echo 'Building file: $<'
@echo 'Invoking: GCC C++ Compiler'
g++ -O0 -g3 -Wall -c -fmessage-length=0 -fopenmp -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
@echo 'Finished building: $<'
@echo ' '
/**
* Copyright 1993-2012 NVIDIA Corporation. All rights reserved.
*
* Please refer to the NVIDIA end user license agreement (EULA) associated
* with this source code for terms and conditions that govern your use of
* this software. Any use, reproduction, disclosure, or distribution of
* this software and related documentation outside the terms of the EULA
* is strictly prohibited.
*/
#include <stdio.h>
#include <stdlib.h>
#include "MonLib.h"
#include <fstream>
#include <sstream>
#include <cstring>
#include <sstream>
#include <functional>
#include <mcstl.h>
#include <pthread.h>
#include <sys/time.h>
#include <sys/resource.h>
#include <string.h>
//static const int WORK_SIZE = 256;
using namespace std;
/**
* This macro checks return value of the CUDA runtime call and exits
* the application if the call failed.
*/
/**
* Host function that prepares data array and passes it to the CUDA kernel.
*/
struct program_trace
{
long objectid;
int sequence;
long transfer_size;
};
int get_next_state1(const program_trace& trace_event, int curr_state = 0)
{
switch(curr_state)
{
case 0: if(trace_event.transfer_size > 999999)
return 1;
else
return 0;
case 1:
return 1;
}
return 1;
}
int get_next_state2(const program_trace& trace_event, int curr_state = 0)
{
switch(curr_state)
{
case 0: if(trace_event.transfer_size > 10000)
return 1;
else
return 0;
case 1: if(trace_event.transfer_size <= 10000)
return 0;
else
return 1;
}
return 1;
}
bool is_equal (const program_trace& T1, const program_trace&T2 )
{
if(T1.objectid != T2.objectid)